Skip to main content

Requirements

  • Bun 1.x or Node.js 20+
  • Wrangler CLI — required for Cloudflare Workers deployments
  • A Cloudflare account with Workers and KV access — required for Worker deployments

Install the package

npm install @phake/mcp

Package exports

@phake/mcp exposes three entry points:
ExportImport pathDescription
Core@phake/mcpdefineTool, createMCPServer, and all helpers
Worker runtime@phake/mcp/runtime/workerCloudflare Workers adapter internals
Node runtime@phake/mcp/runtime/nodeNode.js adapter internals (experimental)
Most projects only need the core entry point. The runtime exports are used internally by the adapters and are available if you need lower-level access.
import { defineTool, createMCPServer } from "@phake/mcp";

Peer dependencies

The following peer dependencies are optional. Install them only if you use the corresponding runtime or feature:
PackageWhen required
honoNode.js runtime (node-hono template)
@hono/node-serverNode.js runtime (node-hono template)
better-sqlite3SqliteSessionStore storage backend
If you scaffold a project with bun create @phake/mcp, the template’s package.json already lists the correct peer dependencies for your chosen runtime. You only need to install them manually when adding @phake/mcp to an existing project.
Install peer dependencies as needed:
# Node.js runtime
npm install hono @hono/node-server

# SQLite session store
npm install better-sqlite3