@procedures/mcp weekly downloads statistics
By procedures (4 listings) · npm · MCP servers
Map typed procedures to MCP tools: JSON Schema from Zod, tool names, and input and result conversion for Model Context Protocol servers.
@procedures/mcp has 10,290 recorded weekly downloads on npm, an increase of 124% over the past 30 days, ranking #1245 of 3,247 tracked listings.
About @procedures/mcp
@procedures/mcp
Core types and utilities for MCP (Model Context Protocol) integration. Converts Zod schemas and procedures to MCP-compatible formats.
Table of Contents
- Overview
- Installation
- Architecture
- Quick Start
- API Reference
- Tool Filtering
- Integration
- Requirements
- License
Overview
mcp provides the foundation for MCP integration:
- Schema Conversion - Convert Zod schemas to JSON Schema format
- Procedure Mapping - Transform procedures to MCP tool definitions
- Filtering - Control which procedures become MCP tools
- Type Definitions - TypeScript types for MCP tools and filters
Installation
npm install @procedures/mcp
Architecture
Conversion Pipeline
graph LR
subgraph "Input"
Proc[Procedure]
Zod[Zod Schema]
end
subgraph "mcp Package"
Z2J[zodToJsonSchema]
P2T[procedureToMcpTool]
end
subgraph "Output"
JSON[JSON Schema]
Tool[MCP Tool]
end
Zod --> Z2J
Z2J --> JSON
Proc --> P2T
JSON --> P2T
P2T --> Tool
Procedure to MCP Tool Mapping
graph TB
subgraph "Procedure"
Path[path: string[]]
Meta[metadata.description]
Input[input: ZodSchema]
Handler[handler: Function]
end
subgraph "MCP Tool"
Name[name: string]
Desc[description: string]
Schema[inputSchema: JSONSchema]
end
Path -->|"join('.')"| Name
Meta --> Desc
Input -->|zodToJsonSchema| Schema
System Integration
graph TB
subgraph "Procedure Registry"
R1[fs.read]
R2[git.commit]
R3[shell.run]
R4[...]
end
subgraph "mcp"
Convert[proceduresToMcpTools]
Filter[McpToolFilter]
end
subgraph "client-mcp"
Transport[McpServerTransport]
end
subgraph "Claude"
Tools[MCP Tools]
end
R1 --> Convert
R2 --> Convert
R3 --> Convert
R4 --> Convert
Filter --> Convert
Convert --> Transport
Transport --> Tools
Quick Start
import { proceduresToMcpTools, zodToJsonSchema } from "@procedures/mcp";
import { PROCEDURE_REGISTRY } from "@procedures/client";
// Convert all registered procedures to MCP tools
const tools = proceduresToMcpTools(PROCEDURE_REGISTRY.getAll());
// Convert a Zod schema to JSON Schema
const jsonSchema = zodToJsonSchema(myZodSchema);
API Reference
zodToJsonSchema
Converts a Zod schema to JSON Schema format for MCP tool input definitions.
function zodToJsonSchema(schema: ZodType): JsonSchema;
Supported Zod Types:
| Zod Type | JSON Schema |
|---|---|
z.string() | { type: "string" } |
z.number() | { type: "number" } |
z.boolean() | { type: "boolean" } |
z.array() | { type: "array", items: ... } |
z.object() | { type: "object", properties: ... } |
z.enum() | { type: "string", enum: [...] } |
z.optional() | Removes from required |
z.default() | Adds default value |
z.describe() | Adds description |
Example:
import * as z from "zod";
import { zodToJsonSchema } from "@procedures/mcp";
const schema = z.object({
path: z.string().describe("File path"),
encoding: z.enum(["utf8", "base64"]).default("utf8"),
});
const jsonSchema = zodToJsonSchema(schema);
// {
// type: "object",
// properties: {
// path: { type: "string", description: "File path" },
// encoding: { type: "string", enum: ["utf8", "base64"], default: "utf8" }
// },
// required: ["path"]
// }
procedureToMcpTool
Converts a single procedure to an MCP tool definition.
function procedureToMcpTool(procedure: Procedure): McpTool;
interface McpTool {
name: string; // Dot-joined path: "fs.read"
description: string; // From procedure metadata
inputSchema: JsonSchema; // Converted from Zod
}
Example:
const tool = procedureToMcpTool(fsReadProcedure);
// {
// name: "fs.read",
// description: "Read file contents",
// inputSchema: { type: "object", properties: { path: ... } }
// }
The description of a procedure that procedure.define made tells the effects of its body. The host finds these effects before the definition (inferredEffects). toolDescription() adds one sentence:
// A defined procedure with the description "Write the report"
toolDescription(defined);
// "Write the report. It reads fs and registry and changes store."
The description of a procedure of code does not change.
proceduresToMcpTools
Converts multiple procedures to MCP tools with optional filtering.
function proceduresToMcpTools(
procedures: Procedure[],
filter?: McpToolFilter
): McpTool[];
Example:
// Convert all procedures
const allTools = proceduresToMcpTools(PROCEDURE_REGISTRY.getAll());
// Convert with filtering
const filteredTools = proceduresToMcpTools(procedures, {
includeTags: ["fs", "git"],
excludeInternal: true,
});
Tool Filtering…
Description from the npm listing.
- mcp
- model-context-protocol
- json-schema
- zod
- tools
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (135)Similar npm MCP servers plugins
All 20 @procedures/mcp alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@procedures/mcp. First seen Nov 18, 2026; last successful collection Nov 18, 2026. See the methodology.