Skip to content

@jaypie/mcp

Model Context Protocol (MCP) server for Jaypie development. Provides tools for AI agents to access Jaypie skill documentation, release notes, and Datadog observability data.

@jaypie/mcp provides a complete MCP server that can be used via:

  • CLI: Run as npx jaypie-mcp for stdio-based MCP server
  • Express Handler: Integrate MCP via HTTP with mcpExpressHandler
  • Streamable HTTP Handler: Serve any fabric ServiceSuite from a Jaypie Lambda with mcpHttpHandler from @jaypie/mcp/http, without @modelcontextprotocol/sdk
Terminal window
npm install @jaypie/mcp
Terminal window
npx jaypie-mcp # Run MCP server via stdio
npx jaypie-mcp --verbose # Run with debug logging
import express from "express";
import { mcpExpressHandler } from "@jaypie/mcp";
const app = express();
app.use(express.json());
app.use("/mcp", await mcpExpressHandler({ version: "1.0.0" }));
import { createMcpServer } from "@jaypie/mcp";
const server = createMcpServer({ version: "1.0.0", verbose: true });
import express from "express";
import { createLambdaStreamHandler } from "@jaypie/express";
import { mcpHttpHandler } from "@jaypie/mcp/http";
const app = express();
app.use(express.json());
app.all("/mcp", mcpHttpHandler({ services: ["skill", "version"] }));
export const handler = createLambdaStreamHandler(app);

The handler answers one JSON body, or server-sent events when Accept prefers text/event-stream. Notifications answer 202 with no body; GET and DELETE answer 405. Pass suite to serve any ServiceSuite, and secrets, setup, or validate to run the Jaypie handler lifecycle. Deploy behind a Function URL with RESPONSE_STREAM invoke mode for streaming, or use createLambdaHandler for buffered JSON.

createMcpServer, mcpExpressHandler, mcpHttpHandler, and createMcpServerFromSuite (from @jaypie/fabric/mcp) accept services, an allowlist of tool names:

const server = createMcpServer({ services: ["skill", "version"] });

The server registers four router-style tools. Each tool returns help when called without a command.

Tool Description
skill Access Jaypie skill documentation
version Print the @jaypie/mcp version and build hash
release_notes Browse package release notes
datadog Query Datadog logs, monitors, metrics, synthetics, and RUM
skill() # List all skills
skill("jaypie") # Jaypie overview
skill("tests") # Testing patterns

Input: alias (optional). Omit or pass index to list all skills.

Takes no input.

Command Description Parameters
list List release notes, one page at a time package, since_version, limit, cursor (all optional)
read Read one release note package, version (both required)
release_notes() # Show help
release_notes("list", { package: "mcp" }) # Filter by package
release_notes("list", { cursor: "..." }) # Next page
release_notes("read", { package: "mcp", version: "0.5.0" }) # Read one note

list sorts by package ascending, then version descending. limit defaults to 50 and caps at 200. When more notes exist, the last line reads Next page: release_notes("list", { cursor: "..." }). The cursor carries package, since_version, and limit. Passing a package or since_version that differs from the cursor is an error.

Defined in @jaypie/datadog as datadogService. Requires Datadog API and application keys.

Command Description
logs Search log entries
log_analytics Aggregate logs with groupBy
monitors List and check monitors
synthetics List synthetic tests or get results for one test
metrics Query timeseries metrics
rum Search Real User Monitoring events
validate Check Datadog key configuration without calling the API
datadog() # Show help
datadog("logs", { query: "status:error", from: "now-1h" })
datadog("monitors", { status: "Alert,Warn" })
Variable Description
MCP_SKILLS_PATH Directory of local skills layered over the built-in Jaypie skills (built-ins remain available under jaypie:)
MCP_BUILTIN_SKILLS_PATH Relocate the bundled Jaypie skills directory (e.g., esbuild Lambda bundles)
MCP_RELEASE_NOTES_PATH Relocate the bundled release notes directory
Variable Description
DATADOG_API_KEY or DD_API_KEY Datadog API key
DATADOG_APP_KEY or DD_APP_KEY Datadog application key
DD_ENV Default environment filter
DD_QUERY Default query terms added to searches
DD_SITE Datadog site (defaults to datadoghq.com)

Either key may be held in Secrets Manager. SECRET_DATADOG_API_KEY, DATADOG_API_KEY_ARN, and DD_API_KEY_SECRET_ARN take an ARN; any key name also accepts a SECRET_<NAME> or <NAME>_SECRET reference.

import { createMcpServer, mcpExpressHandler } from "@jaypie/mcp";
import type { CreateMcpServerOptions, McpExpressHandlerOptions } from "@jaypie/mcp";
import { handleMcpRpc, handleMcpRpcBody, mcpHttpHandler } from "@jaypie/mcp/http";
import type { McpHttpHandlerOptions, McpRpcOptions } from "@jaypie/mcp/http";