Prerequisites
- A Narrative account with access to at least one company
- An MCP-compatible AI client installed (see supported clients below)
Server URL
All clients connect to the same endpoint:Setup by client
- Claude Code
- Claude Desktop
- Cursor
- Windsurf
- Other clients
Run the following command in your terminal:This registers the Narrative MCP server in your Claude Code configuration. The next time Claude calls a Narrative tool, a browser window opens for you to authenticate.To verify the server is registered:You should see
narrative in the output with the server URL.Authenticate
The MCP server accepts two kinds of bearer credential in theAuthorization header:
- OAuth login (interactive clients). A standard OAuth flow exchanges your Narrative login for a scoped session token. This is what Claude Code, Claude Desktop, Cursor, and Windsurf use by default.
- Narrative API token (programmatic clients). Long-lived API tokens are accepted directly, which lets server-to-server callers and scripted MCP clients connect without a browser-based login.
OAuth (default for interactive clients)
The first time your assistant calls a Narrative tool, the MCP server initiates an OAuth login:- A browser window opens with the Narrative login page.
- Sign in with your Narrative credentials.
- Return to your AI client — the session is now authenticated.
Narrative API token (for programmatic clients)
If your MCP client supports a static bearer token, you can authenticate with a Narrative API key instead of OAuth. Set theAuthorization header on every MCP request:
If you belong to multiple companies, the server defaults to your primary company. Ask the assistant to switch companies during the conversation — for example, “switch to Acme Corp” — and it will use the
narrative_context_set_company tool.Verify the connection
After setup, test the connection by asking your assistant something like:“What companies do I have access to on Narrative?”The assistant should call
narrative_context_get_companies and return a list of your companies. If you see results, the connection is working.
Troubleshooting
Browser window doesn’t open
Some terminal environments block browser launches. If the OAuth login window doesn’t appear:- Check that your default browser is configured correctly.
- Try opening the server URL directly in a browser to confirm network access:
https://mcp.narrative.io/mcp
Tools not appearing
If your AI client doesn’t show Narrative tools:- Verify the server URL is exactly
https://mcp.narrative.io/mcp(no trailing slash). - Restart your AI client after adding the server configuration.
- Check your client’s MCP logs for connection errors.
Session expired
If tool calls start failing with authentication errors, your session may have expired. Ask the assistant to retry — the server will prompt you to log in again.What’s next
Data Collaboration MCP Server
Understand how the MCP server works and what it enables
Tool Reference
Browse the complete catalog of available tools
NQL Guide
Learn NQL basics to get more from query tools
Dataset Statistics
Configure column statistics that the MCP server can read and trigger

