documentation/guides/agent/mcp.md
Spin up MCP Servers (Model Context Protocol) from your OpenAPI documents with Scalar.
You choose which endpoints to expose (and which not), configure how each one behaves, and connect it to your LLM or AI Agent (Claude, Cursor, etc.).
Create a new MCP Server for your API in under a minute (I promise):
Your MCP Server is ready to be used.
The exact steps for adding an MCP server depend on your client, refer to its documentation for details. Here's how you would do that with Claude:
For Claude Code, you can run the following command in your terminal to add and test the MCP:
claude mcp add \
YOUR_MCP_SERVER_NAME \
https://api.scalar.com/vector/mcp/YOUR_MCP_SERVER_ID \
--header "Authorization: YOUR_PERSONAL_ACCESS_TOKEN" \
--transport http
Tools are the individual capabilities your MCP exposes. Each tool maps to an operation (endpoint) in your OpenAPI document. To configure your tools:
| Mode | Description |
|---|---|
| Search | Exposes the endpoint for lookup only (no requests are sent to your AP) |
| Execute | Makes real, authenticated requests to your API |
Authentication is configured per installation in the Scalar Dashboard. This lets your MCP Server make authenticated requests to your API without exposing credentials to the client.