APIFold

Configure Your MCP Server

After importing a spec and creating a server, you can fine-tune its behavior from the Server Config page.

Authentication Modes

Control how your MCP server authenticates with the upstream API.

ModeDescriptionUse Case
NoneNo authenticationPublic APIs, development
API KeySends an x-api-key headerMost API providers
Bearer TokenSends an Authorization: Bearer <token> headerOAuth-based APIs

To set up authentication:

  1. Navigate to your server's config page
  2. Select the auth mode
  3. Add a credential with your API key or token

Credentials are encrypted at rest using AES-256-GCM and never logged or exposed in API responses.

Base URL

The upstream API endpoint that your MCP server proxies requests to. This should be the root URL of your API (e.g., https://api.example.com/v1).

Rate Limiting

Protect your upstream API by setting a requests-per-minute (RPM) limit on your MCP server. When the limit is exceeded, tool calls return a rate limit error with a Retry-After hint.

Default: 60 requests per minute.

Tool Management

From the Tools page, you can:

  • Enable/Disable individual tools — disabled tools are hidden from AI clients
  • View Input Schema — see the JSON Schema that defines each tool's parameters
  • Test Tools — use the Console to send test requests

This is useful for:

  • Hiding administrative or destructive endpoints
  • Focusing the AI on a subset of your API
  • Testing new operations before exposing them

Connection Snippets

The server config page provides ready-to-copy configuration snippets for:

  • Claude Desktopclaude_desktop_config.json format with npx @modelcontextprotocol/server-sse-client
  • Cursor.cursor/mcp.json format with direct URL

Each snippet is pre-filled with your server's slug and domain.

Code Export

For advanced use cases, you can export your configured MCP server as a standalone TypeScript file.

  • What it generates: A self-contained Express server file that includes all your tool definitions, authentication logic, and upstream proxy configuration.
  • How to use: Click the "Export Code" button on your server's configuration page.
  • What you get: A single .ts file that you can compile with tsc and run anywhere with Node.js.

Requirements for running exported code:

  • Node.js 20+
  • npm install express cors express-rate-limit

On this page