Anakin
← Back to Knowledge Base

Model Context Protocol (MCP) Integration

Learn how to connect custom tools and external platforms to your agents securely using the Model Context Protocol.

Model Context Protocol (MCP) Integration

Anakin supports connecting your agents directly to any remote service that implements the Model Context Protocol (MCP) via Server-Sent Events (SSE) or HTTP POST (JSON-RPC 2.0). This allows you to give your agents deep, live access to your external infrastructure—like GitHub, Jira, custom internal APIs, or databases—without writing custom Anakin extensions.


1. What is MCP?

The Model Context Protocol is a standardized way for AI models to request context, read data, and execute tools on remote servers. By connecting an MCP server, your Anakin agent instantly inherits all the tools exposed by that server.

For example, if you connect the GitHub MCP Server, your agent instantly gains the ability to read repositories, search code, and create issues.


2. Connecting an MCP Server to Your Agent

You can map specific MCP servers to individual agents or autonomous systems.

1. Open your Agent Workspace from the Dashboard.

2. Select your agent.

3. Navigate to the Settings tab (or the Environment tab in Systems).

4. Scroll down to the MCP Servers section.

5. Enter the Server Name (e.g., GitHub MCP) and the Endpoint URL (e.g., https://mcp-github.example.com/mcp).

6. (Optional) Click + Add Custom Auth Headers to supply Bearer tokens or custom API keys in JSON format.

7. Click Test Connection to verify reachability and inspect discovered tools.

8. Click Add Server.

Once added, the agent's background worker will handshake with the MCP server and register its available tools. The agent will then seamlessly use these tools during live conversations, workflows, and autonomous system runs.


3. Common Use Cases

A. Developer Assistants

Connect your internal GitLab or GitHub MCP servers to your Support Agent. When a customer reports a bug, the agent can instantly search the codebase, check recent commits, and draft a relevant Jira ticket—all via the MCP tools.

B. Internal Tool Integration

Do you have a custom proprietary database or internal BI tool? Wrap it in an MCP server (built in Python or TypeScript) and deploy it to your infrastructure. Connect Anakin to its endpoint. Now your agent can securely query your internal systems without exposing your database directly to the public web.

C. Agent Swarms & Autonomous Systems

Multiple agents and systems can connect to different, specialized MCP servers. You can design an architecture where a Coordinator delegates tasks to a "DevOps Specialist" (connected to AWS MCP) and a "Sales Specialist" (connected to Salesforce MCP).


4. Security & Best Practices

  • HTTPS Connectivity: Ensure your MCP server is accessible from Anakin's cloud infrastructure over HTTPS.
  • Authentication: Custom headers (e.g., {"Authorization": "Bearer sk-..."}) are fully supported. Pass secret tokens in the headers input when configuring the connection.
  • Testing & Verification: Use the built-in Test Connection button to inspect discovered tool signatures before activating the server.
  • Tool Limitations: Ensure the MCP tools you expose do not conflict with the agent's built-in sandbox tools. Give your MCP tools clear, distinct descriptions so the agent's router knows when to invoke them.