Connect your agent to Straddle

Connect Claude Code, Cursor, or VS Code to the Straddle API MCP server. Use your Straddle API key as the bearer token. You don't need a Scalar account or token.

For documentation search only, use the install options in the dropdown beside Copy Page. Those connect to Docs MCP, not the API server below. Docs MCP needs no API key and does not execute API requests.

Install Straddle API MCP

  1. Get an API key from the Straddle dashboard.
  2. Set STRADDLE_API_KEY in the environment that starts your client. Use your existing secret manager or environment setup. Don't paste the key into chat or commit it to source control.
  3. Restart your client after setting the variable. For desktop apps, make sure the app inherits the variable, not only its integrated terminal.
Install API MCP in Cursor Install API MCP in VS Code

These buttons open your client's installer and add straddle-api with the API server URL and an environment variable reference for the key. Review the configuration before installing. Keep tool approval prompts enabled. For Claude Code, use the command below.

The API MCP server is not read-only. It exposes four tools: summarize-openapi-specs, search-openapi-operations, search-documentation, and execute-request. execute-request can call any Straddle API operation your key allows, including charge, payout, customer, and paykey creation, DELETE operations, and unmask or paykey reveal operations. New API endpoints become available automatically. Keep approval prompts enabled, and check the method and path of each execute-request call before you approve it.

Connect Claude Code

  1. In your project directory, add straddle-api with Claude Code's MCP command. Local scope keeps the entry private to you in this project.

This command stores an environment variable reference, not your API key. Keep the single quotes around the header so your shell does not expand the variable.

claude mcp add --transport http --scope local \
	straddle-api \
	https://mcp.scalar.com/mcp/d5d1b1c2-ae5b-432d-b795-4fcb31cfdedd \
	--header 'Authorization: Bearer ${STRADDLE_API_KEY}'
  1. Start Claude Code from the same environment.
  2. Enter /mcp. Confirm that straddle-api connects.

Manual setup

Use these configurations if your browser cannot open the install buttons.

Cursor configuration
  1. Open ~/.cursor/mcp.json for a personal configuration, or .cursor/mcp.json for a project configuration.
  2. Merge straddle-api into the existing mcpServers object. Keep all other server entries.

This configuration reads the API key from Cursor's environment. Remote servers do not support envFile.

{
	"mcpServers": {
		"straddle-api": {
			"url": "https://mcp.scalar.com/mcp/d5d1b1c2-ae5b-432d-b795-4fcb31cfdedd",
			"headers": {
				"Authorization": "Bearer ${env:STRADDLE_API_KEY}"
			}
		}
	}
}
  1. In Cursor's Customize page, confirm that straddle-api is enabled and its tools appear.

For more information, see Cursor's MCP configuration guide.

VS Code configuration
  1. In the Command Palette, select MCP: Open User Configuration. For a project configuration, open .vscode/mcp.json instead.
  2. Merge straddle-api into the existing servers object. VS Code uses servers, not mcpServers. Keep all other entries and settings.

This configuration reads the API key from VS Code's environment.

{
	"servers": {
		"straddle-api": {
			"type": "http",
			"url": "https://mcp.scalar.com/mcp/d5d1b1c2-ae5b-432d-b795-4fcb31cfdedd",
			"headers": {
				"Authorization": "Bearer ${env:STRADDLE_API_KEY}"
			}
		}
	}
}
  1. In the Command Palette, select MCP: List Servers. Select straddle-api. Select Start. Review the server trust prompt before accepting.
  2. In chat, open Configure Tools and confirm that the server's tools appear.

For more information, see the VS Code MCP configuration reference and server management guide.

Verify the connection without API requests

  1. Confirm that straddle-api appears in your client's server list and that tool discovery succeeds.
  2. Ask your agent to inspect the API specification without running Straddle API operations.

Use this prompt to limit verification to the specification summary tool.

Use only straddle-api's summarize-openapi-specs tool to summarize the available API specification. Do not run any Straddle API operations or access account data.
  1. Before approving the tool, confirm that its name is summarize-openapi-specs. Expect a summary of the API specification, not account or payment records.

This check verifies the MCP connection and specification access. It does not prove that your API key authorizes a Straddle API request.

If the server does not connect, check the MCP URL and the Authorization header. Use Bearer followed by your Straddle API key, not a Scalar token. Confirm that the client inherited STRADDLE_API_KEY, then restart the server. Use the client's MCP status or output view to inspect errors without sharing the key.