home / mcp / codehooks mcp server
Provides data storage, code deployment, file management, and key-value operations for AI agents on the Codehooks platform.
Configuration
View docs{
"mcpServers": {
"restdb-codehooks-mcp-server": {
"command": "/Users/username/mcp-servers/codehooks.sh",
"args": [],
"env": {
"CODEHOOKS_SPACE": "your_space_name",
"CODEHOOKS_ADMIN_TOKEN": "your_admin_token",
"CODEHOOKS_PROJECT_NAME": "your_project_name"
}
}
}
}You use an MCP (Model Context Protocol) server to perform data operations, deploy code, manage files, and store small key-value data, all from a single, scalable integration. This guide shows you how to set up, run, and use the Codehooks MCP Server to build production-ready workflows quickly and reliably.
You interact with the MCP server through an MCP client that communicates with the server endpoints you deploy or run locally. Use the server to create and manage data storage (collections and schemas), deploy JavaScript serverless endpoints, handle file uploads and metadata, and store short-lived key-value pairs. You can also view application logs and access local API documentation to understand available endpoints and behaviors. Start by running one of the provided MCP server runners, then configure your client to point at the running MCP server, and finally build your desired flows by deploying endpoints, setting up data models, and adding automation triggers.
# Prerequisites
- Docker must be installed and running on your machine
- A Codehooks Admin Token if you plan to use admin-scoped features (optional for local development)
# Create a working directory for MCP server scripts
mkdir ~/mcp-servers
cd ~/mcp-servers
# macOS / Linux: create the starter script
cat > codehooks.sh <<'SH'
#!/bin/bash
# Set PATH to include common Docker locations
export PATH="/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:$PATH"
exec docker run --rm -i \
--pull always \
-e CODEHOOKS_PROJECT_NAME=your_project_name \
-e CODEHOOKS_ADMIN_TOKEN=your_admin_token \
-e CODEHOOKS_SPACE=your_space_name \
ghcr.io/restdb/codehooks-mcp:latest
SH
chmod +x codehooks.sh
# Windows: create a batch runner
# Save as codehooks.bat and run in a Windows environment
cat > codehooks.bat <<'BAT'
@echo off
docker run --rm -i ^
--pull always ^
-e CODEHOOKS_PROJECT_NAME=your_project_name ^
-e CODEHOOKS_ADMIN_TOKEN=your_admin_token ^
-e CODEHOOKS_SPACE=your_space_name ^
ghcr.io/restdb/codehooks-mcp:latest
BAT{
"mcpServers": {
"codehooks": {
"command": "/Users/username/mcp-servers/codehooks.sh"
}
}
}{
"mcpServers": {
"codehooks": {
"command": "/Users/username/mcp-servers/codehooks.sh"
}
}
}
```
Replace `username` with your actual username.{
"mcpServers": {
"codehooks": {
"command": "C:\\Users\\username\\mcp-servers\\codehooks.bat"
}
}
}
```
Replace `username` with your actual Windows user name.You can describe the kinds of systems you want to build by outlining high-level goals. Examples include creating a survey system with data collections and analytics endpoints, building an inventory tracker with CSV imports and real-time queries, or setting up automated data backups with export and restore endpoints.
Each example shows how multiple MCP capabilities come together to form a complete, production-ready workflow. You first define data models and endpoints, deploy the necessary serverless functions, and then configure storage and triggers to automate actions.
Keep your admin token secure and rotate it periodically. When running locally, ensure your Docker runtime is up to date and that access to your local machine is controlled to prevent unauthorized access to running MCP servers.
If a server does not respond, verify that the starting script executed correctly and that Docker is running. Check logs via your MCP client’s built-in log viewer or by inspecting container output in your terminal. Ensure the environment variables in your shell or batch file match the required values (project name, admin token, and space).
Query, filter, sort, and update collections including metadata across multiple collections.
Create, update, and manage data collections and schemas.
Import and export data in JSON, JSONL, or CSV formats.
Deploy JavaScript serverless functions for API endpoints.
Upload, list, browse, delete files, and inspect file metadata.
Store, retrieve, and delete key-value pairs with optional TTL.
View logs and access local API documentation for MCP agents.