agentskit.js
Recipes

Connect AgentsKit to your coding agent

Fix MCP setup across Codex, Claude, Cursor, Cline, and Continue with pinned configurations and an executable server proof.

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, Cursor, Cline, Continue, 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.

#What is actually verified

HostConfiguration checkedHow to inspect itEvidence
Codex CLI, IDE, desktop.codex/config.tomlcodex mcp list or /mcpOfficial format + pinned TOML fixture validator
Claude Code.mcp.jsonclaude mcp list or /mcpOfficial format + JSON round-trip validator
Claude Desktopclaude_desktop_config.jsonSettings → DeveloperOfficial format + JSON round-trip validator
Cursor.cursor/mcp.jsonSettings → MCPOfficial format + JSON round-trip validator
ClineMCP Servers configuration UIMCP Servers panelOfficial format + JSON round-trip validator
Continue.continue/mcpServers/agentskit.yamlAgent mode tool listOfficial format + pinned YAML fixture validator

The fixtures validate the exact version-pinned wrappers. Codex encodes prompt approval directly; Cline encodes an empty per-server auto-approval allowlist. Global Cline approval settings still govern whether calls prompt, while the other hosts retain the approval and trust behavior documented by their vendors. The executable proofs initialize the shared STDIO server and list its tools from both the local build and the published npm package. They do not automate each host application's UI, login, or trust prompt.

#Codex

Add the server with the CLI:

codex mcp add agentskit -- npx -y @agentskit/mcp@0.3.9 --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.9", "--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.9 --tools fetch,search
claude mcp list

The equivalent .mcp.json is:

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

In interactive sessions, Claude Code asks for approval before using a project-scoped server. Review the command, approve it, and use /mcp to check its status. Non-interactive claude -p and SDK sessions cannot show that prompt, so keep their configured permission and trust controls in scope.

#Cursor

Create .cursor/mcp.json:

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

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

#Claude Desktop

Open Settings → Developer → Edit Config. On macOS this edits ~/Library/Application Support/Claude/claude_desktop_config.json; on Windows it edits %APPDATA%\Claude\claude_desktop_config.json.

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

Fully quit and restart Claude Desktop, then check the server status under Developer settings. This is the local Desktop configuration, not a remote Claude connector.

#Cline

Open MCP Servers, choose Configure MCP Servers, and add:

{
  "mcpServers": {
    "agentskit": {
      "command": "npx",
      "args": ["-y", "@agentskit/mcp@0.3.9", "--tools", "fetch,search"],
      "env": {},
      "disabled": false,
      "autoApprove": []
    }
  }
}

Keep autoApprove empty so this server adds no per-tool auto-approval entries. Cline's global “Use MCP servers” approval and CLI --auto-approve setting still control whether calls prompt. For the CLI, pass --auto-approve false when you want global auto-approval disabled; its default is true. Its current documentation describes more than one settings location across IDE and CLI surfaces, so use the configuration UI or cline mcp instead of assuming a shared file path.

#Continue

Create .continue/mcpServers/agentskit.yaml:

name: AgentsKit MCP
version: 0.3.9
schema: v1
mcpServers:
  - name: agentskit
    type: stdio
    command: npx
    args:
      - "-y"
      - "@agentskit/mcp@0.3.9"
      - "--tools"
      - "fetch,search"

Restart the Continue extension and switch to Agent mode. MCP tools are not available in its other modes.

#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.9 \
  --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 published proof launches the pinned npm package through npx. 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 smoke:published
pnpm --filter @agentskit/mcp exec vitest run tests/coding-agent-hosts.test.ts

The local and in-memory proofs are offline. The published proof is credential-free but requires npm network access. Their sources are under packages/mcp/fixtures/.

#When Doc Bridge or a Registry helps

Use Doc Bridge when another agent needs package-aware documentation handoffs or must generate the right host wrapper. It improves configuration discovery; it is not required to run the safe fetch,search server.

Use --agents <id> when you want to expose a bounded agent from the AgentsKit Registry as one MCP tool. That path requires a provider and model credentials. The official MCP Registry is useful for discovery metadata and downstream catalogs, but its server.json does not replace these host-specific files. This recipe does not publish or submit the package to any registry or marketplace.

#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's configured approval and trust controls.

#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.