AGENT SKILL

mcp-code-orchestrate

Use when one task needs the SAME tool-call shape repeated across MANY items - an xref-walk over dozens of functions, a descriptor sweep over many SMILES, batch-resolving or screening a list of papers, or aggregating one query across several MCP servers. Write ONE script (Python via the Bash tool) that calls the underlying provider CLIs, native libraries, or MCP stdio, filters and aggregates IN-CODE, and returns ONLY the distilled result, instead of N model round-trips that each bloat context with raw tool output. This is Anthropic's code-execution-with-MCP pattern (up to ~98.7% fewer tokens on fan-out work). Decision rule - reach for it once you would otherwise make more than about 5 same-shape tool calls. Not for a single tool call.

License 许可
MIT
最近更新
2026-11-02
Stars
★ 0
Forks
0

01 前言 Front Matter

name
mcp-code-orchestrate
license
MIT
description
Use when one task needs the SAME tool-call shape repeated across MANY items - an xref-walk over dozens of functions, a descriptor sweep over many SMILES, batch-resolving or screening a list of papers, or aggregating one query across several MCP servers. Write ONE script (Python via the Bash tool) that calls the underlying provider CLIs, native libraries, or MCP stdio, filters and aggregates IN-CODE, and returns ONLY the distilled result, instead of N model round-trips that each bloat context with raw tool output. This is Anthropic's code-execution-with-MCP pattern (up to ~98.7% fewer tokens on fan-out work). Decision rule - reach for it once you would otherwise make more than about 5 same-shape tool calls. Not for a single tool call.

03 SKILL.md 正文

MCP Code Orchestrate

The 98.7% fan-out token-cut. When you would otherwise call the same MCP tool N times and let every raw result land in the context window, write one script that does the loop, filters/aggregates in code, and returns only the distilled answer. Anthropic's "Code execution with MCP" reports a single example dropping from ~150,000 tokens of tool chatter to ~2,000 (≈98.7% fewer) by moving the fan-out into code instead of the model loop.

The pattern in one breath

Direct tool-calling is right for one call: ask, get the answer, done. It is pathological for fan-out — "enumerate-then-filter" across the 39-server MCP fleet — because:

  1. Every tool definition you load is paid for on every turn (catalogue tax).
  2. Every tool result (a 4 KB JSON blob × N functions / molecules / papers) is dumped verbatim into context, and the model re-reads all of it each turn.
  3. The model is doing a mechanical loop (iterate, test a predicate, collect hits) that a for loop does for free, deterministically, off-context.

The fix: the agent writes one Python script (run via the Bash tool) that calls the underlying provider — its native CLI/library when one exists, else the MCP server over stdio/HTTP — loops over all the items, applies the filter in code, and prints only the distilled result (a shortlist, a count, the 12 hits out of 4,000). Raw payloads stay on disk / in process memory; only the answer enters the conversation.

Decision rule (use this / don't)

How a script reaches a provider — three access modes

1. Native CLI or Python library (best — zero MCP overhead)

2. MCP server over stdio (one session, many calls)

Example: spawn once, loop many.

sess = MCPSession(["npx", "-y", "mcp-searxng@1.8.0"],

env={**os.environ, "SEARXNG_URL": "http://127.0.0.1:8890"})

hits = [sess.call("searxng_web_search", {"query": q}) for q in queries]

sess.close()

3. MCP server over HTTP (already-running servers)

Concrete recipes

(a) RE xref-walk — find the hot functions across a whole binary

04 同仓库更多 Skills

Prekzursil
Prekzursil/agent-skills-toolchain

clarify-requirements

Resolve genuine pre-execution ambiguity by scanning repo context, generating 1-6 grounded options, and asking 1-3 focused questions via AskUserQuestion. NOT for mid-task use (injection risk); NOT when the goal is already unambiguous; use to disambiguate vague prompts before any file edits.

★ 0
Prekzursil
Prekzursil/agent-skills-toolchain

openmm-md

Run FREE, open-source, Windows-native GPU molecular dynamics via the openmm-md MCP (OpenMM + CUDA on the local NVIDIA GPU). Use for protein / protein-ligand MD when you want a free stack or are on Windows without a Schrodinger license. Covers the full workflow (prepare, solvate, minimize, equilibrate, production, analyze, mmgbsa) AND an honest decision guide vs Schrodinger Desmond, including how to run Desmond legitimately on Linux or a cloud GPU with a real license. This is a deliberately LESSER free alternative and does NOT replace the schrodinger MCP tools. Do NOT use it to pick a free tool when a validated FEP+, WaterMap, IFD-MD, or Prime MM-GBSA result is actually required.

Skill与智能体开发
★ 0
Prekzursil
Prekzursil/agent-skills-toolchain

visual-review

Take screenshots of web pages and UI using Playwright for visual review and iteration

演示文稿测试与质量
★ 0
Prekzursil
Prekzursil/agent-skills-toolchain

status

Diagnostic status report — shows metaswarm installation state, project setup, and potential issues

★ 0
Prekzursil
Prekzursil/agent-skills-toolchain

start

Use when starting work on any task, when the user mentions metaswarm, or when the user wants to begin tracked development work

Skill与智能体开发
★ 0
Prekzursil
Prekzursil/agent-skills-toolchain

setup

Interactive project setup — detects your project, configures metaswarm, writes project-local files

★ 0