@ductape/mcp
v0.1.0
Published
MCP server that exposes Ductape SDK operations via the backend proxy
Downloads
29
Readme
Ductape MCP Server
MCP (Model Context Protocol) server that exposes Ductape SDK operations as tools. All calls go through the Ductape backend proxy at a fixed URL; the SDK never runs in the MCP process. It is completely stateless; you provide your Publishable Key per execution.
Prerequisites
- Ductape backend (proxy and users services) reachable at
https://api.ductape.app(handled automatically) - A workspace Publishable Key (from your Ductape workspace)
Install
cd platform/mcp-server
npm installMCP SDK: npm install pulls in @modelcontextprotocol/sdk and zod (v1, recommended). For the v2 alpha server package instead, use npm install @modelcontextprotocol/server zod @cfworker/json-schema.
Configuration & Run
npm run build && node dist/index.jsOr with tsx:
npm run devThe server uses stdio transport (stdin/stdout), so it is intended to be spawned by an MCP client (e.g. Cursor). There are no environment variables required to run the server.
Cursor configuration
In Cursor, add the server in MCP settings (e.g. ~/.cursor/mcp.json or project .cursor/mcp.json):
{
"mcpServers": {
"ductape": {
"command": "node",
"args": ["/absolute/path/to/Ductape/platform/mcp-server/dist/index.js"]
}
}
}Use an absolute path for args[0].
Tools
The server exposes three tools:
ductape_execute:- It runs any allowed SDK module method via the backend proxy.
- Arguments:
publishable_key(string, required for authentication)module(e.g.databases,storage,vector)method(e.g.query,list,findSimilar)params(array of positional arguments matching the SDK).
- Full reference: The tool description embeds the complete list of modules, allowed methods, and their expected parameters for quick reference. (See docs/TOOLS.md if using a client that requires it).
ductape_generate_payload:- Calls backend
POST /integrations/v1/payloads/generate. - Returns canonical executable payload templates with schema metadata (
{ payload, meta }). - Intended for MCP-assisted code snippet generation and payload prefill in agent workflows.
- Arguments:
workspace_id,user_id,public_keyproduct_tag,env_slugoperation_family,method- optional
targets,schema_mode,include_session,include_cache,input_hint
- Calls backend
ductape_generate_snippet:- Calls
ductape_generate_payloadflow and returns:- generated payload/meta
- ready-to-copy SDK snippet in
typescriptorpython
- Intended for engineers and copilots that need executable examples quickly.
- Calls
Security
- Passing the
publishable_keyon a per-request basis guarantees that each execution is isolated. This architecture safely supports deployments that multiplex multiple user connections in a single server thread (e.g., SSE), avoiding cross-tenant leakage.
