mcp_server

command
v0.10.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 6 Imported by: 0

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/

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL