From 6e0afa0bfb5ee06015b63f7aa0f1f9ab35768ff6 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 1 Jan 2026 09:36:56 -0500 Subject: [PATCH] fix: correct MCP config format with type field --- src/grist_mcp/main.py | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/src/grist_mcp/main.py b/src/grist_mcp/main.py index 8b68845..87f2820 100644 --- a/src/grist_mcp/main.py +++ b/src/grist_mcp/main.py @@ -164,24 +164,13 @@ def create_app(config: Config): def _print_mcp_config(port: int, tokens: list) -> None: """Print Claude Code MCP configuration.""" print() - print("Claude Code MCP configuration:") - print("─" * 50) - print(f'''\ -{{ - "mcpServers": {{ - "grist": {{ - "url": "http://localhost:{port}/sse", - "headers": {{ - "Authorization": "Bearer YOUR_TOKEN" - }} - }} - }} -}}''') - print("─" * 50) - print() - print("Available tokens:") + print("Claude Code MCP configuration (copy-paste to add):") for t in tokens: - print(f" - {t.name}: {t.token}") + config = ( + f'{{"type": "sse", "url": "http://localhost:{port}/sse", ' + f'"headers": {{"Authorization": "Bearer {t.token}"}}}}' + ) + print(f" claude mcp add-json grist-{t.name} '{config}'") print()