MCP Overview
Connect Claude, Codex, Cursor and your own agents to Semaphor analytics using the Model Context Protocol.
Semaphor runs a Model Context Protocol server that lets agents discover and query your analytics. Agents ground answers in your semantic model, run governed queries under the caller's permissions, read your dashboards, and, with write access, make changes you preview first.
Connect
Add Semaphor to your AI client
Most clients need only the server URL. Add it, log in with your Semaphor account, and ask a question. The agent works across every project you belong to, with your role and permissions.
https://semaphor.cloud/api/mcpOn a self-hosted install, use your Semaphor URL followed by /api/mcp.
Install the Semaphor plugin, which adds the server and an analytics skill:
claude plugin marketplace add semaphor-analytics/agent-plugin
claude plugin install semaphor@semaphor-analyticsThen run /mcp in a session, choose semaphor, and log in in your browser. Full steps
Install the Semaphor plugin and log in:
codex plugin marketplace add semaphor-analytics/agent-plugin
codex plugin add semaphor@semaphor-analytics
codex mcp login semaphorOpen Semaphor in the Claude directory, connect it, and sign in with your Semaphor account.
Or add it yourself: open Settings, then Connectors, click Add custom connector, name it Semaphor, paste the server URL, and sign in. Full steps
Open Settings, then Apps, then Advanced, and turn on Developer mode. Click Create app, paste the server URL, and sign in with your Semaphor account. Full steps
Add the server to Cursor, then complete the Semaphor login in your browser when it connects:
{
"mcpServers": {
"semaphor": {
"url": "https://semaphor.cloud/api/mcp"
}
}
}For automation or an agent inside your own product, mint an MCP project token on your server and send it as a header instead of logging in:
{
"mcpServers": {
"semaphor": {
"type": "http",
"url": "https://semaphor.cloud/api/mcp",
"headers": { "Authorization": "Bearer ${SEMAPHOR_MCP_TOKEN}" }
}
}
}Connect with a Token shows how to mint one.
Then ask: What data can I analyze in Semaphor?
Building an agent? Build an Agent is one page with everything it needs, and /llms-full.txt holds all of these pages as one Markdown document to hand to Claude or any other agent. Every page also has Copy Markdown.
How it works
One endpoint, one caller profile, one analytics spine
Every request to https://semaphor.cloud/api/mcp carries a credential. The server verifies it, builds a caller profile (who you are, which projects you can reach, your scopes, and whether you get SQL), and registers only the tools that profile may use. Tool calls then run through the same governed path as your dashboards. On a self-hosted install, use your Semaphor URL followed by /api/mcp.
From the caller's side
Who's calling decides what they see
There are three ways in. Pick one to see how it logs in, what it can do, and what a failure looks like.
Interactive
You connect your AI client and log in with your Semaphor account.
- Add
https://semaphor.cloud/api/mcpto Claude, ChatGPT, Codex or Cursor, or install the Semaphor plugin. - Your client opens the Semaphor login.
- Approve read access, and write access if the agent should make changes.
- Ask a question. With one project, the agent doesn’t need to ask which.
- Reach
- Every project you belong to
- Tools
- 20 with write · 19 read only · 13 as a viewer
- SQL
- Author role or higher
- Changes
- Dashboards, generated dashboards and relationships; applying needs write
Tool families
Several agents can share one login. When it expires, your client asks you to log in again.
| Caller | Credential | Tools | What's different |
|---|---|---|---|
| Org admin in an AI client, write | OAuth login | 20 | Everything, including the change tools |
| Org admin in an AI client, read only | OAuth login | 19 | Can propose changes, not apply them |
| Org viewer in an AI client | OAuth login | 13 | No SQL, physical tables or change tools |
| Org admin automation, write | MCP project token | 19 | No project list; pinned to one project |
| Org admin automation, read only | MCP project token | 18 | No project list; can propose, not apply |
| End user, SQL on | MCP project token | 17 | Read, analyze, SQL and physical discovery under their policies |
| End user, SQL off | MCP project token | 12 | Semantic model only |
| End user with the Power User role, write | MCP project token | 19 | Also changes the dashboards they can edit |
Hiding a tool is for clarity, not the security control: the server still authorizes every call. SQL-shaped arguments inside shared tools (a physical source in semaphor_matrix, for example) return capability_required for callers without SQL. See Tools Reference.
Tools
What agents can do
Discover the datasemaphor_get_analysis_context
List projects, semantic domains, datasets, fields and relationships. Callers with SQL access can also browse connections, schemas and tables.
Ask governed questionssemaphor_analyze · semaphor_matrix
Run analytics over the semantic model, or SQL with semaphor_query_sql_advanced when a question needs it. Two people can get different numbers for the same question.
Work from your dashboardssemaphor_list_dashboards
List dashboards, see who can actually open them, and read a dashboard's cards, filters and saved queries.
Make changes, with a previewsemaphor_propose_change
Add, change and remove dashboard cards and filters, add sheets, show cards as tabs, write text cards, build a new dashboard, or improve a semantic model: synonyms, descriptions, calculations and relationships. Every change is previewed first; saving it needs write access.
Reads
Every answer is grounded, then governed
An agent answering a question starts with semaphor_get_analysis_context, finds the exact domain, dataset and fields, and runs semaphor_analyze. Nothing is guessed, and every query runs under the caller's security policies. See Discover and Query.
Writes
Every change is a preview, then an apply
semaphor_propose_change saves nothing and returns one sentence per change, with the new numbers. semaphor_apply_change applies exactly that preview by its proposalId. New capabilities arrive as new changes, never new tools.
Change kinds
- Dashboard changes:
card.add,card.update,card.remove, thefilter.*changes,sheet.add,sheet.update,layout.tabs,layout.untabandlayout.arrange, on a dashboard you can edit, or as your own private copy. Organization authors and end users with the Power User role. - A new dashboard:
createin place ofdashboardId, with the changes that fill it, saved private to you. Anyone who can create dashboards in the project. - A semantic model's own changes:
domain.update,dataset.update,field.update,metric.update,calculation.addandrelationship.updateadd synonyms, example questions and instructions, change descriptions, labels and formats, add calculations and change definitions. See Improve a Semantic Model. relationship.add: adds a relationship between two datasets. Every query on the domain can use it, so it needs the Author role or higher in the project's organization, logged in or with a token, as every semantic model change does.
Permission is not approval
The server enforces permission: write scope, an Author role, the credential rule for each kind, and project access. Approval is the client's job: the apply tool is marked destructive, so clients that honor annotations ask you before running it. For automation tokens, minting write scope is the approval.
Developer experience
What building against it looks like
Connect an agent with a token
Mint a token on your server:
{
"projectId": "p_...",
"projectSecret": "...",
"orgUserId": "...",
"mcp": { "scopes": ["mcp:read"], "sql": true },
"tokenExpiry": 3600
}Connect any client that takes a header:
{
"mcpServers": {
"semaphor": {
"type": "http",
"url": "https://semaphor.cloud/api/mcp",
"headers": { "Authorization": "Bearer ${SEMAPHOR_MCP_TOKEN}" }
}
}
}What to expect
semaphor_get_access_contextanswers "why is this tool missing": mode, credential, scopes and whether SQL is on.- Results are JSON by default and arrive as structured content, checked against each tool's output schema.
- Errors carry a stable
codeyour code can branch on. - A misspelled argument fails with its name instead of being silently dropped.
Error codes worth knowing
write_scope_required | Log in with write, or mint with mcp:write |
capability_required | The argument needs SQL; use the semantic form |
missing_measure | Analyze needs a measure; __count counts rows |
tool_timeout | The call ran too long; ask a narrower question |
proposal_stale | The target changed; propose again |
apply_outcome_unknown | Check the target before proposing again |
Next
Get started
Build an Agent
Everything an agent needs in one page: connecting, the rules, four complete call sequences.
Connect an AI Client
Claude Code, Codex, claude.ai, ChatGPT or Cursor: log in and ask a question.
Connect with a Token
Mint an MCP project token for automation or an agent in your product.
Discover and Query
How agents find the right data and run governed queries.
Making Changes
Preview and apply dashboard and semantic model changes.
Authentication and Security
Logins, scopes, isolation and how your policies apply.
Tools Reference
Every tool, its arguments, and who can use it.