Skip to content

refactor: migrate agent to Claude Agent SDK with MCP#63

Merged
nikhilwoodruff merged 1 commit intomainfrom
refactor/claude-agent-sdk
Jan 2, 2026
Merged

refactor: migrate agent to Claude Agent SDK with MCP#63
nikhilwoodruff merged 1 commit intomainfrom
refactor/claude-agent-sdk

Conversation

@nikhilwoodruff
Copy link
Contributor

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 tool discovery and execution
  • Keep system prompt with country filtering guidance and response formatting instructions
  • Simplify tests to match new implementation

The Modal deployment has been updated and is live.

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>
@nikhilwoodruff nikhilwoodruff merged commit 58aba5f into main Jan 2, 2026
1 check passed
@nikhilwoodruff nikhilwoodruff deleted the refactor/claude-agent-sdk branch January 2, 2026 20:10
nikhilwoodruff added a commit that referenced this pull request Jan 2, 2026
nikhilwoodruff added a commit that referenced this pull request Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant