Skip to main content
The MCP Server provides a standardized interface for agents to communicate with the DataDot backend.

Tech Stack

FastMCP

High-level SDK for implementing the Model Context Protocol.

FastAPI

Underlying ASGI framework handling HTTP and SSE connections.

SSE

Server-Sent Events for streaming real-time responses to agents.

Stdio

Standard Input/Output transport for local CLI-based agent integration.

Pydantic

Strict schema validation for settings and tool arguments.

HTTPX

Async HTTP client for communicating with the main DataDot backend.

Interaction Flow

The interaction between an Agent and the backend is mediated by the MCP server.

MCP Interaction Flow

Authentication

Security is a primary concern. The MCP server acts as a proxy that validates credentials before allowing access to private data.

1. API Key Validation

Incoming tool requests must include an X-API-Key (or be pre-configured with APP_API_KEY).
  1. The MCP server intercepts the request.
  2. It calls POST {BACKEND_URL}/api/v1/system/validate-api-key.
  3. The backend verifies if the key is valid and which Workspace it belongs to.

2. Workspace Context

After successful validation, the backend returns a Workspace Slug or ID. This context is injected into the tool execution, ensuring that the agent only accesses data it is authorized to see.