Universal MCP server that exposes coding agents (Copilot, Claude Code, Codex) as subagents via a unified tool interface
Project description
agentprism
A universal MCP server that exposes coding agents — GitHub Copilot, Claude Code, Codex — as background subagents behind a single, unified tool interface.
agentprism lets one AI agent orchestrate other AI agents. Drop it into your MCP client (Claude Code, Cursor, Continue, …) and you gain seven tools — agent_spawn, agent_send, agent_wait, agent_status, agent_list, agent_kill, agent_models — that drive any supported coding agent through its native protocol. Run several in parallel, hand off tasks between them, or use a cheaper model as a worker for a more expensive planner. agentprism speaks each provider's wire protocol natively (ACP JSON-RPC for Copilot, stream-JSON for Claude Code, exec-resume for Codex) — no fragile screen-scraping.
Installation
Recommended — no install required (uvx):
# uvx runs agentprism directly from PyPI, no pip install needed
uvx agentprism
Or install permanently:
pip install agentprism
# or: uv tool install agentprism
Or from source:
git clone https://github.com/StefanMaron/agentprism
cd agentprism
pip install -e .
You also need at least one supported coding-agent CLI installed and authenticated:
| Provider | CLI | Auth |
|---|---|---|
| Copilot | copilot (install) |
copilot login |
| Claude Code | claude (install) |
claude then /login |
| Codex | codex (install) |
codex login |
Usage with Claude Code
Add to ~/.claude/mcp.json (create if it doesn't exist):
{
"mcpServers": {
"agentprism": {
"command": "uvx",
"args": ["agentprism"],
"type": "stdio"
}
}
}
If you installed agentprism permanently, use "command": "agentprism" with no args.
Restart Claude Code. The seven agent_* tools will appear. Try:
Use
agent_spawnto start a Copilot session in/tmp/playgroundwith the task "write a Python script that prints prime numbers up to 100", thenagent_waitfor it to finish.
Usage with other MCP clients
Any MCP client that supports stdio servers works. The config shape is the same — point command at agentprism (or uvx + args: ["agentprism"]).
Tool reference
| Tool | Args | Returns |
|---|---|---|
agent_models |
provider? |
model ids + cost multipliers per provider |
agent_spawn |
task, cwd, provider, model?, mode? |
session_id — non-blocking, starts immediately |
agent_send |
session_id, message |
agent reply (blocks until response) |
agent_status |
session_id |
working | idle | done | error |
agent_wait |
session_id, timeout_seconds? |
accumulated output (blocks until done) |
agent_list |
— | all active sessions |
agent_kill |
session_id |
terminates the subprocess |
provider values: copilot, claude, codex
mode values (Copilot / Claude Code): agent (default), plan, autopilot
Provider support
| Provider | Status | Protocol |
|---|---|---|
| GitHub Copilot | ✓ | ACP JSON-RPC over stdio |
| Claude Code | ✓ | stream-JSON bidirectional stdio |
| Codex | ✓ | codex exec / codex exec resume |
Model cost multipliers
Use agent_models(provider="copilot") at runtime to get the current list. Examples:
| Model (Copilot) | Multiplier | Notes |
|---|---|---|
auto / claude-sonnet-4.6 |
1x | default |
claude-haiku-4.5 |
0.33x | cheapest Claude |
gpt-5-mini |
0x | free |
gpt-4.1 |
0x | free |
claude-opus-4.7 |
7.5x | deep reasoning only |
gpt-5.5 |
7.5x | GPT flagship |
Architecture
┌──────────────────┐ ┌──────────────────────────────┐
│ MCP client │ agent_spawn(...) │ agentprism server │
│ (Claude Code, │ ──────────────────► │ │
│ Cursor, ...) │ ◄──── result ──── │ ┌────────────────────────┐ │
└──────────────────┘ │ │ ToolDispatcher │ │
│ └───────────┬────────────┘ │
│ │ │
│ ┌───────────▼────────────┐ │
│ │ SessionRegistry │ │
│ │ session_id ► Adapter │ │
│ └───────────┬────────────┘ │
│ │ │
│ ┌───────────▼────────────┐ │
│ │ CopilotAdapter (ACP) │ │
│ │ ClaudeCodeAdapter │ │
│ │ CodexAdapter │ │
│ └───────────┬────────────┘ │
└──────────────┼───────────────┘
│ native protocol
▼
┌─────────────────────────────┐
│ coding agent subprocess │
└─────────────────────────────┘
Each adapter owns one subprocess per session. A reader coroutine demuxes stdout: responses resolve pending futures, while streaming updates accumulate in an output buffer that agent_wait and agent_send drain.
Configuration
Environment variables:
| Variable | Default | Purpose |
|---|---|---|
AGENTPRISM_LOG_LEVEL |
INFO |
Python logging level (logs go to stderr) |
AGENTPRISM_COPILOT_BIN |
copilot |
Path to the copilot binary |
AGENTPRISM_CLAUDE_BIN |
claude |
Path to the claude binary |
AGENTPRISM_CODEX_BIN |
codex |
Path to the codex binary |
Development
git clone https://github.com/StefanMaron/agentprism
cd agentprism
pip install -e ".[dev]"
ruff check .
pytest
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentprism-0.1.0.tar.gz.
File metadata
- Download URL: agentprism-0.1.0.tar.gz
- Upload date:
- Size: 23.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e71bd2c8bac3afd719f79b6950af10292425b3d1a0f68ee1af0b960d34e69f13
|
|
| MD5 |
a80305198eb6cab4f8633e75096faf97
|
|
| BLAKE2b-256 |
5e65d4f9091df89ff8d078033018e6ebef7abde5cc0a11f2ba06b78e15208886
|
Provenance
The following attestation bundles were made for agentprism-0.1.0.tar.gz:
Publisher:
publish.yml on StefanMaron/agentprism
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentprism-0.1.0.tar.gz -
Subject digest:
e71bd2c8bac3afd719f79b6950af10292425b3d1a0f68ee1af0b960d34e69f13 - Sigstore transparency entry: 1399503194
- Sigstore integration time:
-
Permalink:
StefanMaron/agentprism@621aa9e611c7132d4548c882471c65a9437b0f32 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/StefanMaron
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@621aa9e611c7132d4548c882471c65a9437b0f32 -
Trigger Event:
release
-
Statement type:
File details
Details for the file agentprism-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentprism-0.1.0-py3-none-any.whl
- Upload date:
- Size: 29.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb7d420794c8e7df80cbee25aece268611ed985157a042bcadd0355815f46af3
|
|
| MD5 |
8ee95c2a32539605f54a1d078b792f02
|
|
| BLAKE2b-256 |
c0ba502949af9365a95723e92f7f9ed15d3e8c669f3694677bed87657a01a08c
|
Provenance
The following attestation bundles were made for agentprism-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on StefanMaron/agentprism
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentprism-0.1.0-py3-none-any.whl -
Subject digest:
eb7d420794c8e7df80cbee25aece268611ed985157a042bcadd0355815f46af3 - Sigstore transparency entry: 1399503201
- Sigstore integration time:
-
Permalink:
StefanMaron/agentprism@621aa9e611c7132d4548c882471c65a9437b0f32 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/StefanMaron
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@621aa9e611c7132d4548c882471c65a9437b0f32 -
Trigger Event:
release
-
Statement type: