Agentkit MCP server
Connect Claude Code, Codex, Cursor and other coding assistants to your Agentkit agents. The MCP server is read-only unless you allow writes.
The Agentkit MCP server lets Claude Code, Codex, Cursor and other coding assistants read your agents, settings, knowledge and conversations. You can then ask your assistant questions like "what did visitors ask about pricing this week?"
The server ships in the same npm package as the Agentkit CLI. Both are open source under the MIT license: github.com/agikits/agentkit-cli. The current release is a beta, and like the CLI it works on every plan, including Free.
What the server can do
The MCP server starts in read-only mode. It can list agents, read settings, sources and conversations, and check training status. It cannot change anything unless you start it with --allow-writes.
| Tool | What it does |
|---|---|
agents_list | List the agents this connection can reach |
agents_get | Read one agent's configuration summary |
settings_ai_get | Read an agent's model and instruction settings |
settings_design_get | Read an agent's chat bubble design |
settings_security_get | Read an agent's domain and message-limit settings |
settings_notifications_get | Read an agent's notification settings |
settings_training_get | Read an agent's knowledge sync settings |
sources_list | List an agent's knowledge sources |
conversations_list | List widget, API, Playground and Instagram conversations without marking them read |
conversations_get | Read one conversation |
training_status | Read training progress without starting training or spending credits |
With --allow-writes, three more tools appear:
| Tool | What it does |
|---|---|
sources_add_text | Add a text knowledge source. It does not start training. |
settings_instructions_update | Replace an agent's instructions. The change goes live immediately. |
agents_create | Create an agent. Only available when the server runs without --agent. |
Limit access to one agent
By default the server can read every agent the key can reach. Pass --agent to restrict it. Repeat the flag for several agents.
claude mcp add -s user agentkit -- agentkit-mcp --agent <agent-id>
Allow changes
Start the server with --allow-writes to let the assistant add text knowledge sources and update an agent's instructions. Without --agent, it can also create new agents. Instruction changes go live immediately, so keep your client's tool-approval prompts on.
claude mcp add -s user agentkit -- agentkit-mcp --agent <agent-id> --allow-writes
Even with writes allowed, the MCP server never starts training, sends messages or emails, deletes anything, reads secrets, or runs commands.
Remote server (coming soon)
We're building a hosted MCP server that ChatGPT, Claude.ai, Cursor and other clients will connect to over HTTPS, signing in with OAuth. It isn't available yet. Until it is, use the local server below, which runs on your machine over stdio.
Local server (agentkit-mcp, included with the CLI)
Your client starts agentkit-mcp on your machine and talks to it over stdio. Before you add it to a client:
- Install the CLI, which also installs
agentkit-mcp. - Save an API key with
agentkit init --with-token. The CLI page has the paste command for macOS, Windows and Linux.
The server uses the key you saved with agentkit init, so the client configuration doesn't need to contain the key. It also accepts AGENTKIT_API_KEY from its environment.
Claude Code
claude mcp add -s user agentkit -- agentkit-mcp
-s user makes the server available in every project. Leave it out to add it to the current project only.
Codex
codex mcp add agentkit -- agentkit-mcp
Cursor and other clients
Add this to your client's MCP configuration (in Cursor, ~/.cursor/mcp.json):
{
"mcpServers": {
"agentkit": {
"command": "agentkit-mcp"
}
}
}
Then ask your assistant something like:
List my Agentkit agents and summarize the last five conversations for the support agent.
Privacy and security
Conversations and instructions can contain customer data. When you connect the MCP server, your coding assistant's provider receives whatever the tools return. Restrict the server to the agents you need with --agent.
Keep the API key out of your client's configuration and let the server read the key saved by agentkit init. A key can reach every agent in the workspace. To cut off a client, revoke its key on the API Keys page.
If you allow writes, leave your client's tool-approval prompts on. An instruction update changes what your agent tells visitors as soon as it runs.
Troubleshooting
The client can't start agentkit-mcp. The command must be on the PATH your client sees. Run npm prefix -g and add its bin folder (on Windows, that folder itself) to your PATH, then restart the client.
Every tool call fails with an authentication error. Run agentkit agents list in a terminal. If that fails too, save the key again with agentkit init --with-token. The server never asks you to log in, so a missing or revoked key shows up only as failed tool calls.
A tool says the connection has no access to that agent. The server was started with --agent, and the agent you asked about isn't in the list. Add another --agent flag for it.
The write tools are missing. Start the server with --allow-writes. agents_create also needs the server to run without --agent.
A result is too large. Tool results are capped at 64 KiB. Ask for a smaller page of results or a narrower query.
Report issues on GitHub.