Skip to content
RunAPI Developer Docs
Developer Resources
Developer Resources

Hosted MCP

Connect Claude Desktop, Cursor, VS Code, Windsurf, or another MCP client to RunAPI with OAuth.

Hosted MCP is the recommended way to use RunAPI tools. Your MCP client connects directly to RunAPI, so you do not need to install Node.js or keep a local process running.

Use this endpoint:

TEXT
https://mcp.runapi.ai/mcp

Choose your MCP client below. When the client opens RunAPI in your browser, sign in, select the Account to use, and approve access.

Claude Desktop

  1. Open Settings > Connectors and add a custom connector.
  2. Name it RunAPI and enter the endpoint above.
  3. Select Connect and complete the RunAPI authorization in your browser.
  4. In a conversation, open + > Connectors and enable RunAPI.

If RunAPI does not appear in a conversation, return to Settings > Connectors, reconnect it, and confirm it is enabled for that conversation.

Cursor

Add RunAPI to your Cursor mcp.json, such as the project-level .cursor/mcp.json:

JSON
{
  "mcpServers": {
    "runapi": {
      "url": "https://mcp.runapi.ai/mcp"
    }
  }
}

Open Customize in the Cursor sidebar, find RunAPI, enable it, and complete authorization in your browser.

RunAPI should show as connected and expose its tools. For connection or authentication errors, open the Output panel and select MCP Logs.

VS Code

  1. Open the Command Palette and run MCP: Add Server.
  2. Choose HTTP, enter the endpoint above, and name the server RunAPI.
  3. Start the server, trust it when prompted, and complete authorization in your browser.

RunAPI tools should appear in Chat. For errors, run MCP: List Servers, select RunAPI, and choose Show Output.

Windsurf

These steps apply to the Cascade agent. Devin Local uses Devin CLI configuration.

  1. Open Devin Settings > Cascade > MCP Servers and edit the raw ~/.codeium/windsurf/mcp_config.json file.
  2. Add RunAPI as a remote HTTP server:
JSON
{
  "mcpServers": {
    "runapi": {
      "serverUrl": "https://mcp.runapi.ai/mcp"
    }
  }
}
  1. Save the file, refresh the MCP servers, enable RunAPI, and complete authorization in your browser.

If the tools do not appear, open the MCP settings, confirm RunAPI is enabled, and reconnect it.

Other MCP clients

Add the endpoint above as a Streamable HTTP server. The client must support Remote MCP and browser-based OAuth. Complete authorization when prompted, then enable the RunAPI tools in the client.

Verify the connection

Ask your client:

What RunAPI image models are available?

The client should call list_models and return available image models. That confirms the connection and tool dispatch are working.

Use an API key instead

OAuth is the recommended path. Use a dedicated standard API key only for an unattended client or when OAuth is unavailable; follow the Authentication Guide to create one. Never put the key in the endpoint URL or commit it to a repository.

  • Claude Desktop: If Request headers are available for custom connectors, add an Authorization header with the value Bearer YOUR_API_KEY.
  • Cursor: Set RUNAPI_API_KEY in the environment visible to the Cursor application, then use Authorization: Bearer ${env:RUNAPI_API_KEY} in the server headers. Remote servers do not read Cursor envFile settings.
  • VS Code: Reference a password-type ${input:...} from the server Authorization header so VS Code prompts for and stores the key instead of writing it into mcp.json.
  • Windsurf: Reference ${env:RUNAPI_API_KEY} or ${file:...} from the Authorization header in ~/.codeium/windsurf/mcp_config.json.

Revoke the key from the API Keys page when the client is retired or the key may have been exposed.

Troubleshoot

  • Authorization did not finish: reconnect RunAPI from the client and complete the browser flow again.
  • RunAPI is connected but its tools are missing: confirm the server is enabled, remove and add the exact endpoint again, then start a new conversation.
  • The verification question fails: check the client log described in its section above, then reconnect RunAPI before retrying.

Need a client to start RunAPI on your machine instead? Set up Local MCP.