datarobot_genai.drmcp.test_utils.clients.anthropic
anthropic
Anthropic LLM MCP Client implementation (example).
This is an example implementation showing how easy it is to add a new LLM provider. Anthropic's API is OpenAI-compatible, so we can use the OpenAI SDK with their endpoint.
AnthropicMCPClient
Bases: BaseLLMMCPClient
Client for interacting with LLMs via MCP using Anthropic Claude.
Note: Elicitation is handled at the protocol level by FastMCP's ctx.elicit(). Tools using FastMCP's built-in elicitation will work automatically.
Example
Source code in datarobot_genai/drmcp/test_utils/clients/anthropic.py
__init__
Initialize the LLM MCP client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
str | dict
|
Configuration string or dict with: - anthropic_api_key: Anthropic API key - model: Model name (required) - save_llm_responses: Whether to save responses (default: True) |
required |