Skip to main content

MCP Overview

MCP (Model Context Protocol) extends the agent's capabilities with external tools. The system consists of a central gateway service and multiple tool servers, each exposing one or more tools.

How It Works

  1. Agent service receives a request with a list of allowed tool names
  2. Agent service calls GET /mcp/v1/tools/list-tools on the MCP gateway to discover available tools
  3. Agent service filters tools to only those allowed in the request
  4. Tool schemas are sent to the LLM as part of the completion request
  5. When the LLM decides to call a tool, agent service calls POST /mcp/v1/tools/call-tool on the gateway
  6. The gateway routes the call to the correct tool server
  7. The tool server executes and returns results
  8. Results are fed back into the LLM conversation

Architecture

agent-service
|
v
mcp-client-service (gateway, port 8000)
|
+---> mcp-rag-tool (port 3002)
+---> mcp-spreadsheet
+---> mcp-web-search
+---> mcp-veo2
+---> mcp-code-execute-python (port 8000)
+---> mcp-atlassian
+---> mcp-ui-components (port 3004)

Tool Server Summary

ServerTool(s)LanguageDescription
mcp-rag-toolsearch_documentsTypeScriptSemantic search through uploaded documents
mcp-spreadsheetanalyze_excel_spreadsheetTypeScriptAnalyze CSV/Excel with natural language
mcp-web-searchweb_searchTypeScriptWeb search, extraction, crawling
mcp-veo2generateVideoFromText, generateImageTypeScriptVideo/image generation (Google Veo2/Imagen)
mcp-code-execute-pythonrun_python_codeTypeScript/DenoSandboxed Python execution (Pyodide)
mcp-atlassianMany (Jira + Confluence)PythonFull Atlassian integration
mcp-ui-componentsui_render, show_weather, etc.TypeScriptInteractive UI in chat

Authentication

The gateway authenticates requests using the x-jeen-mcp-service-secret header. This secret is shared between agent-service and mcp-client-service.

Configuration

In development, tool server endpoints are configured in config.json. In production, configurations are loaded from PostgreSQL.

SDK

All TypeScript MCP servers use a vendored copy of @modelcontextprotocol/sdk v1.23.0-beta.0. Transports supported: stdio, SSE, Streamable HTTP.