Commit 58aba5f
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
- src/policyengine_api
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
0 commit comments