How to Connect Claude to Any API Using MCP
Want to connect Claude to Stripe, Slack, GitHub, or any other API? The Model Context Protocol (MCP) makes it possible in minutes, not hours. This step-by-step guide shows you exactly how to set up an MCP server with Claude using 0nMCP, giving your AI assistant the power to interact with 54 real-world services.
Why Connect Claude to APIs?
Claude is one of the most capable AI models available, but out of the box it can only process text. It cannot send emails, create invoices, update your CRM, or deploy code. To make Claude truly useful for business operations, you need to connect it to your existing tools and services.
Traditionally, this meant building custom API integrations for each service. With MCP, you install a single server and Claude gains access to over a thousand tools automatically.
Prerequisites
Before you start, you will need:
- Node.js 18 or later installed on your machine
- An MCP-compatible AI client: Claude Desktop, Claude Code, Cursor, Windsurf, or any other client that supports MCP
- API keys for the services you want to connect (Stripe, Slack, etc.)
Step 1: Install 0nMCP
0nMCP is the universal MCP server that connects Claude to 54 services. Install it globally:
npm install -g 0nmcp
Verify the installation:
0nmcp --version
You should see the current version number (v2.5.0 or later).
Step 2: Import Your API Credentials
0nMCP includes a credential import engine that reads your existing .env files, CSV exports, or JSON configs and maps them to the right services automatically:
0nmcp engine import
This command will:
- Scan for existing credential files in your project
- Auto-detect which services each key belongs to (Stripe, Slack, GitHub, etc.)
- Store them securely in your
~/.0n/connections/directory - Encrypt sensitive values using AES-256-GCM
You can also manually create connection files. Each service gets a .0n file in ~/.0n/connections/:
{
"service": "stripe", "credentials": { "api_key": "sk_live_...", "webhook_secret": "whsec_..." }, "environment": "production" }
Step 3: Verify Your Connections
Before connecting to Claude, verify that your API keys actually work:
0nmcp engine verify
This tests each connection by making a lightweight API call to each service. You will see a status report showing which services are connected and ready.
Step 4: Configure Claude Desktop
Now connect 0nMCP to Claude Desktop. Generate the configuration automatically:
0nmcp engine platforms
This outputs configuration snippets for every major AI platform. For Claude Desktop, add this to your claude_desktop_config.json:
{
"mcpServers": { "0nMCP": { "command": "npx", "args": ["-y", "0nmcp"] } } }
Restart Claude Desktop, and you will see 0nMCP listed as an available MCP server with all its tools.
Step 5: Start Using Claude with Your APIs
Once connected, Claude can discover and use all available tools. Try these prompts:
- "Send a Slack message to the #general channel saying the deployment is complete"
- "Create a Stripe invoice for $500 for customer cus_abc123"
- "List all open GitHub issues in my repository"
- "Send an email via SendGrid to team@company.com with the weekly report"
Claude will automatically select the right tool, format the parameters, and execute the action. No custom code required.
Using Claude Code with MCP
If you use Claude Code (the CLI), the setup is even simpler. Add 0nMCP to your Claude Code MCP configuration:
{
"mcpServers": { "0nMCP": { "type": "stdio", "command": "node", "args": ["/path/to/0nmcp/index.js"] } } }
Now every Claude Code session has access to all 1,171 tools.
Connecting Claude to Cursor or Windsurf
The same MCP server works with Cursor, Windsurf, Continue, Cline, and other MCP-compatible editors. The 0nmcp engine platforms command generates the right config for each platform.
For Cursor, add to your .cursor/mcp.json:
{
"mcpServers": { "0nMCP": { "command": "npx", "args": ["-y", "0nmcp"] } } }
Advanced: Running 0nMCP as an HTTP Server
For production deployments or multi-user setups, run 0nMCP as an HTTP server:
0nmcp serve --port 3100 --host 0.0.0.0
This exposes MCP over HTTP, letting multiple AI clients connect to the same server instance. It also enables webhook receivers for real-time event handling from Stripe, GitHub, Slack, and other services.
Security Considerations
0nMCP takes security seriously:
- 0nVault encryption: All credentials are encrypted with AES-256-GCM and PBKDF2-SHA512
- Machine binding: Vault files are bound to your hardware fingerprint, so they cannot be used on another machine
- Rate limiting: Built-in token bucket rate limiting prevents accidental API abuse
- Webhook verification: HMAC signature verification for Stripe, GitHub, Slack, Twilio, and Shopify webhooks
Troubleshooting Common Issues
Claude does not see the MCP tools: Make sure you restarted Claude Desktop after updating the config file. Check that the npx command is in your system PATH.
Authentication errors: Run 0nmcp engine verify to check which keys are valid. Expired or rotated keys need to be updated in ~/.0n/connections/.
Rate limiting: If you hit API rate limits, 0nMCP automatically applies exponential backoff. For high-volume use cases, consider running the HTTP server with connection pooling.
What Can You Build?
With Claude connected to your APIs via MCP, the possibilities are extensive:
- Customer support agents that look up orders, process refunds, and update tickets
- Sales assistants that qualify leads, schedule meetings, and send follow-ups
- DevOps automation that monitors deployments, manages infrastructure, and responds to incidents
- Content pipelines that generate, schedule, and publish across platforms
The key insight is that Claude does not just answer questions about these tasks. It actually performs them, in real time, through your real APIs.
Visit 0nmcp.com to explore the full list of supported services and capabilities.
Get started with 0nMCP — npm install -g 0nmcp