Let an AI agent operate your organization — spaces, agents, API access, contracts and its own end-user identities — through a standard MCP endpoint, under the same roles and rules as the admin console.
An MCP endpoint on your KeenAgents host, with your organization's admin surface as tools.
The Keen MCP Server is the door an AI agent uses to configure your organization without a person clicking through the admin console. It speaks the Model Context Protocol — the open standard through which an AI assistant discovers and calls the tools a server offers — over HTTPS and lives at https://<your-host>/mcp — the same host as your admin console. Any MCP client that supports HTTP servers can connect.
What it exposes is the admin surface you already know, as tools — 96 of them, one per admin action, grouped exactly like the console's sections. A tool call is an admin action: it is checked against the calling account's role, refused or applied by the platform, and recorded in the audit trail — exactly as if a person had pressed the button. A handful of read-only resources (your spaces, API keys, contracts, consumers and log settings) are published alongside so a client can browse lists.
The server is for provisioning, not chatting: an agent uses it to create a space, an agent, the API access chain and an end-user identity, and then talks to your agents the way every end user does — over the live chat connection.
One thing to create in the console, and the two values it gives you.
An agent signs in as an MCP account — a login for an AI agent, not a person, created once by a human admin under Organization → MCP Accounts. An MCP account has:
Hand the agent the id and the secret. The account's page shows when it last signed in (Last login …, or Never used).
Creating, changing the role of, disabling, rotating or deleting an MCP account is a human-only action — it needs the mcp_accounts write scope on a human role. An agent can never do any of that, even if its role would otherwise allow it.
Register the endpoint, then sign in with the mcp_login tool.
https://<your-host>/mcp. With Claude Code, for example: claude mcp add --transport http keen https://<your-host>/mcp (client-specific — check your client's own documentation). A project-scoped registration file works the same way: an HTTP server entry with that URL. A newly added server is picked up when the client session (re)starts, not mid-session.mcp_login tool with the MCP account's id and secret. On success the tool answers Logged in as MCP account …; on failure Login failed (status 406) — the same refusal whether the id, the secret or the Enabled switch was the problem, so a probe learns nothing.logout tool drops it.The only credential exchange — one MCP tool call
tool: mcp_login args: { "id": "<mcp account id>", "secret": "<the secret shown once in the console>" } → "Logged in as MCP account <id>." // every other tool now acts as this account. The sign-in token stays inside the // MCP session — it is never returned to the agent — and is renewed by the session. → "Login failed (status 406): …" // the same refusal whether the id, the secret or the Enabled switch was wrong
The session is stateful: a client opens one session and reuses it. A call without a session is refused with Bad Request: no valid MCP session. Send an initialize request first. Each session holds its own sign-in, so two agents on the same endpoint never share an identity.
The console's sections, as tools — each gated by the account's role.
scheme://host[:port], compared exactly), update, delete. Names are up to 100 characters throughout.Every destructive tool — every delete, every rotate, and resetting a deployment token — is flagged as destructive, so a well-behaved client confirms with you before calling it.
Four walls that no role opens — and why.
Why: these walls are a property of being an MCP account, not a scope you can grant or remove — they hold even for an MCP account whose role is admin. An agent must never be able to widen its own permissions, create logins, or manage people or other agents' logins. If a bot reports that it "can't create an account", that is by design — a human does it.
The MCP account's role decides; every tool names the scope it needs.
Each tool needs one scope at one level — read or write — from the same catalog roles are built from: the fourteen values on the Roles & Permissions page. Each tool's own description states the scope it requires, and the platform re-checks the account's role on every call — the console's permission rules and the server's are the same rules. A role short of the scope is refused with 403 Forbidden.
Tool descriptions name a scope by a short abbreviation followed by the level — 1 = read, 2 = write — so sp2 means "write on spaces". This is how the abbreviations map to the scope names you grant on a role:
| In a tool description | Scope on the role |
|---|---|
a | account — human-only surface; an MCP account is refused regardless |
cs | consumer — read only for an MCP account |
r | roles — human-only surface; an MCP account is refused regardless |
sp | spaces |
ag | agents |
ak | api_keys |
ct | clients |
ca | certificates |
co | contracts |
wk | webhooks |
ce | cache |
l | logs |
mc | mcp_accounts — read only for an MCP account |
mcc | mcp_consumers |
The built-in owner and admin roles pass every scope check — but still hit the four walls above. A full build — space, agent, API access chain, contract, cache and an MCP consumer — needs write on spaces, agents, clients, certificates, webhooks, contracts, api_keys, cache and mcp_consumers (plus read on consumer if the agent looks people up).
A role change is picked up by a running agent session at its next token renewal, and by every new sign-in.
Headless consumers an agent creates for itself, so it can chat with your agents like any end user.
To talk to an agent — to test a flow it just deployed — the agent needs an end-user identity, because the live chat accepts only a signed-in consumer. An MCP consumer is that identity: a consumer with no email, no password and never a one-time passcode; its credential is an id plus a secret.
mcp_consumers write scope can turn a consumer's access on or off, rotate its secret and delete it — never create or re-assign it. The list shows each consumer's contract, enabled state, last login and creation time; the detail page adds its spaces and the MCP account that created it.What the platform guarantees about an agent's access, and what each console action does.
The message tells you which of four things went wrong.
mcp_login with the account id and secret.mcp_login.Each piece, in depth.
Keen Mastering Toolkit
The toolkit that drives this server end to end — from an empty organization to a tested bot.
AI-Assisted Building
Why an assistant provisions here and builds with the toolkit.
MCP Accounts
The agent's login: name, role, Enabled switch, id + once-shown secret.
Roles & Permissions
The fourteen scopes each tool needs.
MCP Consumers
The agent's own end users, beside your partners' consumers.
Api Keys
The chain the agent wires, and the Wake action.
Audit Logs
Where an agent's actions are recorded.
Keen Agents 2026
Documentation
Release 15