Model Context Protocol (MCP)
Every spec published on Elba automatically generates an MCP-compatible server config. This lets any MCP-enabled agent — Claude, GPT, or custom — discover and use your API tools natively.
What is MCP?
The Model Context Protocol is an open standard for connecting AI agents to external tools and data sources. Instead of hardcoding tool definitions into every agent, MCP lets agents dynamically discover and connect to tool servers at runtime.
Elba generates an MCP server config for every spec, so agents can plug into your API without any manual tool definition.
How it works
You publish a spec on Elba
Paste your API description or import an OpenAPI file. Elba generates the full AgentSpec.
Elba auto-generates the MCP config
Each action becomes an MCP tool with a typed input schema. No extra work needed.
Agents fetch the config and connect
Any MCP-compatible agent can read your config and call your tools immediately.
MCP endpoint
Every spec has an MCP config available at:
GET /api/mcp/{spec_id}Returns JSON with CORS headers enabled. Cached for 60 seconds.
Response format
The response follows the MCP server config schema:
{
"mcpServers": {
"your-api-name": {
"url": "https://yourco.useelba.com/api/agent/{id}",
"description": "Your API description",
"tools": [
{
"name": "actionName",
"description": "What this action does",
"inputSchema": {
"type": "object",
"properties": {
"param1": {
"type": "string",
"description": "Parameter description"
}
},
"required": ["param1"]
}
}
]
}
}
}Using with Claude Desktop
Add the Elba MCP config to your Claude Desktop configuration file:
{
"mcpServers": {
"your-api": {
"url": "https://yourco.useelba.com/api/mcp/{spec_id}"
}
}
}Claude will automatically discover all tools defined in your spec and make them available in conversation.
Using with other agents
Any agent that supports MCP can consume the config. Fetch the endpoint and pass the tools array to your agent's tool registration:
const res = await fetch('https://yourco.useelba.com/api/mcp/{id}')
const config = await res.json()
const serverKey = Object.keys(config.mcpServers)[0]
const server = config.mcpServers[serverKey]
// Register each tool with your agent
for (const tool of server.tools) {
agent.registerTool({
name: tool.name,
description: tool.description,
parameters: tool.inputSchema,
})
}Other discovery methods
MCP is one of six ways agents can discover your API on Elba:
/.well-known/agent.json/llms.txt/api/agent-search?q=.../api/registryEmbedded in page HTMLRelated documentation
Last updated: April 2, 2026