Skip to content

Connecting MCP Servers

What is MCP?

The Model Context Protocol (MCP) is an open standard that enables AI models to interact with external data and tools. Instead of building custom integrations for every tool (GitHub, Slack, Notion) into every AI model, MCP provides a universal language for connection.

In Agent Bridge, the server acts as an MCP Client. It connects to one or more MCP Servers, discovers their tools, and exposes them to the AI Agent.

Adding a New MCP Server (Frontend)

Step 1: Open Settings

  1. Click on Settings in the sidebar
  2. Navigate to the Connections tab

Step 2: Choose a Preset (Optional)

Use the Load Preset dropdown to autofill settings for popular providers:

  • Notion - Official Notion MCP Server
  • GitHub - Official GitHub MCP Server

Selecting a preset will automatically fill in the Server Name, URL, and OAuth requirements.

Step 3: Fill in Server Details

FieldDescriptionRequired
Server NameA friendly name for this connection (e.g., "My GitHub")Yes
Server URLThe HTTP(S) endpoint for the MCP serverYes
DescriptionNotes about this server or its purposeNo

Step 4: Configure OAuth (If Required)

If the server requires authentication, toggle Requires OAuth? and fill in:

FieldDescription
Client IDYour OAuth application's Client ID
Client SecretYour OAuth application's Client Secret
ScopePermission scopes (e.g., read:user)

Need credentials? Refer to the official documentation for Notion or GitHub.

Advanced Options (toggle to reveal):

  • Authorization URL - Manual OAuth authorize endpoint
  • Token URL - Manual OAuth token endpoint

Agent Bridge will attempt to discover these automatically from the Server URL.

Step 5: Save

  • Without OAuth: Click Test Connection to verify, then Save Connection
  • With OAuth: Click Authenticate & Connect to open the OAuth popup

Managing Existing Servers

From the Connections tab, you can:

  • Configure - View and manage individual tools (enable/disable)
  • Reconnect - Refresh tokens and verify connection
  • Delete - Remove the server configuration
  • Toggle - Enable/disable the server without deleting

Connection Types (Technical)

1. Remote Servers (SSE/HTTP)

Remote servers run as independent web services. This is the primary and recommended method for connecting to all MCP servers.

Example Preset (from servers.json):

json
{
  "presets": {
    "Notion": {
      "server_url": "https://mcp.notion.com/mcp",
      "description": "Official Notion MCP Server.",
      "requires_oauth": true
    }
  }
}

2. Local Servers (via HTTP Proxy)

Why HTTP, not Stdio?
Agent Bridge is designed for full containerization. Running stdio-based MCP servers as subprocesses would break in Docker/Kubernetes environments. Instead, expose local MCP servers as HTTP endpoints.

How It Works:

  1. Run your local MCP server with an HTTP/SSE wrapper
  2. Expose it on a local port (e.g., http://localhost:8002/sse)
  3. Add it to Agent Bridge like any remote server

Example: Exposing a Filesystem MCP Server

bash
npx @anthropic-ai/mcp-server-sse-adapter -- npx @modelcontextprotocol/server-filesystem /path/to/directory

Then add via the UI with URL: http://localhost:8002/sse

Benefits:

  • Container-friendly (Docker/Kubernetes)
  • Decoupled architecture
  • Consistent HTTP/SSE interface

Pre-configured Server Presets

ServerURLOAuth Required
Notionhttps://mcp.notion.com/mcpYes
GitHubhttps://api.githubcopilot.com/mcp/Yes

API Reference

EndpointMethodDescription
/api/mcp/settings/GETList all configured servers
/api/mcp/settings/POSTAdd a new server
/api/mcp/settings/{id}PATCHUpdate a server
/api/mcp/settings/{id}DELETEDelete a server
/api/mcp/settings/{id}/reconnectPOSTReconnect/refresh tokens
/api/mcp/presetsGETGet available presets
/api/mcp/test-connectionPOSTTest a server URL

Inspecting Servers

Use the CLI tool to debug connections:

bash
python server/inspect_mcp.py <SERVER_URL>