← All articles
Bursar — AI agents

Installing the MCP client

Bursar isn't a package you import into your application — it's an MCP server that Claude (Code or Desktop) runs and talks to over the Model Context Protocol. Registering it is the entry point for giving any AI agent a real, cryptographic identity instead of a shared API key. This article covers registration in more detail than the quick-start version in Installing your first agent identity.

Registering the MCP server

Claude Code — one command, run from anywhere:

claude mcp add bursar -- npx -y @blacksandscyber/mcp-server-bursar

Claude Desktop — download the .dxt bundle from your install page, drag it onto the Claude Desktop app icon and confirm the install.

Either way, Claude launches the Bursar MCP server itself — there's nothing to npm install into your own project, and no client library your code needs to import. Bursar sits alongside your agent as a server it talks to, not a dependency it links against. The server is registered under the name bursar.

Other clients and agent frameworks

Claude Code and Claude Desktop are the two covered here, but Bursar is a standard MCP server, so it is not limited to them. The install guide for every client has a copy-paste setup for Cursor, VS Code with GitHub Copilot, Codex, Gemini CLI, Zed, Cline, Kiro and other coding agents, for open-source agents such as OpenClaw, OpenCode and Goose, and for agent frameworks such as the OpenAI Agents SDK, LangChain and CrewAI. It also says where a client cannot run a local server and what to do instead, and how to run with credentials from environment variables when your agent has no home directory that survives between runs. It needs package version 0.7.0 or newer. To connect an account from one of those clients, its snippets pass your setup token together with your environment's setup and authorizer endpoints (BURSAR_SETUP_URL and BURSAR_AUTHORIZER_URL), the same two settings the by-hand registration under "Unlocking full access with a setup token" needs; a token sent without them goes to the wrong place.

What registration alone gives you

A handful of Bursar's tools — codebase scanning, framework detection, PII discovery, deployment guidance — work immediately after registration, with no Blacksands account and no certificate at all. That's enough to try Bursar out before you decide to connect it to your organization.

What issuance actually provisions

A certificate identity isn't minted by the claude mcp add command alone — issuance happens when you connect the server to your organization, either by redeeming a one-time setup token or by supplying an existing mTLS cert bundle. For a self-serve account, creating your organization emails you the install link with that token — you are your own administrator, so there's nobody else to ask. (Organizations managed by someone else get the link from their administrator.) At that point, Bursar mints a certificate identity scoped specifically to that agent, tied to your organization, with its own expiration. This is meaningfully different from copying an API key into an environment variable: the identity is agent-specific, and it's tied to one certificate rather than to a credential that might be shared across a dozen scripts and services.

Unlocking full access with a setup token

To move past the free tools and issue a real certificate identity, run the install command on your install page (the link in your install email). It is built for your environment: it redeems your one-time setup token and wires Bursar in with the right endpoints.

curl -fsSL https://<host-of-your-install-link>/install.sh | bash -s -- --token=bss_xxxxxxxxxxxx

You can also register by hand with --env SHIELD_SETUP_TOKEN=..., but then you must also set SHIELD_SETUP_URL (the origin of your install link) and SHIELD_AUTHORIZER_URL (your environment's authorizer endpoint). The package's built-in defaults point at a different environment, so a token sent without them goes to the wrong place.

Either way the token is redeemed once and the resulting certificate bundle is written to ~/.blacksands/mcp-certs/. The server reuses that bundle on every relaunch and does not redeem the token again, so you don't need the token after the first start unless you're rotating credentials. Your agent's later calls to protected services still go through Bursar as usual.

Multiple agents, multiple identities

If you're running more than one agent — say, a build agent and a research agent — register and issue a certificate separately for each. Each agent should get its own certificate identity, not a shared one. This is what makes scoped access possible: see Understanding agent identities and scoped access for why per-agent identity matters and how scoping works in practice. It's also what makes your organization's plan limits meaningful — the number of MCP clients your plan supports corresponds directly to the number of distinct agent identities you can issue (see Understanding your plan limits).

On one machine, agents share a stored certificate bundle unless you separate them. The server keeps one bundle in ~/.blacksands/mcp-certs/ per home directory and redeems a setup token only when none is there, so a second agent registered with a second token on the same machine still runs as the first identity, with no error. Give each agent its own home directory, or use credentials from environment variables; the install guide covers both.

Troubleshooting installation

If the server registers but fails to obtain a certificate, check:

  • That your organization's plan has remaining MCP client capacity
  • That the environment running the agent has outbound network access to Blacksands' issuance endpoint
  • That your setup token hasn't expired or already been redeemed, and that you're connecting to the correct organization if you belong to more than one. Install links are single-use and expire after a short time; if yours did, or the email never arrived, open your account page and choose Resend install email

See Certificate errors and how to fix them for common failure modes and fixes.