MCP Server
Clarive has a built-in MCP server. MCP, the Model Context Protocol, is the standard way AI agents such as Claude Code, Claude Desktop, Cursor or VS Code's agent mode discover and call tools. Connect one of them to Clarive and you can ask it, in plain language, things like:
- "Which of my topics are still open, and what changed in them this week?"
- "Why did the last QA deployment of changeset 1234 fail?"
- "Move topic 4321 to In Review. If you can't, tell me why."
- "Change the Deploy web rule so it retries the restart step twice."
- "How many jobs are running for the Web project right now?"
- "Read the dispatcher log and tell me what the timeouts since noon have in common."
The agent works out which Clarive tools to call, calls them with your permissions, and answers with what it found or did.
What the server offers¶
Every operation of the Clarive API is an MCP tool, except logging in
(auth.login), which an MCP client never needs: a few hundred of them, covering topics, jobs and their logs, rules (readable and writable as
HCL), resources (CIs), artifacts, git repositories, remote commands and
file shipping, workers, users, roles, projects, settings and the server
itself. They are the same operations the REST API and the clarive
CLI publish, with the same names, parameters, permissions
and errors: job.logs is the tool job_logs and the command
clarive job logs.
There are two ways to connect an agent:
- Through the clarive CLI. The agent starts
clarive mcpas a local MCP server; the CLI forwards each message to Clarive with the token of its profile. This works with every MCP client, and the token stays in the CLI's configuration. - Directly over HTTP. Clients that speak MCP's Streamable HTTP
transport connect to
https://<your server>/mcpwith anAuthorization: Bearer <token>header.
Quick start with Claude Code¶
clarive login --url https://clarive.example.com # once, see the CLI section claude mcp add clarive -- clarive mcp
Start Claude Code and ask "what Clarive topics are assigned to me?". Type
/mcp in Claude Code to see the server and its tools. Other clients and
options are in Connecting agents.
Safe by design¶
An agent connected to Clarive is you, working faster. The server keeps it inside the same fences as you:
- Your permissions. Every tool call runs as the token's user, with that user's roles in each project, exactly as in the web interface. Tools the user may not use are not even listed.
- Read tokens. A read token (or the
read_onlyoption) publishes and runs only the tools that change nothing. Use one to let an agent explore. - Annotated tools. Each tool says whether it is read-only and whether it is destructive, so the client can ask you before running the dangerous ones. Claude Code asks for permission before each tool you have not allowed.
- Secrets stay masked. Passwords, keys and tokens in resources and variables come back masked, as they do in the API.
- Every call is on record. Each tool call fires the
event.mcp.callevent with the user, tool, arguments (secrets masked) and answer. Event rules and notifications can react to it, and a rule can refuse calls: for example every destructive tool, or any tool outside working hours. - Maintenance mode stops agents like any other API client; only administrators get through.
In this section¶
- Connecting agents: Claude Code, Claude Desktop, Cursor, VS Code and others; tokens and options.
- Tools: how tools are named, listed, called and answered.
- Auditing and control: the
event.mcp.callevent and rules that refuse calls. - Examples: what to ask, and the tools the agent uses.
- Protocol reference: for people writing their own client.
- Troubleshooting.