Documentation
Everything you need to integrate MCP servers into your workflow
On this page
Quick Start
Get connected to your first MCP server in under 2 minutes.
Create an account
Sign up at MCPHub. You get 500 free API calls per month instantly.
Browse & subscribe
Find a server on the Browse page and click Subscribe. You'll get a unique API key.
Copy the config
From your Dashboard, click Connect on any subscription to get a ready-to-paste config snippet.
Paste into your AI client
Add the config to your Cursor, Claude Desktop, or VS Code MCP settings file.
Consumer Guide
How to discover, subscribe, and connect MCP servers to your AI clients.
Cursor Configuration
Add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"my-server": {
"url": "https://mcphub.io/api/gateway/{YOUR_API_KEY}/mcp",
"transport": "streamable-http"
}
}
}Claude Desktop Configuration
Add to claude_desktop_config.json:
{
"mcpServers": {
"my-server": {
"url": "https://mcphub.io/api/gateway/{YOUR_API_KEY}/mcp",
"transport": "streamable-http"
}
}
}API Key Management
- Each subscription generates a unique API key
- Keys are visible in your Consumer Dashboard under each subscription
- You can reveal, copy, or rotate keys from the dashboard
- Never share your API keys — they are tied to your account and usage limits
Provider Guide
How to build, publish, and monetize MCP servers on MCPHub.
1. Build your MCP server
Your server must implement the MCP protocol and expose a Streamable HTTP endpoint. Here's a minimal example using the official SDK:
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
import express from "express";
const app = express();
app.use(express.json());
function createServer() {
const server = new McpServer({
name: "My MCP Server",
version: "1.0.0",
});
server.tool("hello", "Says hello", {
name: { type: "string", description: "Your name" },
}, async ({ name }) => ({
content: [{ type: "text", text: `Hello, ${name}!` }],
}));
return server;
}
const sessions = new Map();
app.post("/mcp", async (req, res) => {
const sessionId = req.headers["mcp-session-id"];
let transport;
if (sessionId && sessions.has(sessionId)) {
transport = sessions.get(sessionId);
} else {
transport = new StreamableHTTPServerTransport({ sessionIdGenerator: () => crypto.randomUUID() });
const server = createServer();
await server.connect(transport);
sessions.set(transport.sessionId, transport);
}
await transport.handleRequest(req, res, req.body);
});
app.listen(8080, () => console.log("MCP server on :8080"));2. Create a Dockerfile
FROM node:20-slim WORKDIR /app COPY package.json . RUN npm install --production COPY . . EXPOSE 8080 CMD ["node", "server.mjs"]
3. Submit on MCPHub
- Go to the Provider Dashboard and click "Submit Server"
- Provide your Docker image URL and GitHub repo (optional)
- Set your pricing model (free, per-call, or monthly)
- We deploy to Fly.io with scale-to-zero automatically
- Servers go live after admin approval
4. Connect Stripe for payouts
Set up Stripe Connect from your Provider Dashboard to receive 80% of all revenue. Payouts are processed on the 1st of each month.
Gateway API
All MCP traffic flows through our authenticated gateway.
/api/gateway/{apiKey}/mcpProxies MCP protocol requests to the upstream server. Handles auth, metering, and billing automatically.
Example: Call a tool
curl -X POST https://mcphub.io/api/gateway/{API_KEY}/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "echo",
"arguments": { "message": "Hello!" }
}
}'Rate Limits
| Plan | Monthly Calls | Subscriptions |
|---|---|---|
| Free | 500 | 1 |
| Developer ($19/mo) | 50,000 | 10 |
| Pro ($99/mo) | 500,000 | Unlimited |
| Enterprise | Unlimited | Unlimited |
Error Responses
| Code | Meaning |
|---|---|
| 401 | Invalid or inactive API key |
| 429 | Monthly call limit reached |
| 502 | Upstream server unreachable |
| 503 | Server waking up (retry in 2-5s) |
Playground
Try any MCP server for free before subscribing.
- 10 free calls per session, no account required
- Select any tool, fill in parameters, and see the response live
- View response latency and copy results
- Access via the "Try in Playground" button on any server detail page
Billing & Plans
MCPHub uses a tiered plan system for consumers and a revenue-sharing model for providers.
Consumer Plans
Your plan determines how many API calls you can make per month across all subscribed servers. Upgrade anytime from your dashboard.
Provider Revenue
- Hosting is free — MCPHub covers all compute costs
- Set your own pricing (free, per-call, or monthly)
- You keep 80% of revenue, MCPHub takes 20%
- Payouts via Stripe Connect on the 1st of each month
SDK & Libraries
Use the official MCP SDK to build servers, or call our gateway directly.
Install the MCP SDK
npm install @modelcontextprotocol/sdk
Discovery API
AI agents can discover MCP servers programmatically:
GET /api/discover?category=CODE&budget=0.01&limit=5 // Returns matching servers with tools, pricing, and endpoints
See the full API Reference for all endpoints.
Ready to get started?
Browse servers or publish your own — it takes less than 2 minutes.