Connect Anthropic to Claude: Scale Batch Tasks & File Processing
Learn how to connect Anthropic's REST API to Claude using a managed MCP server. Automate workspace provisioning, message batches, and cost reporting.
If you want Claude to provision new Anthropic workspaces, cancel runaway message batches, or audit team usage reports, you need to bridge the two systems. Native connectors do not exist for this specific administrative orchestration. The standard approach is building a Model Context Protocol (MCP) server that translates Claude's natural language tool calls into Anthropic REST API requests (if you use OpenAI, see our guide on connecting Anthropic to ChatGPT).
Giving an AI agent read and write access to your Anthropic administrative backend is an engineering challenge. You either spend weeks building, hosting, and maintaining a custom MCP server, or you use a managed infrastructure layer that handles the boilerplate for you.
This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Anthropic, connect it natively to Claude Desktop, and execute complex administrative workflows without writing integration-specific code.
The Engineering Reality of Custom API Connectors
A custom MCP server is a self-hosted integration layer that translates an LLM's tool calls into structured REST API requests. The open standard provides a predictable way for models to discover tools over JSON-RPC 2.0. The reality of implementing it against vendor APIs is entirely different.
If you decide to build a custom MCP server for Anthropic, you are responsible for the entire API lifecycle. You have to handle authentication, map JSON schemas to MCP tool definitions, and manage rate limit errors (Anthropic enforces strict TPM and RPM limits). Every time Anthropic adds a new endpoint, you have to update your server code, redeploy, and test the integration.
Truto eliminates this by making tool generation dynamic and documentation-driven. Rather than hand-coding tool definitions for each integration, Truto derives them from existing data sources: the integration's resource definitions and documentation records. A tool only appears in the MCP server if it has a corresponding documentation entry. This acts as a quality gate to ensure only well-documented endpoints are exposed as AI tools. If the upstream API returns an HTTP 429 error, Truto passes it through with standardized headers so your agent can implement its own backoff.
How to Create the Anthropic MCP Server
Each MCP server in Truto is scoped to a single integrated account. The server URL contains a cryptographic token that encodes which account to use, what tools to expose, and when the server expires. The URL alone is enough to authenticate and serve tools.
You can create this server in two ways: via the Truto UI or via the API.
Method 1: Via the Truto UI
For quick testing or internal agents, generating the server through the dashboard takes seconds:
- Navigate to the integrated account page for your connected Anthropic integration.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Select your desired configuration (name, allowed methods, tags, and expiration).
- Copy the generated MCP server URL.
Method 2: Via the Truto API
If you are provisioning agents programmatically, you can generate MCP servers via the REST API. The API validates that the integration has tools available, generates a secure token, stores it in KV, and returns a ready-to-use URL.
Make a POST request to /integrated-account/:id/mcp:
{
"name": "Anthropic Admin Agent",
"config": {
"methods": ["read", "write", "custom"],
"require_api_token_auth": true
},
"expires_at": "2026-12-31T23:59:59Z"
}Notice the require_api_token_auth flag. By default, an MCP server's token URL is the only authentication required. For higher-security scenarios like managing Anthropic API keys, setting this flag to true adds a second layer. The MCP client must provide a valid Truto API token in the Authorization header when connecting.
Connecting the MCP Server to Claude Desktop
Once you have the Truto MCP URL, connecting it to Claude Desktop takes less than a minute.
Method A: Via the Claude Desktop UI
- Open Claude Desktop.
- Navigate to Settings → Integrations → Add MCP Server.
- Paste the Truto MCP server URL and click Add.
Claude will immediately connect, perform the JSON-RPC handshake, and discover the available Anthropic tools. No additional configuration is required.
Method B: Via the config file
If you prefer manual configuration, open your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the Truto MCP server as a custom connector:
{
"mcpServers": {
"anthropic-admin": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"--url",
"https://api.truto.one/mcp/YOUR_SECURE_TOKEN"
]
}
}
}Restart Claude Desktop. Claude will send an initialize JSON-RPC message to the server, and Truto will dynamically generate and return the available tools.
The Anthropic MCP Tool Inventory
When Claude requests the available tools, Truto maps the Anthropic REST API into 44 distinct, callable MCP tools. You can view the full documentation and capabilities on our Anthropic integration page.
Here is the complete inventory of tools your agent can access, grouped by administrative function:
Workspaces & Users
Agents can fully automate onboarding and offboarding by managing Anthropic workspaces and organization members.
- list_all_anthropic_workspaces: List all workspaces in the Anthropic organization.
- create_a_anthropic_workspace: Create a new workspace within the Anthropic organization.
- get_single_anthropic_workspace_by_id: Retrieve details for a specific workspace in Anthropic.
- update_a_anthropic_workspace_by_id: Update name or settings for an existing workspace.
- anthropic_workspaces_archive: Archive a specific workspace in Anthropic.
- list_all_anthropic_users: List all users in the Anthropic organization with role and email info.
- get_single_anthropic_user_by_id: Get details for a specific user in the Anthropic organization.
- update_a_anthropic_user_by_id: Update the role or details of a user in Anthropic.
- delete_a_anthropic_user_by_id: Delete a user from the Anthropic organization.
- list_all_anthropic_me: Retrieves a list of all users in the organization with details like user ID.
- list_all_anthropic_organization: Get details about the authenticated Anthropic organization.
- list_all_anthropic_workspace_members: List all members belonging to a specific workspace.
- create_a_anthropic_workspace_member: Add a new user as a member to an Anthropic workspace.
- get_single_anthropic_workspace_member_by_id: Get details of a specific member within an Anthropic workspace.
- update_a_anthropic_workspace_member_by_id: Update a workspace member's role or details in Anthropic.
- delete_a_anthropic_workspace_member_by_id: Remove a member from a specific workspace in Anthropic.
- create_a_anthropic_organizations_invite: Invite a new user to the Anthropic organization.
- list_all_anthropic_organizations_invites: List all pending organization invites in Anthropic.
- get_single_anthropic_organizations_invite_by_id: Get details for a specific organization invite.
- delete_a_anthropic_organizations_invite_by_id: Delete an organization invite by ID.
Message Batches
Batch processing is highly efficient for evaluating massive datasets. Your agent can coordinate these asynchronous workloads directly.
- create_a_anthropic_message_batch: Create a Message Batch in Anthropic with an array of message requests.
- list_all_anthropic_message_batches: List all message batches in Anthropic with status and request counts.
- get_single_anthropic_message_batch_by_id: Get details of a specific message-batch in Anthropic using its ID.
- anthropic_message_batches_results: Get results of a specific message-batch in Anthropic.
- anthropic_message_batches_cancel: Cancel an in-progress message batch in Anthropic.
- delete_a_anthropic_message_batch_by_id: Delete a specific message-batch in Anthropic if it is finished.
File Management
Upload reference datasets, retrieve metadata, and clean up storage.
- list_all_anthropic_files: List files in Anthropic with metadata like creation time and MIME type.
- create_a_anthropic_file: Create a file in Anthropic by uploading a binary file via multipart form-data.
- get_single_anthropic_file_by_id: Get metadata for a specific file in Anthropic including creation time and size.
- anthropic_files_download: Download the contents of a specific file in Anthropic using its ID.
- delete_a_anthropic_file_by_id: Delete a file in Anthropic by ID.
API Keys & Usage Reports
Give agents the ability to audit costs, track Claude Code usage, and rotate compromised keys.
- list_all_anthropic_api_keys: List all API keys in the Anthropic organization.
- get_single_anthropic_api_key_by_id: Get details of a specific API key including status and creator.
- update_a_anthropic_api_key_by_id: Update settings for a specific Anthropic API key.
- list_all_anthropic_cost_report: Retrieve cost reports for Anthropic usage within specified time buckets.
- list_all_anthropic_message_usage_report: Retrieve message usage reports within specified time buckets.
- list_all_anthropic_claude_code_usage_report: Get the Claude Code usage report for a specific date.
Messages & Prompt Optimization
Interact with models, count tokens, and utilize Anthropic's prompt engineering endpoints.
- list_all_anthropic_models: List available models in Anthropic including identifiers and display names.
- get_single_anthropic_model_by_id: Get details for a specific model in Anthropic such as release date.
- create_a_anthropic_message: Create a new message in Anthropic using a specific model and prompt.
- anthropic_messages_count_tokens: Count input tokens for specific messages and models in Anthropic.
- create_a_anthropic_improve_prompt: Create an improved version of a prompt in Anthropic.
- create_a_anthropic_generate_prompt: Generate a prompt in Anthropic based on a provided task description.
- create_a_anthropic_templatize_prompt: Templatize a prompt by extracting variables from messages and input.
Under the Hood: How Truto Executes Tool Calls
When Claude decides to call list_all_anthropic_workspaces, it sends a flat JSON object containing the arguments.
The Truto MCP router intercepts this call and handles the complex mapping required by REST APIs. It splits the flat input namespace into query parameters and body parameters using the schemas derived from the documentation records. If a query schema and body schema both define a property with the same name, the query schema takes precedence.
Execution is then delegated to the proxy API handler. This means MCP tool calls operate on the integration's native resources directly. There is no unified model mapping layer interfering with the payload. The query and body parameters correspond exactly to Anthropic's actual API format.
sequenceDiagram
participant C as Claude Desktop
participant M as Truto MCP Server
participant A as Anthropic API
C->>M: tools/call<br>{"name": "list_all_anthropic_workspaces"}
M->>M: Validate Token & Extract Schemas
M->>A: GET /v1/workspaces<br>Authorization: Bearer <token>
A-->>M: HTTP 200 OK<br>{"workspaces": [...], "has_more": false}
M-->>C: JSON-RPC Result<br>Array of WorkspacesIf the tool call fails, the error is returned with isError: true in the result content, allowing Claude to interpret the failure and potentially retry the action with corrected parameters.
Automate Administrative Overhead
By connecting Anthropic to Claude via MCP, you transform a standard chat interface into a fully capable administrative console. Whether you are managing Anthropic workspaces or automating support workflows in Pylon, you bypass the need to build a custom API integration layer, write authentication handlers, or manually map JSON schemas.
Your agents can now monitor cost reports, rotate API keys, provision new workspaces for incoming engineering teams, and orchestrate massive message batches entirely through natural language.
FAQ
- Can Claude execute Anthropic message batches?
- Yes. By exposing the Anthropic API through an MCP server, Claude can create message batches, check their status, and download the results autonomously.
- Do I need to write code to create an Anthropic MCP server?
- No. Truto dynamically generates the MCP server and tool schemas directly from the Anthropic API documentation, requiring zero integration-specific code.