MCP Hub
API Endpoint
The MCP Hub endpoint is:
https://app.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
brew tap civicteam/tap
brew install hub-bridge
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"
notepad %APPDATA%\Claude\claude_desktop_config.json
If you need other builds, contact us.
open ~/.config/Claude/claude_desktop_config.json
If you need other builds, contact us.
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 { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { getTokens } from "@civic/auth/nextjs";
const createMCPClient = async () => {
// Get access token
const { accessToken } = await getTokens();
if (!accessToken) {
throw new Error('No access token available. User needs to authenticate.');
}
// Create transport with authentication
const transport = new StreamableHTTPClientTransport(
'https://app.civic.com/hub/mcp',
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
'Content-Type': 'application/json'
}
}
}
);
// Initialize MCP client
const client = new Client({
name: 'my-app',
version: '1.0.0'
}, {
capabilities: {}
});
await client.connect(transport);
return client;
};
For complete Vercel AI SDK integration examples, see our detailed Vercel AI SDK guide.
3. n8n Workflow Integration
Build AI-powered workflows with n8n and Civic Labs.
Prerequisites
- Import the example workflow into your n8n instance
- Configure your AWS Bedrock credentials in n8n (or use another AI model)
- 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://app.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
- MCP Protocol Documentation
- API Reference (request access)
Contact us for detailed API documentation and support.