picomcp docs

السجل الرسمي البحث والويب

Search and read the picomcp docs while your agent writes TypeScript MCP servers.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

NPM package picomcp-docs
Claude Code
claude mcp add picomcp-docs -- npx -y picomcp-docs@0.1.0
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "picomcp-docs": {
            "command": "npx",
            "args": [
                "-y",
                "picomcp-docs@0.1.0"
            ]
        }
    }
}

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. Why picomcp
  2. Install
  3. A tour in five snippets
  4. Connect a client
  5. Test it
  6. Docs for humans and agents
  7. Scope
  8. Contributing
  9. License

English · Français · Deutsch · Italiano · Español · Русский · 简体中文 · 日本語

picomcp is a zero-dependency TypeScript framework for Model Context Protocol servers. Give any LLM real tools in one file: typed with your schema library, served over stdio or HTTP, running on Node, Bun, Deno and the edge.

import { pico } from "picomcp";
import { z } from "zod";

pico({ name: "weather" })
  .tool("forecast", {
    description: "Get the forecast for a city.",
    input: z.object({ city: z.string() }),
    run: ({ city }) => getForecast(city),
  })
  .serve();

That is a complete server. Read the docs →

Why picomcp

3.9 kB gzipped, 0 dependenciesSmall enough to read in one sitting and to audit in one review. A size budget in CI keeps it that way.
Typed from your schemaZod 4, ArkType and Valibot through Standard Schema. Typed handlers, generated JSON Schema, readable validation errors the model can act on.
Runs anywhereNode 22+, Bun, Deno, Cloudflare Workers. The core uses Web APIs only: no Node built-ins.
stdio and Streamable HTTPSame server, one option apart. Plus a Web-standard fetch handler for Hono, Next.js, Workers and friends.
Testable without a clientserver.call("forecast", { city: "Lyon" }) runs a tool in-process, with type-checked names and arguments.
Verified against the official SDKThe test suite drives picomcp with @modelcontextprotocol/sdk over both transports.

Install

npm i picomcp zod        # or: bun add · pnpm add · deno add npm:picomcp

Or scaffold a project with a server, an entry point and a test:

npx picomcp init my-server

A tour in five snippets

Tools are functions the model calls. Return a string, an object, media, or throw:

server.tool("search_issues", {
  description: "Search open issues. Use it before filing a new one.",
  input: z.object({ query: z.string(), limit: z.number().max(50).default(10) }),
  annotations: { readOnlyHint: true },
  run: async ({ query, limit }, { signal }) => searchIssues(query, limit, { signal }),
});

Structured output is validated and sent as structuredContent:

server.tool("get_price", {
  input: z.object({ sku: z.string() }),
  output: z.object({ cents: z.number().int(), currency: z.literal("EUR") }),
  run: async ({ sku }) => ({ cents: await priceOf(sku), currency: "EUR" }),
});

Resources use URI templates whose variables are typed from the string:

server.resource("github://{owner}/{repo}/readme", {
  mimeType: "text/markdown",
  read: ({ owner, repo }) => fetchReadme(owner, repo), // owner: string, repo: string
});

Prompts become slash commands in clients:

server.prompt("review", {
  args: z.object({ diff: z.string().describe("The diff to review") }),
  run: ({ diff }) => `Review this diff for bugs:\n\n${diff}`,
});

Transports are one line each:

await server.serve();                        // stdio, for local clients
await server.serve({ http: 3000 });          // Streamable HTTP on Node, Bun or Deno
export default { fetch: server.fetch };      // Cloudflare Workers, Deno Deploy, Bun…

Connect a client

claude mcp add weather -- node /absolute/path/server.ts                     # Claude Code, stdio
claude mcp add --transport http weather https://example.com/mcp             # Claude Code, HTTP
npx @modelcontextprotocol/inspector node /absolute/path/server.ts           # MCP Inspector

Claude Desktop, Cursor and VS Code configs are in Connect a client.

Test it

import { expect, it } from "vitest";
import { server } from "./server.ts";

it("forecasts", async () => {
  const result = await server.call("forecast", { city: "Lyon" });
  expect(result.isError).toBeUndefined();
});

Docs for humans and agents

The documentation has typo-tolerant search on ⌘ K, and every page is also published for AI agents:

  • llms.txt: an index of every page
  • llms-full.txt: the whole documentation in one file
  • docs/<page>.md: any page as Markdown
  • picomcp-docs: the docs as an MCP server, built with picomcp. claude mcp add picomcp-docs -- npx -y picomcp-docs

Scope

picomcp is the server half of MCP, built for the stateless request/response model that most servers need. It covers lifecycle, tools (with structured output and annotations), resources and templates, prompts, cancellation and both transports.

It does not yet support features that need the server to message the client on its own: sampling, elicitation, roots, logging and progress notifications, subscriptions. If you need those today, use the official @modelcontextprotocol/sdk. The full list is in Protocol coverage.

Contributing

Issues and pull requests are welcome. Read CONTRIBUTING.md first, then:

git clone https://github.com/picomcp/picomcp && cd picomcp
npm install
npm run check    # typecheck, tests, build, size budget, package lint

Working with a coding agent? It will find its instructions in AGENTS.md.

License

MIT

الأسئلة الشائعة

ما هو picomcp docs؟

Search and read the picomcp docs while your agent writes TypeScript MCP servers.

كيف أثبّت picomcp docs؟

يعمل على جهازك. في Claude Code: claude mcp add picomcp-docs -- npx -y picomcp-docs@0.1.0. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج picomcp docs إلى مفتاح API؟

لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.

هل picomcp docs مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون picomcp docs؟

ينشره picomcp. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.