home / mcp / codehooks mcp server

Codehooks MCP Server

Provides data storage, code deployment, file management, and key-value operations for AI agents on the Codehooks platform.

Installation
Add the following to your MCP client configuration file.

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.

How to use

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.

How to install

# 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

Configure for Claude Desktop

{
  "mcpServers": {
    "codehooks": {
      "command": "/Users/username/mcp-servers/codehooks.sh"
    }
  }
}

Configure for Cursor

{
  "mcpServers": {
    "codehooks": {
      "command": "/Users/username/mcp-servers/codehooks.sh"
    }
  }
}
```
Replace `username` with your actual username.

Additional configuration for Windows users

{
  "mcpServers": {
    "codehooks": {
      "command": "C:\\Users\\username\\mcp-servers\\codehooks.bat"
    }
  }
}
```
Replace `username` with your actual Windows user name.

Example requests

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.

How These Examples Work

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.

Security and maintenance notes

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.

Troubleshooting tips

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).

Available tools

query_collection

Query, filter, sort, and update collections including metadata across multiple collections.

manage_collections

Create, update, and manage data collections and schemas.

import_export

Import and export data in JSON, JSONL, or CSV formats.

deploy_functions

Deploy JavaScript serverless functions for API endpoints.

file_operations

Upload, list, browse, delete files, and inspect file metadata.

kv_store

Store, retrieve, and delete key-value pairs with optional TTL.

system_ops

View logs and access local API documentation for MCP agents.