Integration Guide

Learn how to integrate MCPHub-hosted MCP servers into your applications and AI workflows.

🖥️ Claude Desktop Integration

The most common integration is with Claude Desktop. Here's how to add MCP servers:

1. Locate Configuration File

# macOS
~/Library/Application Support/Claude/claude_desktop_config.json

# Windows
%APPDATA%\Claude\claude_desktop_config.json

2. Add MCP Server Configuration

{
  "mcpServers": {
    "search": {
      "url": "https://api.mcphub.com/slug/mcphub-com-llm-search",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    },
    "memory": {
      "url": "https://api.mcphub.com/slug/basicmachines-co-basic-memory"
    }
  }
}

3. Restart Claude Desktop

After saving the configuration file, restart Claude Desktop to load the new MCP servers.

🔧 Custom Applications

Using the MCP SDK

npm install @modelcontextprotocol/sdk
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';

// Connect to MCPHub-hosted server
const client = new Client({
  name: "my-application",
  version: "1.0.0"
});

await client.connect({
  url: "https://api.mcphub.com/slug/server-name",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY"
  }
});

// List available tools
const tools = await client.listTools();
console.log("Available tools:", tools);

// Call a tool
const result = await client.callTool({
  name: "search_web",
  arguments: {
    query: "latest AI news"
  }
});

🔐 Authentication Methods

Header-Based Auth

For servers that don't require user-specific credentials:

{
  "url": "https://api.mcphub.com/slug/server-name",
  "headers": {
    "Authorization": "Bearer YOUR_API_KEY"
  }
}

Path-Based Auth

For servers requiring user credentials (automatic):

{
  "url": "https://api.mcphub.com/auth/YOUR_API_KEY/server-slug"
}

📊 Usage Monitoring

Track your MCP server usage and costs:

  • Request History - View all MCP and LLM requests in Settings
  • Usage Analytics - Monitor token consumption and costs
  • Rate Limits - Track API usage against your limits
  • Error Monitoring - Get alerts for failed requests

🛠️ Development Tools

🔍 Online Inspector

Test MCP server tools directly in the browser with real parameters.

Try Inspector

💬 Online Client

Full chat interface to test MCP servers in conversation context.

Open Client

⚡ Rate Limits

Be mindful of rate limits when integrating. Use caching and request batching for high-volume applications. Monitor your usage in the Request History page.