code-agent-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@code-agent-mcpdispatch opencode to fix the bug in src/helper.js"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
code-agent-mcp
위임 소켓(delegation socket) MCP 서버. "대기 후 붙여넣기"를 "던지고 계속 진행"으로 바꿔줍니다 — 드라이버 코드 에이전트(Claude Code / Codex)가 서브태스크를 저렴한 로컬 워커(OpenCode / Gemini)에 MCP tool call 하나로 위임하고, 자기 컨텍스트를 잃지 않은 채 결과를 비동기적으로 받아옵니다.
Status: v0.1 이 20명 팀 규모 Mac + Windows 환경에서 실사용 중. 확산 진행 중.
이 툴이 푸는 문제
월 중반 즈음 값비싼 모델의 크레딧이 부족해지면 태스크를 수동으로 쪼개서 다른 에이전트 CLI에 붙여넣고, 하나씩 완료되기를 기다린 뒤 다음 것을 던지는 일이 반복됩니다. 긴호흡 작업이 파편화되고, 결국 AI 사용을 포기하기도 합니다. 이 서버는 그 위임 과정을 MCP 프로토콜로 자동화합니다.
Related MCP server: AgentHub
설치
Python 3.11+ 필요. 지원되는 워커 CLI (opencode / codex / claude / gemini) 중 최소 하나가 PATH에 있어야 합니다.
uvx --from git+ssh://git@github.com/ikaruce/code-agent-mcp.git code-agent-mcpWindows 주의사항: Windows에서 npm으로 설치되는 CLI들은 종종 PowerShell (.ps1) shim 형태입니다. 이 서버는 shutil.which()로 .ps1 파일을 자동 감지하여 powershell.exe -NoProfile -ExecutionPolicy Bypass -File <경로> 로 실행하기 때문에 subprocess.exec 가 문제없이 워커를 띄웁니다. .cmd / .bat / .exe shim 은 별도 처리 없이 그대로 동작합니다.
Claude Code 에 등록
~/.claude/settings.json 에 다음을 추가:
{
"mcpServers": {
"code-agent-mcp": {
"command": "uvx",
"args": ["--from", "git+ssh://git@github.com/ikaruce/code-agent-mcp.git", "code-agent-mcp"]
}
}
}Claude Code 를 재시작하면 5개 tool 이 활성화됩니다: dispatch, poll, wait, list_jobs, cancel.
단계별 온보딩: docs/ONBOARDING.md 문제 해결: docs/FAQ.md
Tools
dispatch(prompt, agent, cwd, context_files=[], timeout_ms=600000) → {job_id}
Fire-and-forget. job_id 를 즉시 반환합니다.
agent:"opencode"|"codex"|"claude"|"gemini"cwd: 워커의 절대 경로 작업 디렉토리context_files: 파일 경로 리스트 (절대 orcwd상대). 파일 내용이 프롬프트 preamble 로 인라인 됩니다 (파일당 8KB, 전체 64KB 상한)timeout_ms: 강제 종료 데드라인. 기본 10분
프롬프트 자체는 stdin 으로 전달되므로 개행 문자나 큰 페이로드가 플랫폼과 무관하게 안전하게 전송됩니다.
poll(job_id) → {state, result, stderr, elapsed_ms, exit_code}
state:pending|running|done|error|cancelledresult: 현재 워커 stdout —running상태에서도 채워져서 드라이버가 진행 상황을 부분적으로 볼 수 있음stderr: 워커 stderr (뒤에서부터 최대 64KB)elapsed_ms: dispatch call 이 반환된 이후 경과한 wall-clock msexit_code: 프로세스 종료 코드 (terminal 상태 아니면 null)
wait(job_id, timeout_ms=60000) → {state, result, stderr, elapsed_ms, exit_code}
Job 이 terminal 상태(done / error / cancelled) 에 도달하거나 timeout_ms 가 지날 때까지 서버 측에서 블록. 반환 형식은 poll() 과 동일.
왜 필요한지: 드라이버가 여러 번 poll() 하는 대신 wait() 한 번으로 완료를 기다릴 수 있어서 드라이버 컨텍스트 소비를 크게 줄여줍니다. 만약 timeout 안에 완료되지 않으면 현재 (non-terminal) 상태를 반환하고, 호출자가 wait() 를 다시 호출할 수 있음.
list_jobs(state=None, limit=20) → [{job_id, agent, state, started_at, prompt_preview}]
최신 순. state 필터 옵션.
cancel(job_id) → {ok, prev_state}
SIGTERM 후 5초 뒤 SIGKILL. 이미 terminal 상태인 job 에는 no-op.
부속 CLI
Wheel 에 함께 설치되는 CLI 두 개:
code-agent-mcp-export [--since ISO_DATE] [--output FILE]— 전체 telemetry 테이블을 CSV 로 내보냄code-agent-mcp-report [--days N] [--format markdown|json]— agent 별 집계 (dispatch 건수, 평균 / p95 elapsed_ms, error rate, unique users, prompt bytes). 주간 stand-up 이나 예산 부서 credit-efficiency 대화용
동시성
전체 동시 실행: 최대 4개
runningjobAgent 별 상한:
opencode=4,codex=2,claude=2,gemini=2(API rate limit 반영)Agent-aware FIFO:
codex대기열이 꽉 차도 대기 중인opencodejob 은 blocking 되지 않음
데이터 & Telemetry
상태는 ~/.code-agent-mcp/ 하위에 저장됩니다:
~/.code-agent-mcp/
├── state.sqlite # jobs + telemetry 테이블
├── logs/{job_id}.stdout # 워커 stdout
├── logs/{job_id}.stderr # 워커 stderr
└── prompts/{job_id}.md # 스테이징된 프롬프트 파일 (실행 후 정리됨)Telemetry 컬럼: job_id, agent, model, prompt_len, cwd, context_file_count, dispatched_at, finished_at, elapsed_ms, exit_code, final_state, result_len, user. 30일 초과 데이터는 서버 시작 시 자동으로 pruning 됩니다.
Restart 복구
서버 시작 시 SQLite 의 running 상태 row 는 error 로 표시됩니다 (재시작으로 orphan 된 것). pending row 는 유지되고 FIFO 순서로 다시 dispatch 됩니다.
보안 범위
v0.1 은 단일 사용자 localhost 전용. MCP 서버는 개발자 shell 과 동일한 신뢰 레벨에서 실행됩니다. Sandbox 없음, cwd allowlist 없음 — 드라이버 에이전트가 이미 임의 코드 실행 권한을 가지고 있으므로 MCP 가 권한을 확장하지 않기 때문입니다. Auth 와 multi-tenant 는 v0.2 로 이연 (docs/DEPLOY.md 참조).
v0.1 에 포함되지 않은 것
Multi-turn
session_idDocker / 팀 공유 endpoint (v0.2)
HTTP
/metrics/daily.json(v0.2)Auth (v0.2)
개발
uv sync --extra dev
uv run pytestContribution flow: fork → feature branch → PR. Push 마다 CI 가 전체 테스트를 실행합니다.
Docs
docs/DEPLOY.md — 팀 배포 안내
docs/ONBOARDING.md — 설치 & 첫 dispatch
docs/FAQ.md — 문제 해결
docs/CHANGELOG.md — 버전별 변경 이력
Available Tools
5 toolscancelA
Cancel a job. SIGTERM then SIGKILL after 5s if still running. Returns {ok, prev_state}.
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, but description fully discloses behavior: sends SIGTERM then SIGKILL after 5s, and returns {ok, prev_state}. This is comprehensive for a cancellation action.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences with no wasted words. Critical information (signal sequence, return format) is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given simplicity (1 param), description covers purpose, behavior, and return value. Minor gap: no mention of error cases (e.g., job not found), but overall adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%. Description does not explain job_id beyond its name, though job_id is self-explanatory. Baseline for low coverage requires compensation, which is minimal.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool cancels a job using specific verb and resource. It distinguishes from sibling tools like poll, dispatch, list_jobs, and wait.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied (use when you want to cancel a job) but no explicit guidance on when not to use or alternatives. Lacks prerequisites or context for decision.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dispatchC
Dispatch a subtask to a code agent worker (opencode|codex|claude). Returns {job_id}.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | ||
| agent | Yes | ||
| prompt | Yes | ||
| timeout_ms | No | ||
| context_files | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With zero annotations, the description carries full burden but only mentions that it returns {job_id}. It does not disclose whether the operation is synchronous or asynchronous, side effects, authentication needs, rate limits, or error behavior. This is insufficient for safe invocation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence, front-loaded with the action and result. It avoids fluff, though it could be slightly expanded without losing conciseness. Overall efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (5 parameters, including a timeout and context files), the description is incomplete. It doesn't explain how timeout or context_files affect behavior, or what happens on failure. The presence of poll/wait siblings implies async, but this is not stated. More detail is needed for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must explain meaning. It only clarifies that 'agent' is one of three worker types. The other parameters (cwd, prompt, timeout_ms, context_files) remain unexplained, providing little value beyond the schema structure.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (dispatch a subtask), the target (code agent worker with explicit options opencode, codex, claude), and the return value (job_id). It distinguishes well from siblings like poll, list_jobs, cancel, wait which are about monitoring or managing jobs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use dispatch versus alternatives like when to combine with poll/wait, or prerequisites (e.g., agent availability). It only states what it does, leaving the agent to infer usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_jobsA
List jobs (newest first). Optional state filter (pending|running|done|error|cancelled).
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| state | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits. It states the ordering ('newest first') but does not mention pagination, rate limits, scoping (user vs all jobs), or authentication requirements. It's adequate but incomplete.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, front-loaded with purpose and key details. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema (which explains return values) and no annotations, the description covers the basics but lacks completeness about scope (which jobs?) and presence of pagination. For a simple list tool it's acceptable but not thorough.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It adds meaning for the 'state' parameter by listing possible values (pending|running|done|error|cancelled). However, it does not explain the 'limit' parameter beyond what the schema already provides (default 20).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('List jobs'), the ordering ('newest first'), and an optional filter. This differentiates it from sibling tools (poll, dispatch, cancel, wait) which have different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions an optional state filter with enumerated values, giving context for filtering. However, it does not explicitly state when to use this tool versus siblings, though the action is distinct enough that it's implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pollA
Poll job state. Returns {state, result, stderr, elapsed_ms, exit_code}.
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full burden. It discloses the return structure (state, result, etc.), but does not discuss error handling, idempotency, or behavior for non-existent jobs. Still, it is straightforward for a simple polling tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One sentence, front-loaded with verb and resource, lists return fields. No fluff, every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the low complexity (1 param, no nested objects) and presence of an output schema (return fields provided), the description is fairly complete. It covers the essential information for a polling tool, though it omits possible states or error conditions.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 100% coverage of parameters (1 param, job_id), but the description does not add any meaning to it beyond the schema's title 'Job Id'. With 0% schema_description_coverage, the description fails to compensate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Poll' and the resource 'job state', and distinguishes from siblings like list_jobs (list all) and wait (blocking). The return fields are explicitly listed.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use after dispatching a job, but does not explicitly state when to use poll versus wait or other siblings. No when-not-to-use or alternatives mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
waitA
Block server-side until job reaches a terminal state or timeout expires.
Returns the same shape as poll(). Reduces driver-side polling cost — one wait call replaces N poll calls. If timeout hits before completion, returns the current (non-terminal) state; caller may wait() again.
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | ||
| timeout_ms | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses server-side blocking, return shape same as poll, timeout behavior, and reusability. It does not mention rate limits or authentication, but for a wait function, this is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the main purpose, and every sentence adds value. Zero wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple wait tool with an output schema (implied from 'same shape as poll'), the description covers the essential behavior, contrasts with a key sibling, and explains edge cases. It is complete for the tool's complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It implicitly references job_id and timeout_ms but adds no extra detail beyond their names (e.g., format constraints, allowed values). The parameters are self-explanatory, but the description does not enhance understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool blocks until a terminal state or timeout, and it distinguishes itself from the sibling 'poll' by replacing multiple poll calls. The verb 'wait' and the resource 'job' are specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly contrasts with poll (reduces polling cost) and explains the timeout behavior (returns current state, can wait again). It clearly states when to use this tool, though it could more explicitly mention when not to use it (e.g., if you need periodic status updates).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v0.1.0- First observed
cancel - First observed
dispatch - First observed
list_jobs - First observed
poll - First observed
wait
TDQS
Each tool has a distinct purpose: dispatch creates jobs, poll and wait check status (polling vs. blocking), list_jobs lists all, cancel terminates. No overlap or ambiguity.
Most tools use single verbs (poll, dispatch, cancel, wait), but list_jobs uses verb_noun. This slight inconsistency prevents a perfect score but remains readable.
Five tools cover the essential lifecycle of job management (create, monitor, list, cancel) without being too many or too few.
Core operations are covered, but missing features like job retry or modification are minor gaps that agents can work around.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Hosted MCP server for task-first delegation to remote workstations and workers.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
MCP Server for an Agent Task Marketplace
Related MCP Servers
- FlicenseAqualityDmaintenanceLocal MCP server that enables delegating low-risk tasks like summarization or code patches to a low-cost model, with the main agent reviewing results.2-
- AlicenseNot gradedqualityBmaintenanceA local MCP server that orchestrates multi-agent coding teams by spawning workers, delegating tasks, and managing session lifecycles through an external MCP client.MIT
- AlicenseAqualityBmaintenanceLocal MCP server that exposes delegation tools for Codex, Claude, and Antigravity CLI, enabling an orchestrator agent to assign tasks to these sub-agents via non-interactive CLI commands.3MIT
- AlicenseBqualityCmaintenanceAn MCP server that lets any AI tool delegate tasks to the OpenCode CLI as a subagent, with multi-session orchestration, event tracking, and task contracts.28181MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ikaruce/code-agent-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server