The Narrative MCP Server for Agents is a remote Model Context Protocol (MCP) server that lets AI agents like Claude explore datasets, kick off queries, refresh materialized views, and manage your Narrative account — all from a single conversation. Instead of switching between a chat window and the Narrative UI, you tell the agent what you need and it operates the platform on your behalf.Documentation Index
Fetch the complete documentation index at: https://docs.narrative.io/llms.txt
Use this file to discover all available pages before exploring further.
What is MCP?
MCP is an open protocol that standardizes how AI applications connect to external tools and data sources. It defines a universal interface so that any MCP-compatible AI client — Claude Code, Claude Desktop, Cursor, Windsurf, and others — can discover and call tools exposed by an MCP server. The protocol handles:- Tool discovery. The client asks the server what tools are available and receives their names, descriptions, and parameter schemas.
- Authentication. OAuth-based flows let the server verify your identity without you sharing API keys with the AI client.
- Tool execution. The client calls a tool on your behalf, and the server returns structured results that the AI can reason about.
Why use an AI assistant with Narrative?
Working with data collaboration platforms often involves switching between multiple screens — searching for datasets, inspecting schemas, writing queries, monitoring jobs. An AI assistant connected via MCP can compress these multi-step workflows into a conversational loop:- Explore datasets naturally. Ask “what datasets do I have about mobile identifiers?” instead of navigating through the UI. The assistant searches, describes schemas, and summarizes what it finds.
- Write and validate NQL iteratively. Describe what you want in plain language, and the assistant drafts NQL, validates it against your schema, and fixes errors before submitting — all without you writing a query from scratch.
- Operate on datasets without context-switching. Trigger samples, refresh materialized views, and recalculate statistics through conversation. The assistant polls job status and reports when operations complete.
- Work across companies. If you belong to multiple companies, the assistant can switch context on your behalf, making cross-tenant operations seamless.
How it works
The Narrative MCP server sits between your AI client and the Narrative API:- You connect once. Add the server URL to your AI client’s MCP configuration. The first time the assistant calls a tool, a browser window opens for you to log in with your Narrative credentials.
- The assistant discovers tools. On connection, the client fetches the list of available tools — dataset operations, NQL execution, attribute search, and more.
- Tools call the Narrative API. When the assistant uses a tool, the MCP server translates the request into the appropriate Narrative API calls, using your authenticated session.
- Results flow back as context. The server returns structured responses that the assistant incorporates into the conversation, so it can chain operations (e.g., describe a dataset, then write a query against it).
Available tools
The server organizes its tools into five categories:| Category | What you can do |
|---|---|
| Context | List your companies, switch the active company, search companies by name |
| Datasets | Search and describe datasets, inspect column statistics, configure stats collection |
| Dataset operations | Request samples, refresh materialized views, recalculate statistics |
| Attributes | Search and describe Rosetta Stone attributes |
| NQL | Validate queries, submit for execution, poll job status |
Getting started
To connect your AI assistant to Narrative, follow the setup guide for your client:Connecting to the Narrative MCP Server
Step-by-step setup for Claude Code, Claude Desktop, Cursor, and other MCP clients
Tool Reference
Complete catalog of available tools with parameters and usage patterns

