agentleFS
KaryawanSurgaKaryawanSurga/tokensaver-plugin/skills/gateway/SKILL.md

gateway

Skill1 starsChanged 45 days agoMITView on GitHub

One MCP endpoint for many MCP servers, with profiles, policy, and budgets. Use when a project has several MCP servers, when servers must be grouped per context, when tool calls must be restricted (allow/deny, read-only), or when auditing which tools a setup exposes.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check gateway_status first when tools seem missing — a failed server explains itself.

    line 40
  2. Very specific:

    Use profiles (serve --profile docs) to keep the active tool set small.

    line 41
  3. Very specific:

    Use gateway_budget before enabling a heavy profile.

    line 43

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

MCP gateway

Aggregate many stdio MCP servers behind one endpoint. Tools appear namespaced as server__tool; profiles select which servers are active; policy rules and read-only mode restrict what can run; budgets show the schema cost.

Setup (required before use)

The gateway serves from a project-local config:

npx -y mcp-gateway init
npx -y mcp-gateway add filesystem -- npx -y @modelcontextprotocol/server-filesystem .
npx -y mcp-gateway add tokensaver -- npx -y tokensaver-mcp
npx -y mcp-gateway serve

MCP tools exposed by the gateway

ToolUse it for
server__toolEvery allowed upstream tool, namespaced by origin.
gateway_statusHealth: which servers connected, tool counts, policy summary, schema cost.
gateway_policyThe active rules and which tools are blocked, with reasons.
gateway_budgetToken cost of aggregated tool schemas, ranked.

Workflow

  1. Check gateway_status first when tools seem missing — a failed server explains itself.
  2. Use profiles (serve --profile docs) to keep the active tool set small.
  3. Set readOnly: true per profile for research sessions.
  4. Use gateway_budget before enabling a heavy profile.

Tips

  • Policy rules support globs (delete_*) and are first-match-wins.
  • Audit logging can be enabled per config (audit.enabled) and read back with mcp-gateway stats.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.