{"version":"2.0.50","anchor":"mcp-cli-endpoint","canonical_anchor":"mcp-cli-endpoint","heading":"MCP CLI Endpoint","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.0.50\/e\/mcp-cli-endpoint","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.0.50","markdown":"### MCP CLI Endpoint\n\n**What:** HTTP REST API server for external tools to interact with Claude Code's MCP servers programmatically. **How to use:**\n\n`# Enable the endpoint (enabled by default when Claude Code is running) # External tools can make requests to localhost with bearer token auth # Example: List available MCP servers curl -X POST http:\/\/127.0.0.1:<port>\/mcp \\ -H \"Authorization: Bearer <secret>\" \\ -H \"Content-Type: application\/json\" \\ -d '{\"command\": \"servers\"}' # Example: Call an MCP tool curl -X POST http:\/\/127.0.0.1:<port>\/mcp \\ -H \"Authorization: Bearer <secret>\" \\ -d '{\"command\": \"call\", \"params\": {\"server\": \"myserver\", \"tool\": \"mytool\", \"args\": {}}}'` **Details:**\n\n- Supports commands: `servers`, `tools`, `info`, `call`, `grep`, `resources`, `read`\n- Bearer token authentication with 32-byte random secret\n- Localhost-only binding for security\n- Endpoint info stored in `~\/.claude\/<workspace>.endpoint`\n- Can be disabled via `ENABLE_MCP_CLI_ENDPOINT=false` environment variable\n- **Evidence**: `class hX0` at line 515880 in v2.0.50"}