Anthropic SDK for Claude API integration.
## Anthropic SDK MCP Server: Official Claude Integration The **Anthropic SDK MCP Server** provides direct integration with Anthropic's Claude API within Google Antigravity. This official SDK enables seamless access to Claude models for code generation, analysis, and intelligent assistance throughout your development workflow. ### Why Anthropic SDK MCP? Direct access to Claude's capabilities enhances Antigravity: - **Official SDK**: Maintained by Anthropic for reliability - **Latest Models**: Access Claude 3.5 Sonnet, Opus, and Haiku - **Streaming**: Real-time responses for interactive development - **Tool Use**: Enable Claude to call functions and APIs - **Vision**: Analyze images and diagrams for code context ### Key Features #### 1. Message API Integration ```typescript import Anthropic from "@anthropic-ai/sdk"; const anthropic = new Anthropic(); const response = await anthropic.messages.create({ model: "claude-3-5-sonnet-20241022", max_tokens: 4096, messages: [ { role: "user", content: "Analyze this code and suggest improvements" } ] }); ``` #### 2. Streaming Responses Real-time streaming for better UX: ```typescript const stream = await anthropic.messages.stream({ model: "claude-3-5-sonnet-20241022", max_tokens: 1024, messages: [{ role: "user", content: prompt }] }); for await (const chunk of stream) { process.stdout.write(chunk.delta?.text || ""); } ``` #### 3. Tool Use (Function Calling) ```typescript const response = await anthropic.messages.create({ model: "claude-3-5-sonnet-20241022", tools: [{ name: "get_weather", description: "Get current weather for a location", input_schema: { type: "object", properties: { location: { type: "string" } } } }], messages: [{ role: "user", content: "What's the weather in SF?" }] }); ``` ### Configuration ```json { "mcpServers": { "anthropic-sdk": { "command": "npx", "args": ["-y", "@anthropic/mcp-anthropic-sdk"], "env": { "ANTHROPIC_API_KEY": "sk-ant-your-key" } } } } ``` ### Use Cases **Code Review**: Submit code for Claude to analyze, identifying bugs, security issues, and optimization opportunities. **Documentation Generation**: Generate comprehensive documentation from code with accurate descriptions and examples. **Intelligent Refactoring**: Get context-aware refactoring suggestions that understand your entire codebase. The Anthropic SDK MCP Server brings the full power of Claude directly into your Antigravity workflow.
{
"mcpServers": {
"anthropic-sdk": {}
}
}