The 4 patterns that survive in production across 6 MCP servers.
Token-efficient defaults, pluggable error redaction, declarative aggregation, and tool-discovery meta — extracted from 6 consumer servers. Single evolution point. Cascade-automated to all consumers.
Shared MCP server building blocks for @us-all servers — token-efficient by design (category toggles, extractFields, search-tools meta, registry, runtime)
2026-11-15
Estrelas
—
Ferramentas
—
Disponibilidade
—
When to use this
You're starting a new MCP server and want token-efficient defaults from day 1.
Your existing server is past ~100 tools and clients (Cursor, Claude Desktop) start struggling with the tool list.
You have multiple MCP servers and don't want each to reinvent slim-projection / category toggles / error redaction / aggregation boilerplate.
You want a search-tools meta-tool so the LLM discovers tools at runtime instead of preloading every schema.
If your MCP has fewer than 20 tools and one auth mode, you probably don't need this — just ship.
When wired through createWrapToolHandler, tools whose schemas declare extractFields get caller-supplied projection automatically. MCP SDK validation drops undeclared fields, so each consumer must opt in per tool schema or use an explicit passthrough schema.
2. ToolRegistry<TCategory> + search-tools
Track tools by category. Pair with <PREFIX>_TOOLS / <PREFIX>_DISABLE env vars to load only relevant categories — biggest LLM context token saver.
import { ToolRegistry, parseEnvList, createSearchToolsMetaTool } from "@us-all/mcp-toolkit";
const CATEGORIES = ["metrics", "monitors", "logs", "meta"] as const;
type Category = (typeof CATEGORIES)[number];
const registry = new ToolRegistry<Category>({
enabledCategories: parseEnvList(process.env.DD_TOOLS),
disabledCategories: parseEnvList(process.env.DD_DISABLE),
});
let currentCategory: Category = "metrics";
function tool(name: string, desc: string, schema: any, handler: any) {
registry.register(name, desc, currentCategory);
if (registry.isEnabled(currentCategory)) server.tool(name, desc, schema, handler);
}
// Always-on meta-tool: lets the LLM discover other tools at runtime
const meta = createSearchToolsMetaTool(registry, CATEGORIES);
currentCategory = "meta";
tool("search-tools", "Discover tools by query", meta.schema.shape, wrapToolHandler(meta.handler));
For tools that fan out 3–7 sequential API calls into one structured response. Replaces the Promise.allSettled + per-slot caveats.push(...) block that consumers all repeated.
.github/workflows/cascade-bump.yml — when toolkit publishes, opens an automated PR in each of the 6 consumer repos that:
bumps the @us-all/mcp-toolkit dep pin to the new version
bumps the consumer's PATCH version
runs pnpm install + build + test (PR creation gated on success)
inserts a "최근 변경사항" entry in CLAUDE.md
PRs are not auto-merged — humans gate each consumer release. Re-run safe (skips if already pinned).
Auth: GitHub App us-all-bot (per-matrix-job installation token, no PAT, no expiry, scoped install). Setup walkthrough in CLAUDE.md.
Consumer suite (proof of concept)
Six production servers built on this toolkit. All MIT, distributed via npm under @us-all/*, searchable on the MCP Server Registry under io.github.us-all/*, and listed on Glama.
~990 LOC of duplicated boilerplate eliminated across the suite at v0.1.0–v1.0.0 migrations.
STANDARD.md
STANDARD.md is the why — the conventions and rationale. This package is the how. New MCP authors read STANDARD.md first; experienced ones go straight to the API.
Shared MCP server building blocks for @us-all servers — token-efficient by design (category toggles, extractFields, search-tools meta, registry, runtime)
Ainda não há lista de ferramentas. Servidores remotos recebem uma após a primeira verificação de saúde.
Perguntas frequentes
Perguntas
Como instalo @us All/mcp Toolkit?
Copie nesta página a configuração stdio para Cursor, Claude Desktop, Claude Code ou VS Code. Ela usa a instalação do publicador, não um proxy do PlugMCP.
@us All/mcp Toolkit precisa de uma chave de API?
Este registro não lista nenhuma variável de ambiente obrigatória.
Qual transporte @us All/mcp Toolkit usa?
@us All/mcp Toolkit roda localmente via stdio.
Quando @us All/mcp Toolkit foi verificado pela última vez?
Última verificação: 2026-11-15. Shared MCP server building blocks for @us-all servers — token-efficient by design (category toggles, extractFields, search-tools meta, registry, runtime)