agentskit.js
Recipes

Use AgentsKit from Codex, Claude Code, and Cursor

Expose one safe AgentsKit MCP server to the coding agent you already use, with verified configuration for each host.

You should not need a separate interface to use an AgentsKit tool or agent while coding. @agentskit/mcp exposes the same server over STDIO to Codex, Claude Code, Cursor, and other MCP hosts. The host configuration changes; the AgentsKit command does not.

The verified default exposes fetch and search. It does not enable shell, filesystem, SQLite, or a model provider, and it needs no credential to start.

#Codex

Add the server with the CLI:

codex mcp add agentskit -- npx -y @agentskit/mcp@0.3.3 --tools fetch,search
codex mcp list

Or commit a project-scoped .codex/config.toml in a trusted project:

[mcp_servers.agentskit]
command = "npx"
args = ["-y", "@agentskit/mcp@0.3.3", "--tools", "fetch,search"]
default_tools_approval_mode = "prompt"

Codex CLI, the IDE extension, and the desktop app share this configuration. Use /mcp to inspect the connected server.

#Claude Code

Create a project-scoped server:

claude mcp add --scope project --transport stdio agentskit -- npx -y @agentskit/mcp@0.3.3 --tools fetch,search
claude mcp list

The equivalent .mcp.json is:

{
  "mcpServers": {
    "agentskit": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@agentskit/mcp@0.3.3", "--tools", "fetch,search"]
    }
  }
}

Claude Code asks for approval before using a project-scoped server. Review the command, approve it, and use /mcp to check its status.

#Cursor

Create .cursor/mcp.json:

{
  "mcpServers": {
    "agentskit": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@agentskit/mcp@0.3.3", "--tools", "fetch,search"]
    }
  }
}

Restart or reload Cursor, then inspect the MCP settings to confirm that the server and its tools are available.

#Expose a complete Registry agent

The same bridge can publish a bounded Registry agent as one MCP tool. Extend the server arguments rather than changing host-specific code:

OPENROUTER_API_KEY=your-key \
  npx -y @agentskit/mcp@0.3.3 \
  --tools fetch,search \
  --agents code-review \
  --provider openrouter \
  --model openrouter/free \
  --max-steps 8

Keep provider credentials in environment variables. Do not put --api-key in a committed MCP configuration because command arguments can be visible to other local processes.

#Verify the path

The repository proof first launches the built CLI over real child-process STDIO and verifies that --tools fetch,search exposes fetch_url and web_search. The package test also initializes an in-memory client, lists a bounded echo tool, calls it, and closes both ends:

pnpm --filter @agentskit/mcp... build
node packages/mcp/fixtures/run-coding-agent-hosts.mjs
pnpm --filter @agentskit/mcp exec vitest run tests/coding-agent-hosts.test.ts

Both proofs are offline and credential-free. Their sources are under packages/mcp/fixtures/.

#Security boundary

  • --allow-shell is absent, so shell execution stays disabled.
  • Filesystem access is absent until you pass both filesystem and --fs-root.
  • Provider calls are absent until you select an agent, provider, model, and key.
  • Host approval remains enabled; the recipe does not bypass Codex or Claude trust prompts.

#Sources

#See also

Explore nearby

✎ Edit this page on GitHubΒ·Found a problem? Open an issue β†’Β·How to contribute β†’

On this page

Ask the docs
Ask anything about AgentsKit. Answers come from the docs corpus and cite their sources.