What is MCP?
Model Context Protocol (MCP) is an open standard that lets AI agents discover and call external tools. Datagate provides MCP servers that expose dataset discovery and querying as tools — no integration code needed.When to use MCP vs SDK
| Use case | Use |
|---|---|
| Claude Desktop, Claude Code, or any MCP-compatible agent | MCP server |
| Custom Python/TypeScript application | SDK |
| Building your own agent framework | SDK (or MCP if your framework supports it) |
How the packages relate
datagate) is the foundation — a Python/TypeScript client that calls the Datagate API directly. It returns typed objects and gives you full control.
The MCP server (datagate-mcp) is a wrapper that imports the SDK and exposes its methods as MCP tools. When you install datagate-mcp, the SDK is automatically installed as a dependency.
You can use either one independently:
- SDK only (
pip install datagate) — for custom apps and agents where you want typed responses - MCP only (
pip install datagate-mcp) — for Claude Desktop, Claude Code, or MCP-compatible frameworks (SDK comes along automatically)
Available Packages
| Package | Language | Install | Run |
|---|---|---|---|
datagate-mcp | Python | pip install datagate-mcp | uvx datagate-mcp |
@datagate/mcp | TypeScript | npm install @datagate/mcp | npx -y @datagate/mcp |
Tools Exposed
list_datasets
CallsGET /v1/datasets/discover. Returns all visible datasets with:
- Name, ID, seller, description
- Price per chunk
- Queryable/subscribed status
- Metadata schema (available filter fields)
query
CallsPOST /v1/query. Parameters:
dataset_ids(required) — which datasets to searchtext(required) — natural language querytop_k(optional, default 10) — max resultsfilters(optional) — per-dataset metadata filters
How an Agent Uses It
- Agent starts → spawns MCP server → discovers
list_datasetsandquerytools - User asks “What datasets are available?” → agent calls
list_datasets - User asks “Find privacy policy precedents” → agent calls
querywith dataset IDs and text, using metadata filters from step 2 - Agent reads results and summarizes for the user