Build advanced AI agents with Anthropic. Connect 600+ integrations, automate workflows, and deploy with ease using Metorial.
Common issues when using Metorial with AI SDK and how to resolve them.
Problem: "Invalid API key" or authentication errors
Solutions:
Problem: "Server deployment not found" error
Solutions:
Problem: session.tools
is empty or undefined
Solutions:
withProviderSession
Problem: Tools are called but fail to execute
Solutions:
Log session details to understand what's happening:
await metorial.withProviderSession(
metorialAISDK,
{ serverDeployments: ['your-deployment-id'] },
async (session) => {
console.log('Available tools:', session.tools.map(t => t.name));
const result = await generateText({
model: yourModel,
messages: [...],
tools: session.tools
});
console.log('Steps taken:', result.steps);
console.log('Tool results:', result.toolResults);
}
);
Check which tools were called and their results:
const result = await generateText({
model: yourModel,
messages: [...],
tools: session.tools
});
result.toolCalls?.forEach((call, i) => {
console.log(`Tool ${i}:`, call.toolName);
console.log('Arguments:', call.args);
});
result.toolResults?.forEach((result, i) => {
console.log(`Result ${i}:`, result.result);
});
Verify your deployment is working:
await metorial.withProviderSession(
metorialAISDK,
{ serverDeployments: ['your-deployment-id'] },
async (session) => {
if (session.tools.length === 0) {
console.error('No tools available in deployment');
return;
}
console.log('Deployment is healthy');
console.log('Available integrations:', session.tools.length);
}
);
If responses are taking too long:
maxSteps
to limit tool iterationsIf you hit rate limits:
If you're still experiencing issues:
Always implement proper error handling:
try {
await metorial.withProviderSession(
metorialAISDK,
{ serverDeployments: ['your-deployment-id'] },
async (session) => {
try {
const result = await generateText({
model: yourModel,
messages: [...],
tools: session.tools
});
return result.text;
} catch (modelError) {
console.error('Model generation error:', modelError);
throw modelError;
}
}
);
} catch (sessionError) {
console.error('Session error:', sessionError);
// Handle gracefully for your users
}
This ensures you catch both session-level and model-level errors appropriately.
Integrate Anthropic Claude with Metorial to give your AI agents access to over 600 powerful integrations through the Model Context Protocol (MCP). Our open-source platform is purpose-built for developers creating intelligent applications with Claude, Anthropic's advanced language model. With Metorial's Python and TypeScript SDKs, connecting Claude to calendars, CRMs, databases, project management tools, and hundreds of other services takes just a couple of lines of code. Stop spending days building custom integrations—Metorial handles authentication, API calls, and data formatting automatically so you can focus on crafting intelligent agent behaviors and user experiences. Whether you're building customer support bots, research assistants, or workflow automation with Claude, Metorial provides the integration infrastructure you need. Our MCP-native approach ensures your Anthropic-powered agents can interact with the tools your users already depend on, creating more valuable and practical AI solutions that integrate seamlessly into existing workflows.
Let's take your AI-powered applications to the next level, together.
Metorial provides developers with instant access to 600+ MCP servers for building AI agents that can interact with real-world tools and services. Built on MCP, Metorial simplifies agent tool integration by offering pre-configured connections to popular platforms like Google Drive, Slack, GitHub, Notion, and hundreds of other APIs. Our platform supports all major AI agent frameworks—including LangChain, AutoGen, CrewAI, and LangGraph—enabling developers to add tool calling capabilities to their agents in just a few lines of code. By eliminating the need for custom integration code, Metorial helps AI developers move from prototype to production faster while maintaining security and reliability. Whether you're building autonomous research agents, customer service bots, or workflow automation tools, Metorial's MCP server library provides the integrations you need to connect your agents to the real world.