agentskit.js
Tools

MCP bridge

Consume or publish Model Context Protocol tools. Interop with Claude Desktop, Cursor, Continue, etc.

#Consume an MCP server

import { spawn } from 'node:child_process'
import { createMcpClient, createStdioTransport, toolsFromMcpClient } from '@agentskit/tools/mcp'

const child = spawn('my-mcp-server', [], { stdio: ['pipe', 'pipe', 'inherit'] })
const client = await createMcpClient({
  transport: createStdioTransport(child),
})

const mcpTools = await toolsFromMcpClient(client)

const runtime = createRuntime({ adapter, tools: [...mcpTools, ...myTools] })

#Publish AgentsKit tools as MCP

import { createAgentsKitMcpServer } from '@agentskit/mcp'

const server = createAgentsKitMcpServer({
  serverInfo: { name: 'agentskit-devtools', version: '1.0.0' },
  tools: [github(...), slack(...)],
})

#Transports

  • stdio β€” built in for child-process and current-process pipes
  • in-memory β€” built in for tests
  • custom β€” implement McpTransport for HTTP, WebSocket, or another framing layer

The package does not ship HTTP or WebSocket listeners. Authentication and authorization belong to the custom transport or host boundary.

#Devtools over MCP

@agentskit/tools/mcp-devtools exposes a running runtime as MCP tools β€” any MCP-aware client (Claude Code, Cursor, Codex) can list sessions, inspect messages, pause / step, replay, and run evals.

import { createAgentsKitMcpServer } from '@agentskit/mcp'
import { devtoolsTools } from '@agentskit/tools/mcp-devtools'

const server = createAgentsKitMcpServer({
  serverInfo: { name: 'agentskit-devtools', version: '1.0.0' },
  tools: devtoolsTools({ inspector: myRuntimeInspector }),
})

The inspector is a capability bag β€” only methods you implement get exposed. Read-only consumers pass listSessions + inspectSession and never expose pause / step / replay. Auth lives at the transport (bearer header on HTTP/WS, file perms on stdio).

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.