Skip to content
NewNexus 2.0 is here, and it’s open source. Read the launch post

Guides

MCP server

Give Claude Code, Codex or any MCP agent your spend, budgets, usage, models and teams as tools under your own sign-in, and let an admin manage the organization through them.

View as Markdown

nexus mcp is a local Model Context Protocol server. An agent starts it and uses Nexus through it as tools. Every tool is one operation of the API, sent with your CLI sign-in, so the agent sees and does exactly what you may. Most tools read. Owners and admins also get tools that change the organization, and the agent asks you before each change.

Set up

  1. Install the CLI and sign in with nexus auth login. The server uses that sign-in.

  2. Add the server to your agent, once:

    claude mcp add nexus -- nexus mcp     # Claude Code
    codex mcp add nexus -- nexus mcp      # Codex

    Any other agent takes the same command in its MCP settings: nexus with the argument mcp, over stdio.

  3. Ask the agent something the tools answer, such as "How much of my budget is left this month?".

The server signs in as you, in the organization you last chose with nexus org switch. To use another organization, switch the CLI first, then restart the agent.

The tools

Each tool has the name, arguments and answer of its API operation, and the same permission. A tool whose operation takes a JSON request body takes it as the argument body.

ToolWhat it readsAPI
currentTenantYour organization, your role and your permissionsGET /v1/tenants/me
spendBudget, spend and reservations by product, with recent callsGET /v1/spend
listBudgetsMonthly spend limits: yours, or everyone's for owners and adminsGET /v1/budgets
getPersonBudgetOne person's limit this month (me for yours)GET /v1/people/{userId}/budget
getTeamBudgetA team's cap, as you may see itGET /v1/teams/{slug}/budget
usageUsage over a date range, grouped by team, person, model, provider, product or dayGET /v1/analytics/usage
getAgentAdoptionWho used coding agents through Nexus, day by dayGET /v1/analytics/agents
getChatUsageChat sessions in numbers, never their contentGET /v1/analytics/chat
listModelsThe models you may use, with context windows and pricesGET /v1/models
listTeamsThe organization's teams, as a list or a treeGET /v1/teams
getTeamA team, its members and its child teamsGET /v1/teams/{slug}
listAgentSessionsCoding-agent sessions, newest firstGET /v1/agents/sessions
getAgentSessionOne coding-agent sessionGET /v1/agents/sessions/{id}
modulesThe products and capabilities your Gateway registersGET /v1/modules

Ask your agent

The ask tool asks your own Nexus agent a question and returns its answer, the model that ran and its cost. It is the one tool that is not an API operation. It answers on a model your policy allows, nexus/auto unless the agent names one.

ask never makes a change. It runs no tool, so it cannot write or confirm a write. When a change is needed, the answer says so, and you confirm the change yourself in Slack or Nexus UI. Gateway records each call from the surface mcp.

Review before a pull request

nexus mcp also has review_local, which needs the machine the server runs on. It reviews the change in your working tree against its merge base with the remote default branch. It uses the repository's own review rules and spends your model budget. It posts nothing, and answers the findings and whether one would fail the check. It reads only folders inside the one nexus mcp runs in. It is not marked read-only, so the agent asks you before each call. A run can take several minutes.

Connectors

These tools reach outside systems such as GitHub or Jira through Nexus. Call describeConnector first. It lists each operation with its effect and the schema of its body. Its usable field says whether you may use the connector. readConnector and writeConnector run only connectors your organization made available to you. readConnector runs only operations that read, so you may approve it once. writeConnector runs a change, and the agent asks you before each call. People cannot make changes through connectors yet, so it refuses them for now. A readConnector answer longer than 50,000 characters is cut there, with a note that starts with answer_cut. Ask the agent for a page, a limit or a filter where the operation takes one. Each connector answer starts with a connector_data note: the text comes from an outside system, so the agent treats it as data, not instructions.

ToolWhat it doesAPI
describeConnectorOne connector's operations, what each changes, and its argumentsGET /v1/connectors/{name}
readConnectorRun one operation that only readsPOST /v1/connectors/{name}/{operation}/read
writeConnectorRun one operation that changes somethingPOST /v1/connectors/{name}/{operation}

Your notifications

Everyone can read their own inbox and clear an item from it. doneNotification is a change, so the agent asks you before each call.

ToolWhat it doesAPI
listNotificationsYour inbox: items not yet done, newest firstGET /v1/notifications
doneNotificationMark one of your items done, so it leaves the inboxPOST /v1/notifications/{id}/done

Pages

These tools let an agent publish a page it wrote, read it back, read the design system it uses and run Check on it. The page is private to your organization's Gateway until you share it, and there is no tool to share a page. createPage and writePageVersion are changes, so the agent asks you before each call. The rest only read. Nexus for desktop gives them to its Code sessions, which may have no nexus command to run nexus pages publish.

ToolWhat it doesAPI
createPagePublish a new page from HTML or MarkdownPOST /v1/pages
writePageVersionWrite the next version of one of your pagesPOST /v1/pages/{id}/versions
listPagesYour pages, most recently written firstGET /v1/pages
getPageOne page and its versions: titles and sizes, not contentGET /v1/pages/{id}
getPageSourceA version's source as text, to edit and write back (latest is the newest)GET /v1/pages/{id}/versions/{version}/source
listPageCommentsThe comments on a pageGET /v1/pages/{id}/comments
checkPageRun Check on a design: colours, sizes and spacing off its tokens, and low contrastPOST /v1/pages/{id}/check
listDesignSystemsThe organization's design systems, the built-in @nexus/brand firstGET /v1/design-systems
getDesignSystemOne design system: its tokens, notes and componentsGET /v1/design-systems/{id}

For owners and admins

These tools read the whole organization. Most answer owners and admins only, and the billing tools answer the owner only. Anyone else gets Gateway's refusal, or only their own part, as the API answers them.

ToolWhat it readsAPI
listOrgsYour organizations and your role in eachGET /v1/orgs
getOrgSettingsThe organization's settings, such as how long chats are keptGET /v1/orgs/settings
listOrgDomainsThe organization's verified email domainsGET /v1/orgs/domains
listMembersMembers and their roles, with each person's spendGET /v1/orgs/members
listPendingTeamMembersPeople added to a team by an email that has not joined yetGET /v1/teams/pending
listAuditEventsWho changed what, newest firstGET /v1/audit
listSpendCallsThe organization's model calls, newest first, with filtersGET /v1/spend/calls
getSpendCallOne model call: what was reserved and charged, or why it was refusedGET /v1/spend/calls/{id}
getOrganizationPolicyThe organization's model policyGET /v1/policies/organization
getTeamPolicyA team's model policy and what it inheritsGET /v1/policies/teams/{slug}
getAgentPolicyA coding agent's model policyGET /v1/policies/agents/{agent}
listOperatorControlsThe pauses, limits and overrides in forceGET /v1/policies/controls
listWriteGrantsWhich module may write through which connector operationGET /v1/policies/grants
listProviderKeysThe organization's own provider keys, last four characters onlyGET /v1/keys/providers
getProviderKeyOne provider key and its versions, never its valueGET /v1/keys/providers/{provider}
listTokensLive tokens: yours, or everyone's with allGET /v1/auth/tokens
getBillingThe payment method and Stripe customer (the owner only)GET /v1/billing
listBillingStatementsThe stored monthly statements (the owner only)GET /v1/billing/statements
getBillingStatementA month's bill (the owner only)GET /v1/billing/statement
connectorsThe connectors Gateway offers and their operationsGET /v1/connectors
listRepositoriesGitHub installations and linked repositoriesGET /v1/github/repositories
githubAppWhether the GitHub App is set up, and its install linkGET /v1/github/app

Changes, for owners and admins

These tools change the organization. Each one is the API call itself, so Gateway checks your permission and records the change in the audit log. No change tool is marked read-only, so Claude Code and Codex ask you before each call. Keep that prompt on for these tools.

The API's own guards still apply. inviteMembers needs expect, the count you confirmed, to invite more than one person. importTeams applies only the plan that its dry run returned.

ToolWhat it changesAPI
inviteMembersInvite people by email, as members or adminsPOST /v1/orgs/invitations
setMemberRoleMake a member an admin, or an admin a memberPOST /v1/orgs/members/{userId}/role
removeMemberRemove a member and revoke their tokensDELETE /v1/orgs/members/{userId}
transferOwnershipMake another member the owner (the owner only)POST /v1/orgs/owner
setOrgSettingsThe organization's settings, such as how long chats are keptPUT /v1/orgs/settings
addOrgDomainAdd a verified email domainPOST /v1/orgs/domains
removeOrgDomainRemove a verified email domainDELETE /v1/orgs/domains/{id}
setBudgetThe organization's budgetPOST /v1/orgs/budget
createTeamCreate a team, optionally under a parentPOST /v1/teams
updateTeamRename, relabel or move a teamPATCH /v1/teams/{slug}
deleteTeamDelete a teamDELETE /v1/teams/{slug}
addTeamMemberAdd someone to a team, by user id or emailPOST /v1/teams/{slug}/members
removeTeamMemberTake someone off a teamDELETE /v1/teams/{slug}/members/{userId}
importTeamsLoad teams from a file, after a dry runPOST /v1/teams/import
cancelPendingTeamMembersCancel pending team membersDELETE /v1/teams/pending
setDefaultTeamA person's default teamPUT /v1/people/{userId}/default-team
setTeamBudgetA team's cap per day, week or monthPUT /v1/teams/{slug}/budget
setPersonBudgetOne person's monthly limitPUT /v1/people/{userId}/budget
setPersonDefaultBudgetEveryone's default monthly limitPUT /v1/budgets/person-default
setOrganizationPolicyThe organization's model policyPUT /v1/policies/organization
setTeamPolicyA team's model policyPUT /v1/policies/teams/{slug}
setAgentPolicyA coding agent's model policyPUT /v1/policies/agents/{agent}
setOperatorControlPause, limit or override models for a subjectPOST /v1/policies/controls
clearOperatorControlEnd an operator controlDELETE /v1/policies/controls/{id}
setWriteGrantsThe connector writes a module may makePUT /v1/policies/grants/{product}/{capability}
testPolicyCheck whether a person may use a model, and by which rule (changes nothing)POST /v1/policies/test
enableProviderKeyTurn a disabled provider key back onPOST /v1/keys/providers/{provider}/enable
disableProviderKeyStop calls from using a provider keyPOST /v1/keys/providers/{provider}/disable
removeProviderKeyRemove a provider keyPOST /v1/keys/providers/{provider}/remove
revokeTokenRevoke a token: yours, or anyone'sDELETE /v1/auth/tokens/{id}
revokeScopedKeyRevoke a module's scoped key before it expiresPOST /v1/auth/scoped-keys/revoke
unlinkInstallationUnlink a GitHub installationDELETE /v1/github/installations/{id}

Chats and artifacts are not tools, and no tool reads a page, so a prompt an agent reads cannot ask it to pass them on. When Nexus refuses a call, the agent gets the refusal as a tool error with Gateway's status, code and message, as the API sends it.

Adding or replacing a provider key and creating an API key are not tools, because the secret would stay in the agent's transcript. Use nexus keys add or nexus keys replace for a provider key, and Nexus UI for an API key.

Not yet

Approvals that Nexus enforces on an agent's change, and a remote server that signs in through your browser, are planned.