mcp.serve
Start MCP server to expose procedures as tools
- Package
- @procedures/mcp-server · README
- Path
["mcp","serve"]- CLI
- Not a
markcommand: its package does not declare client.procedures. - As data
{"$proc":["mcp","serve"],"input":{}}- Tags
- mcp, server
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/mcp-server"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["mcp","serve"], {});
console.log(JSON.stringify(result));As data, in a program
{ "$proc": ["mcp", "serve"], "input": {} }Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
transport | "stdio" | no | "stdio" | Transport type (default: "stdio"). Only stdio is implemented: the SSE transport needs an HTTP server integration, and accepting "sse" here only led to an error (BUGS-2026-07 L28). |
name | string | no | Server name for MCP (default: "procedure-server") | |
version | string | no | Server version for MCP (default: "1.0.0") | |
autoRegister | boolean | no | true | Whether to auto-register all procedures (default: true) |
debug | boolean | no | false | Enable debug logging |
namespaces | string[] | no | The namespaces (first path segments) of the tools. With this list, the bundles give no tools. | |
exclude | string[] | no | Procedure keys of the tool namespaces that are not tools. | |
bundles | string[] | no | The bundles whose mcpNamespaces and mcpExclude give the tools, when `namespaces` is not given. | |
strictCalls | boolean | no | true | True (the default): a procedure of code without metadata.calls can call only tools. |
toolTimeoutMs | integer | no | 600000 | The time limit of each tool call, in milliseconds (default: 600000). 0: no limit. |
Output
The schema does not list fields (object).
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"transport": {
"default": "stdio",
"description": "Transport type (default: \"stdio\"). Only stdio is implemented: the SSE transport needs an HTTP server integration, and accepting \"sse\" here only led to an error (BUGS-2026-07 L28).",
"type": "string",
"enum": [
"stdio"
]
},
"name": {
"description": "Server name for MCP (default: \"procedure-server\")",
"type": "string"
},
"version": {
"description": "Server version for MCP (default: \"1.0.0\")",
"type": "string"
},
"autoRegister": {
"default": true,
"description": "Whether to auto-register all procedures (default: true)",
"type": "boolean"
},
"debug": {
"default": false,
"description": "Enable debug logging",
"type": "boolean"
},
"namespaces": {
"description": "The namespaces (first path segments) of the tools. With this list, the bundles give no tools.",
"type": "array",
"items": {
"type": "string"
}
},
"exclude": {
"description": "Procedure keys of the tool namespaces that are not tools.",
"type": "array",
"items": {
"type": "string"
}
},
"bundles": {
"description": "The bundles whose mcpNamespaces and mcpExclude give the tools, when `namespaces` is not given.",
"type": "array",
"items": {
"type": "string"
}
},
"strictCalls": {
"default": true,
"description": "True (the default): a procedure of code without metadata.calls can call only tools.",
"type": "boolean"
},
"toolTimeoutMs": {
"default": 600000,
"description": "The time limit of each tool call, in milliseconds (default: 600000). 0: no limit.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
}
},
"output": {
"type": "object"
}
}