Enable and configure the MCP endpoint from Settings -> MCP Endpoint. For step-by-step client setup, see Configure nao MCP endpoint in the admin guide.
Modes
Two modes control which capabilities are exposed. Enable either or both, depending on how much of the workflow you want the external client to drive.
You can enable either mode or both.
Story and chart tools
Whenever either mode is enabled, a shared set of story and chart tools is also exposed:display_chart, list_stories, get_story, archive_story, and delete_story. These let a connected client render charts and manage existing nao stories regardless of which mode drives the workflow.
Long-running analyses
ask_nao waits up to 45 seconds for the agent to finish. If the run completes within that window, the answer comes back directly with status: "complete".
If it does not, ask_nao returns status: "running" with the chatId of the run, which keeps going in the background. The client then calls get_nao_answer with that chatId until status becomes complete or error. This avoids the client request timing out on multi-minute analyses.
The endpoint streams responses over SSE, so progress notifications emitted during a run reach the client while it waits.
Clarifying questions
When the agent needs more information,ask_nao and get_nao_answer return status: "needs_clarification" and a clarification object holding the question and optional options to choose from. Relay it to the user, then call ask_nao again with the same chatId and their answer.
Authentication
nao uses Bearer token authentication. Your token is shown on the MCP Endpoint settings page. Include it in requests:403 response. The endpoint also advertises OAuth protected-resource metadata, so clients that support it can authenticate through the standard MCP OAuth flow instead of a static token.
Available tools
The tools available to a connected client depend on the modes you have enabled.ask_nao
ask_nao
Sends a natural language question to the nao agent and streams the response.
- Requires Sub-agent mode.
- Streams progress as the agent reasons and calls tools.
- Returns
status,chatId,chatUrl,text, thequeriesthe agent ran, and thestory_idsit created or updated. - Pass an optional
chatIdto continue an existing chat instead of starting a new one.
get_nao_answer
get_nao_answer
Polls the result of an
ask_nao run that is still in progress.- Requires Sub-agent mode.
- Takes the
chatIdreturned by anask_naocall that responded withstatus: "running". - Returns the same payload as
ask_nao, plus anerrorfield whenstatusiserror.
execute_sql
execute_sql
Runs a SQL query against your connected data warehouse and returns results.
- Requires Context-layer mode.
ls_nao_context, grep_nao_context, read_nao_context
ls_nao_context, grep_nao_context, read_nao_context
Browse your nao context: list files and directories, search text patterns across them, and read individual files.
- Requires Context-layer mode.
create_story, update_story
create_story, update_story
Create a new nao story or update an existing one from query results.
- Requires Context-layer mode.
display_chart
display_chart
Renders a chart from an
execute_sql result, returned as an interactive embed.- Available whenever either mode is enabled.
Story management: list_stories, get_story, archive_story, delete_story
Story management: list_stories, get_story, archive_story, delete_story
List, read, archive, and delete existing nao stories.
- Available whenever either mode is enabled.
nao MCP app
The nao MCP app brings the nao UI directly into your AI agent. When a connected client callsdisplay_chart or the story tools (create_story, update_story, get_story), nao returns an interactive embed that renders inline in the conversation - the same charts and stories you see in the nao web UI, without leaving your agent.
Clients that don’t support iframes get a sandboxed HTML fallback.
What gets embedded
How it works
- Ask a question (e.g. “analyze number of PRs merged every week”). The agent runs SQL via nao MCP.
- nao stores the query results in a temporary table (retained for 7 days) and returns an embed URL.
- The MCP client renders the chart or story inline as an interactive iframe - you can hover over data points to see values, just like in the nao web UI.
- To keep editing, click the link to open the story in the nao UI where you can share it with your team.
Why this matters
The MCP app gives you the best of both worlds: the power of your AI agent for analysis, and the nao UI for visualization. Everyone at the company gets the same data reliability, the same chart design, and the data team keeps full observability - regardless of which agent the end user is working in.Supported clients
The nao MCP app works in any MCP client that supports iframes. Tested clients:- Cursor
- GitHub Copilot
- ChatGPT
- Claude Desktop
Story downloads
From the embed header, viewers can export a story as PDF or HTML. The download endpoint validates the same signed token as the view, so anyone with the embed link can download the story within the 7-day window.What’s next
Configure nao MCP endpoint
Step-by-step config for Cursor, Codex, Claude Code, Claude Desktop, and CLI
Chat capabilities
Explore what the nao agent can do natively in chat