
Security News
GitHub Actions Adds cache-mode to Limit Cache Poisoning Risk
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.
@us-all/mcp-toolkit
Advanced tools
Shared MCP server building blocks for @us-all servers — token-efficient by design (category toggles, extractFields, search-tools meta, registry, runtime)
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.
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.
import {
applyExtractFields, // token-efficient response projection
ToolRegistry, // category toggles + search-tools
createWrapToolHandler, // pluggable error redaction + structured errors
// and:
} from "@us-all/mcp-toolkit";
import { aggregate } from "@us-all/mcp-toolkit/aggregate";
applyExtractFields — token-efficient projectionComma-separated dotted paths with * wildcards. Slim large reads to what the model needs.
import { applyExtractFields } from "@us-all/mcp-toolkit/extract-fields";
const dashboard = { id: "abc", title: "...", widgets: [{ definition: { type: "timeseries", queries: [...] } }] };
applyExtractFields(dashboard, "id,title,widgets.*.definition.type");
// → { id: "abc", title: "...", widgets: [{ definition: { type: "timeseries" } }] }
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.
ToolRegistry<TCategory> + search-toolsTrack 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));
Real-world impact (datadog, 165 tools): default load = 25K schema tokens; DD_TOOLS=metrics,monitors = 3.8K (−85%).
createWrapToolHandler — error redaction + structured errorsReplaces the tools/utils.ts boilerplate that 6 consumer repos all reinvented.
import { createWrapToolHandler } from "@us-all/mcp-toolkit";
const wrapToolHandler = createWrapToolHandler({
redactionPatterns: [/DD_API_KEY/i], // merged with built-in defaults
errorExtractors: [
{
match: (e) => e instanceof WriteBlockedError,
extract: (e) => ({ kind: "passthrough", text: (e as Error).message }),
},
{
match: (e) => e instanceof DatadogApiError,
extract: (e) => ({
kind: "structured",
data: { message: e.message, status: e.code, details: e.body },
}),
},
],
});
Built-in redactions: api_key, app_key, authorization, bearer …, password, secret, token. Use the bare wrapToolHandler export for zero-config.
aggregate(fetchers, caveats, formatReason?) — declarative aggregationFor 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.
import { aggregate } from "@us-all/mcp-toolkit/aggregate";
const caveats: string[] = [];
const result = await aggregate(
{
monitor: () => api.getMonitor(id),
state: () => api.getMonitorState(id),
events: () => api.searchEvents({ monitorId: id, window: "30m" }),
downtimes: () => api.listDowntimes({ monitorId: id }),
},
caveats,
);
// result: { monitor, state, events, downtimes } — null per slot on failure
// caveats: ["state failed: timeout", ...] — surfaces partial failures
Type inferred from the input object. Rejected slots become null. formatReason lets callers customize caveat strings.
pnpm add @us-all/mcp-toolkit
# peer deps
pnpm add @modelcontextprotocol/sdk zod
Node 22+, ESM, TypeScript strict. Peer SDK: ^1.27 || ^1.28 || ^1.29.
Sub-exports for tree-shaking:
@us-all/mcp-toolkit — main barrel@us-all/mcp-toolkit/extract-fields@us-all/mcp-toolkit/registry@us-all/mcp-toolkit/wrap-tool-handler@us-all/mcp-toolkit/aggregate.github/workflows/cascade-bump.yml — when toolkit publishes, opens an automated PR in each of the 6 consumer repos that:
@us-all/mcp-toolkit dep pin to the new versionpnpm install + build + test (PR creation gated on success)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.
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.
| Server | Tools | npm/mo | Registry namespace |
|---|---|---|---|
| @us-all/datadog-mcp | 165 | 5,010 | io.github.us-all/datadog |
| @us-all/openmetadata-mcp | 170 | 3,122 | io.github.us-all/openmetadata |
| @us-all/google-drive-mcp | 98 | 3,243 | io.github.us-all/google-drive |
| @us-all/mlflow-mcp | 82 | 2,717 | io.github.us-all/mlflow |
| @us-all/android-mcp | 76 | 2,405 | io.github.us-all/android |
| @us-all/unifi-mcp | 54 | 2,566 | io.github.us-all/unifi |
~990 LOC of duplicated boilerplate eliminated across the suite at v0.1.0–v1.0.0 migrations.
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.
pnpm install
pnpm build
pnpm test # 54 unit tests
Coverage: extract-fields edges (wildcards, backtick keys, array projection), registry semantics (allowlist/denylist, search matching), wrap-tool-handler (success/error paths, custom redaction, errorExtractors), aggregate (success/reject mix, custom formatReason, concurrency).
See CONTRIBUTING.md. New shared patterns belong here — single source of truth for the @us-all suite.
FAQs
Shared MCP server building blocks for @us-all servers — token-efficient by design (category toggles, extractFields, search-tools meta, registry, runtime)
The npm package @us-all/mcp-toolkit receives a total of 312 weekly downloads. As such, @us-all/mcp-toolkit popularity was classified as not popular.
We found that @us-all/mcp-toolkit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.