Skip to main content

MCP Hub Integration

New to building integrations? Start with our step-by-step contributor guide for a quick overview.
The MCP Hub allows integrations to expose tools that AI agents can use. This reference guide covers MCP configuration and tool implementation.

What is MCP Hub?

The MCP (Model Context Protocol) Hub is a centralized way for integrations to expose tools to AI agents. When an integration connects an MCP server, those tools become available to any AI agent using Core. Example flows:
  • Agent uses GitHub integration’s create_issue tool to file a bug
  • Agent uses Slack integration’s send_message tool to notify a team
  • Agent uses Linear integration’s create_task tool to assign work

MCP Configuration

Configure MCP in your integration’s spec.json:

HTTP-based MCP

For services with existing HTTP MCP servers:
Key points:
  • type: "http" - Specifies HTTP transport
  • url - The MCP server endpoint
  • headers - HTTP headers for authentication and configuration
  • ${config:access_token} - Placeholder replaced with user’s OAuth token at runtime
  • Any ${config:key} placeholder pulls from the user’s integration config

Stdio-based MCP

For command-line MCP servers:
Key points:
  • type: "stdio" - Specifies stdio transport (command-line)
  • url - Binary/executable URL or path
  • args - Command-line arguments array
  • env - Environment variables passed to the process
  • Placeholders work in env vars too

Configuration Placeholders

The ${config:key} syntax pulls values from the user’s integration configuration:

Setup Phase

When user completes OAuth, you set the config:

Runtime Phase

Core replaces placeholders when connecting to MCP server:

HTTP MCP Server Example (GitHub)

spec.json

Available Tools

When Core connects to GitHub’s MCP server, these tools become available:
  • github_create_issue - Create a new issue
  • github_search_code - Search code across repositories
  • github_create_pull_request - Create a new PR
  • github_list_commits - List commits for a repository
Agents can now call these tools:

Stdio MCP Server Example (Slack)

spec.json

Available Tools

The Slack MCP server exposes:
  • slack_send_message - Send message to channel
  • slack_list_channels - List workspace channels
  • slack_add_reaction - React to a message
  • slack_get_users - Get workspace users

Building Your Own MCP Server

If your service doesn’t have an existing MCP server, you can build one:

1. Use the MCP SDK

2. Authentication

Get tokens from environment variables:

3. Expose in spec.json

MCP Tool Best Practices

1. Clear Tool Descriptions

2. Return Structured Data

3. Error Handling

4. Rate Limiting

Testing MCP Tools

1. Test with MCP Inspector

2. Test with Claude Desktop

Add to Claude Desktop config:

3. Test Tool Calls

Common Patterns

Dynamic Tool Listing

Generate tools based on user’s account:

Composite Actions

Combine multiple API calls into one tool:

Security Considerations

  1. Token Scoping - Only request OAuth scopes needed for MCP tools
  2. Input Validation - Validate all tool parameters before use
  3. Rate Limiting - Implement rate limits to prevent abuse
  4. Error Messages - Don’t expose sensitive data in error messages
  5. Token Storage - Tokens are securely encrypted in Core’s database

Next Steps