MCP Server (Model Context Protocol)
Let AI assistants query your data directly.
MCP (Model Context Protocol) is an open standard that lets AI assistants like ChatGPT and Claude connect directly to external tools and data sources. Enable MCP on any csv-api dataset and your data becomes a first-class tool that AI can query, filter, aggregate, and run SQL against — no copy-pasting, no manual context, no prompt engineering.
What it does
When you enable MCP on a dataset, csv-api exposes a standards-compliant MCP server endpoint for that dataset. AI assistants discover the endpoint, authenticate via OAuth 2.0 with PKCE, and get access to four tools: get_schema (understand the columns), query_data (filter, sort, paginate), aggregate_data (counts, sums, averages by group), and sql_query (read-only SQL). The AI decides which tools to call based on your conversation — you just ask questions in plain English.
How it works
-
1
Enable MCP on your dataset
Open your dataset page and click the MCP toggle. This activates the MCP endpoint at /api/v1/datasets/:id/mcp.
-
2
Add the URL to your AI assistant
Copy the MCP server URL from your dataset page and paste it into ChatGPT, Claude Desktop, or any MCP-compatible client. The client handles discovery and authentication automatically.
-
3
Authorize access
Your AI client opens a browser window where you sign in and approve access. This uses standard OAuth 2.0 with PKCE — the AI never sees your password, and you can revoke access anytime.
-
4
Ask questions about your data
Start a conversation with your AI assistant and ask about your data. The AI calls the right tools behind the scenes — schema lookups, filtered queries, aggregations, or SQL — and returns the answer in natural language.
See it in action
You: "What are the top 5 cities by number of customers?"
AI: I'll query your customers dataset to find out.
[Calls get_schema to understand columns]
[Calls aggregate_data with metric=count, group_by=city]
Here are the top 5 cities by customer count:
1. Portland — 142
2. Seattle — 98
3. Denver — 87
4. Austin — 76
5. Chicago — 71
Why it matters
-
No prompt engineering
You don't need to paste data into prompts or describe your schema. The AI discovers columns, types, and row counts automatically via get_schema.
-
Per-dataset authorization
Each dataset gets its own OAuth session. You control exactly which datasets each AI client can access, and you can revoke any session instantly.
-
Standards-based
MCP is an open protocol supported by Anthropic, OpenAI, and a growing ecosystem. Any MCP-compatible client works with csv-api out of the box.
-
Rate-limited and audited
MCP queries count against your plan's hourly quota. Every tool call is tracked so you can monitor usage from your dashboard.
The problem it solves
AI assistants are powerful analysts, but feeding them data is clumsy. You either paste CSV rows into prompts (hitting token limits and losing context), or build custom integrations for each AI tool. MCP eliminates this friction — enable it once and every compatible AI assistant can query your data securely.
Common use cases
-
Asking an AI assistant to analyze trends in your sales or customer data without exporting anything
-
Building AI-powered internal tools that query live datasets through natural conversation
-
Letting non-technical teammates explore data by chatting with Claude or ChatGPT
-
Prototyping AI agents that need structured data access with proper authentication
Try MCP Server (Model Context Protocol) for yourself
Create a free csv-api account, upload a file, and see your API live in under a minute.