Skip to content

Commit 58aba5f

Browse files
refactor: migrate agent to Claude Agent SDK with MCP (#63)
Replace the custom 550-line Anthropic API implementation with the Claude Agent SDK (~260 lines). The agent now connects to the existing MCP server at /mcp instead of generating tools from OpenAPI spec. Key changes: - Use claude-agent-sdk query() with ClaudeAgentOptions for MCP server connection - Remove openapi_to_claude_tools() and execute_api_tool() - MCP handles this - Keep system prompt with country filtering guidance - Simplify tests to match new implementation Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 9d3bf6c commit 58aba5f

5 files changed

Lines changed: 167 additions & 634 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ dependencies = [
2424
"fastapi-mcp>=0.4.0",
2525
"modal>=0.68.0",
2626
"anthropic>=0.40.0",
27+
"claude-agent-sdk>=0.1.0",
2728
]
2829

2930
[project.optional-dependencies]

0 commit comments

Comments
 (0)