Documentation
¶
Overview ¶
Example: mcp_server exposes Chronos tools to any MCP host (Claude Desktop, an IDE, another agent framework) over stdio (WC-B-002). Point an MCP host at:
command: go args: ["run", "./examples/mcp_server/"]
The host will initialize, list the exposed tools, and call them. The "add" tool is auto-approved; "delete_all" is exposed with the default require-approval permission, so the host must approve it (this example wires an auto-approving approver for demonstration — a real deployment would prompt a human).
To try it without a host, pipe JSON-RPC in:
printf '%s\n%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"add","arguments":{"a":2,"b":3}}}' \
| go run ./examples/mcp_server/
Click to show internal directories.
Click to hide internal directories.