picomcp docs
Search and read the picomcp docs while your agent writes TypeScript MCP servers.
Installation
Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).
picomcp-docsclaude mcp add picomcp-docs -- npx -y picomcp-docs@0.1.0
{
"mcpServers": {
"picomcp-docs": {
"command": "npx",
"args": [
"-y",
"picomcp-docs@0.1.0"
]
}
}
}
Documentation
Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.
Sommaire
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 dependencies | Small enough to read in one sitting and to audit in one review. A size budget in CI keeps it that way. |
| Typed from your schema | Zod 4, ArkType and Valibot through Standard Schema. Typed handlers, generated JSON Schema, readable validation errors the model can act on. |
| Runs anywhere | Node 22+, Bun, Deno, Cloudflare Workers. The core uses Web APIs only: no Node built-ins. |
| stdio and Streamable HTTP | Same server, one option apart. Plus a Web-standard fetch handler for Hono, Next.js, Workers and friends. |
| Testable without a client | server.call("forecast", { city: "Lyon" }) runs a tool in-process, with type-checked names and arguments. |
| Verified against the official SDK | The 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 pagellms-full.txt: the whole documentation in one filedocs/<page>.md: any page as Markdownpicomcp-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
Questions fréquentes
Qu'est-ce que picomcp docs ?
Search and read the picomcp docs while your agent writes TypeScript MCP servers.
Comment installer picomcp docs ?
Il s'exécute sur votre machine. Dans Claude Code : claude mcp add picomcp-docs -- npx -y picomcp-docs@0.1.0. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.
Faut-il une clé API pour picomcp docs ?
Son entrée au registre n'indique aucune clé ni secret obligatoire. Certaines fonctions peuvent tout de même demander un compte auprès du service auquel il se connecte.
picomcp docs est-il open source ?
Oui. Son code est sur GitHub sous licence MIT.
Qui maintient picomcp docs ?
Il est publié par picomcp. AI.tn le référence sans le maintenir ni le recommander.
Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.