API Endpoint

The MCP Hub endpoint is:
https://ai.civic.com/hub/mcp

Authentication

The MCP Hub supports multiple authentication methods:

Bearer Token (Civic Auth)

For user-facing applications using Civic Auth OAuth2 flow:
headers: {
  'Authorization': `Bearer ${accessToken}`
}

API Key

For server-to-server communication:
headers: {
  'Authorization': `Bearer ${process.env.MCP_API_KEY}`
}
Contact us to obtain an API key.

Integration Methods

1. Claude Desktop Integration

Connect Claude Desktop to Civic MCP Hub using the Hub Bridge.

Installation (MacOS)

  npx @civic/hub-bridge install claude-desktop

Manual Configuration (PC, Linux etc)

Add the following to your Claude Desktop configuration:
open "~/Library/Application Support/Claude/claude_desktop_config.json"
Add this configuration:
{
  "mcpServers": {
    "civic": {
      "command": "npx",
      "args": ["@civic/hub-bridge"]
    }
  }
}

2. Vercel AI SDK Integration

Use the MCP Hub with Vercel AI SDK for building AI applications.
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
import { getTokens } from "@civic/auth/nextjs";

// Get access token
const { accessToken } = await getTokens()

// Create MCP client
const createMCPClient = async () => {
  const transport = new StreamableHTTPClientTransport(
    'https://ai.civic.com/hub/mcp',
    {
      requestInit: {
        headers: {
          Authorization: `Bearer ${accessToken}`
        }
      }
    }
  );

  return createMCPClient({
    transport
  });
};

3. n8n Workflow Integration

Build AI-powered workflows with n8n and Civic Labs.

Prerequisites

  1. Import the example workflow into your n8n instance
  2. Configure your AWS Bedrock credentials in n8n (or use another AI model)
  3. Contact us to obtain an API key for the MCP Hub

Setup

Add your MCP Hub API key as a Header Auth credential in n8n:
{
  "name": "Authorization",
  "value": "Bearer YOUR_API_KEY"
}
The workflow demonstrates:
  • Calling MCP Hub API endpoints
  • Integrating with AI models
  • Building conversational agents with MCP tools
  • Error handling and retries

4. Direct API Integration

For custom integrations, use the MCP Hub API directly:
// List available MCP servers
const response = await fetch('https://ai.civic.com/hub/mcp', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'tools/list',
    params: {},
    id: 1,
  }),
});

const result = await response.json();
console.log('Available tools:', result.result.tools);

Additional Resources

Contact us for detailed API documentation and support.