External Agent Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited External Agent Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Local stdio MCP runtime that lets Codex delegate work to installed external CLI coding agents. Codex starts asynchronous jobs through one MCP call, then polls for status, free-form results, logs, and sandbox patch artifacts.
The server is dependency-free Node.js and speaks MCP over line-delimited JSON-RPC on stdio.
Initial provider adapters:
/usr/local/bin/cursor agent --print/opt/homebrew/bin/gemini --prompt .../opt/homebrew/bin/claude --printModel selection is caller-controlled with the model argument. The MCP server does not hardcode routing logic such as "simple task uses X, complex task uses Y".
delegate_tasksCreates one or more async jobs.
Required arguments:
repo_path: absolute repository/workspace pathprovider: cursor, gemini, or claudetasks: array of task strings or task objectsCommon optional arguments:
mode: analysis or sandbox_patch; defaults to analysismodel: provider-specific model overridefiles: focus files under repo_pathextra_context: additional backgroundtimeout_sec: defaults to 600, capped at 1800max_output_chars: defaults to 30000, capped at 100000base_ref: git ref for sandbox_patch; defaults to HEADTask objects may override provider, model, mode, files, extra_context, timeout_sec, max_output_chars, and base_ref.
job_statusReturns job lifecycle state and stdout/stderr tails. Status values are:
queuedrunningsucceededfailedtimed_outcancelledorphanedIf no job_id or job_ids are supplied, recent jobs are returned.
job_resultReturns the external agent's free-form result text plus MCP-managed metadata:
result.mddiff.patch, diff.stat, and changed files for sandbox_patchsearch_jobsSearches historical jobs by lightweight metadata and previews. This is the stable history lookup interface; full text and patch artifacts should still be read with job_result.
Supported filters:
repo_path: exact repository pathprovider: cursor, gemini, or claudemodel: exact model stringmode: analysis or sandbox_patchstatus: any of queued, running, succeeded, failed, timed_out,cancelled, or orphaned
created_after / created_before: ISO timestampsquery: case-insensitive substring search over title, task, result preview,paths, provider/model/mode, and focused files
limit: defaults to 20, capped at 100cursor: opaque pagination cursor from a previous responseThe response returns job summaries, previews, hashes, and artifact paths. It does not return large stdout, stderr, result, or patch bodies.
cancel_jobsCancels queued or running jobs.
cleanup_jobsRemoves terminal job logs/artifacts and associated sandbox worktrees. Use force: true only when cleaning non-terminal jobs intentionally.
agent_statusChecks provider binaries and reports capability metadata:
supports_analysissupports_sandbox_patchsupports_modelssafe_write_modequality_fixRuns allow-listed deterministic quality commands over a bounded file set. This path is for mechanical fixes and does not spend LLM agent tokens.
Default commands:
ruff_format: ruff format <files>ruff_safe_fix: ruff check --fix <files>Additional commands:
ruff_check: ruff check <files>ruff_unsafe_fix: ruff check --fix --unsafe-fixes <files>; requiresallow_unsafe_fixes: true
Jobs are persisted under:
~/.cache/external-agent-mcp/jobsOverride with:
EXTERNAL_AGENT_JOB_ROOT=/path/to/jobsEach job directory contains:
job.jsonevents.jsonlstdout.logstderr.logresult.mddiff.patchdiff.statIf the MCP server restarts, non-terminal jobs from the previous process are marked orphaned. Completed job artifacts remain readable.
The current storage implementation is FileJobStore: metadata is read from job.json, events are appended to events.jsonl, and large artifacts remain as plain files. search_jobs is intentionally defined above this storage layer so a future SQLite-backed index can replace the file scan without changing the MCP tool contract.
New jobs include stable metadata for history and future caching:
schema_versionrepo_headtask_hashprompt_hashduration_msresult_previewmode: "sandbox_patch" requires a git repository. The server creates an isolated git worktree under the job directory, runs the external agent there, and then captures git diff --binary and git diff --stat.
The original repository is not modified by agent writes.
Provider write policy is conservative:
--force or --yolo.
--approval-mode auto_edit.--permission-mode acceptEdits with a restricted tool list.--force, --yolo, orbypass-permission flags.
Add this to ~/.codex/config.toml or a trusted project .codex/config.toml:
[mcp_servers.external_agent]
command = "node"
args = ["/Users/luchong/OpenSourceProject/external-agent-mcp/src/server.mjs"]
startup_timeout_sec = 10
tool_timeout_sec = 900
[mcp_servers.external_agent.env]
CURSOR_AGENT_BIN = "/usr/local/bin/cursor"
GEMINI_BIN = "/opt/homebrew/bin/gemini"
CLAUDE_BIN = "/opt/homebrew/bin/claude"
RUFF_BIN = "ruff"
EXTERNAL_AGENT_ALLOWED_ROOTS = "/Users/luchong/Desktop:/Users/luchong/OpenSourceProject"
EXTERNAL_AGENT_MAX_CONCURRENCY = "2"After changing MCP config, refresh/restart Codex or start a new thread so the new tool surface is loaded.
{
"provider": "cursor",
"model": "composer-2.5",
"repo_path": "/Users/luchong/Desktop/Agnes_Core",
"mode": "analysis",
"tasks": [
"Map the agent stream cancellation call path. Return concise findings with file paths.",
"Audit prompt/skill dispatch boundaries. Return risks and missing tests."
],
"timeout_sec": 900
}{
"provider": "claude",
"repo_path": "/Users/luchong/Desktop/Agnes_Core",
"mode": "sandbox_patch",
"tasks": [
{
"task": "Fix the focused Ruff SIM102 issue and summarize the patch.",
"files": ["services/example/path.py"]
}
]
}Then call job_status until terminal and job_result to inspect the free-form result, logs, and patch path.
{
"repo_path": "/Users/luchong/Desktop/Agnes_Core",
"provider": "cursor",
"model": "composer-2.5",
"mode": "analysis",
"status": ["succeeded", "failed"],
"query": "stream cancellation",
"limit": 20
}{
"repo_path": "/Users/luchong/Desktop/Agnes_Core",
"files": ["services/example/path.py"],
"commands": ["ruff_format", "ruff_safe_fix"],
"timeout_sec": 120,
"max_changed_files": 10
}npm test~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.