Skip to main content
  1. Sign up — Create an account at platform.respan.ai
  2. Create an API key — Generate one on the API keys page
  3. Add credits or a provider key — Add credits on the Credits page or connect your own provider key on the Integrations page
The Model Context Protocol (MCP) is a standardized framework that enables AI models to interact with external data sources and tools. It allows for real-time access to your Respan logs, traces, prompts, and customer data directly from your coding environment.

Getting started

Respan provides an MCP server that gives your AI tools direct access to your observability data. The server supports both HTTP streamable (for hosted deployments) and stdio (for local use).

Installation


Authentication

MethodHow it worksBest For
OAuthTool opens browser for sign-inClaude Code, Claude Desktop, Codex
JWT TokenSign in at mcp.respan.ai/login, copy tokenFallback when OAuth fails
API KeyUse key from platform.respan.aiProgrammatic access, scripts
Local StdioRESPAN_API_KEY env varPersonal development, offline use
Private HTTPVercel environment variableTeams, shared access

Enterprise configuration

Enterprise users have a dedicated MCP endpoint that automatically routes to the enterprise API (endpoint.respan.ai). Use https://mcp.respan.ai/mcp/enterprise instead of https://mcp.respan.ai/mcp.
Connect using OAuth with the enterprise endpoint. Your tool will open a browser window for enterprise sign-in.
claude mcp add --transport http respan https://mcp.respan.ai/mcp/enterprise
Cursor OAuth known issue: Cursor has a known bug where MCP tools appear connected but the agent cannot discover or use them. Use the JWT Token or API Key method instead for reliable Cursor setup.
EndpointMCP URLAPI URL
Default (Cloud)https://mcp.respan.ai/mcphttps://api.respan.ai/api
Enterprisehttps://mcp.respan.ai/mcp/enterprisehttps://endpoint.respan.ai/api

Available tools

Once connected, your AI tools have access to the following Respan features.

Logs

ToolDescription
list_logsList and filter LLM request logs with powerful query capabilities
get_log_detailRetrieve complete details of a single log by unique ID
Example queries:
  • “Show me the most expensive requests from the last hour”
  • “Find all failed requests for customer user_123”
  • “List logs where latency > 5 seconds”

Traces

ToolDescription
list_tracesList and filter traces with sorting and pagination
get_trace_treeRetrieve complete hierarchical span tree of a trace
Example queries:
  • “Show me traces with errors in production”
  • “Get the span tree for trace xyz123”
  • “Find traces that cost more than $0.10”

Customers

ToolDescription
list_customersList customers with pagination and sorting
get_customer_detailGet customer details including budget usage
Example queries:
  • “Who are my top 10 customers by cost?”
  • “Show customer budget usage for user_abc”
  • “List customers sorted by number of requests”

Prompts

ToolDescription
list_promptsList all prompts in your organization
get_prompt_detailGet detailed prompt information
list_prompt_versionsList all versions of a prompt
get_prompt_version_detailGet specific version details
Example queries:
  • “Show me all my prompts”
  • “Get the latest version of my customer-support prompt”
  • “What are the different versions of prompt xyz?”

Troubleshooting

  1. Verify your config file path is correct
  2. Check JSON syntax (use a JSON validator)
  3. Restart your AI tool completely (not just reload)
  4. For stdio mode: ensure npm run build completed successfully
  1. OAuth: Try signing out and re-authenticating. If OAuth keeps failing in Cursor, use the JWT Token or API Key method instead.
  2. JWT Token: Tokens expire — sign in again at mcp.respan.ai/login to get a fresh token.
  3. API Key: Verify your API key is correct and the header is Authorization: Bearer YOUR_KEY (not just the key).
  4. Stdio mode: Check the RESPAN_API_KEY env var is set correctly.
  1. Check your internet connection
  2. For enterprise: verify RESPAN_API_BASE_URL is correct
  3. For private HTTP: ensure Vercel deployment is active

Source code

The Respan MCP server is open source:

GitHub Repository

View source code, report issues, and contribute