a2a-mcp-bridge 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- a2a_mcp_bridge-0.1.0/.gitignore +11 -0
- a2a_mcp_bridge-0.1.0/AGENTS.md +50 -0
- a2a_mcp_bridge-0.1.0/LICENSE +21 -0
- a2a_mcp_bridge-0.1.0/PKG-INFO +381 -0
- a2a_mcp_bridge-0.1.0/README.md +350 -0
- a2a_mcp_bridge-0.1.0/dashboard/dist/assets/index-B4MTLsUo.css +1 -0
- a2a_mcp_bridge-0.1.0/dashboard/dist/assets/index-B8pE6kkp.js +9 -0
- a2a_mcp_bridge-0.1.0/dashboard/dist/index.html +13 -0
- a2a_mcp_bridge-0.1.0/dashboard/index.html +12 -0
- a2a_mcp_bridge-0.1.0/dashboard/package-lock.json +2480 -0
- a2a_mcp_bridge-0.1.0/dashboard/package.json +30 -0
- a2a_mcp_bridge-0.1.0/dashboard/src/ActivityOverview.tsx +137 -0
- a2a_mcp_bridge-0.1.0/dashboard/src/AgentList.test.tsx +109 -0
- a2a_mcp_bridge-0.1.0/dashboard/src/AgentList.tsx +61 -0
- a2a_mcp_bridge-0.1.0/dashboard/src/App.test.tsx +256 -0
- a2a_mcp_bridge-0.1.0/dashboard/src/App.tsx +71 -0
- a2a_mcp_bridge-0.1.0/dashboard/src/DetailDialog.tsx +23 -0
- a2a_mcp_bridge-0.1.0/dashboard/src/TaskList.test.tsx +227 -0
- a2a_mcp_bridge-0.1.0/dashboard/src/TaskList.tsx +143 -0
- a2a_mcp_bridge-0.1.0/dashboard/src/index.css +23 -0
- a2a_mcp_bridge-0.1.0/dashboard/src/main.tsx +15 -0
- a2a_mcp_bridge-0.1.0/dashboard/src/mockDashboardData.ts +39 -0
- a2a_mcp_bridge-0.1.0/dashboard/src/setupTests.ts +1 -0
- a2a_mcp_bridge-0.1.0/dashboard/src/useEventSource.ts +32 -0
- a2a_mcp_bridge-0.1.0/dashboard/src/vite-env.d.ts +1 -0
- a2a_mcp_bridge-0.1.0/dashboard/tsconfig.json +18 -0
- a2a_mcp_bridge-0.1.0/dashboard/vite.config.ts +16 -0
- a2a_mcp_bridge-0.1.0/docs/assets/dashboard-desktop.png +0 -0
- a2a_mcp_bridge-0.1.0/examples/run_claude_reviewer.py +323 -0
- a2a_mcp_bridge-0.1.0/examples/run_codex_co_developer.py +255 -0
- a2a_mcp_bridge-0.1.0/examples/run_codex_interactive_a2a.py +204 -0
- a2a_mcp_bridge-0.1.0/examples/run_copilot_main_dev.py +238 -0
- a2a_mcp_bridge-0.1.0/launchd/com.example.a2a-bridge-dashboard.plist +26 -0
- a2a_mcp_bridge-0.1.0/launchd/com.example.copilot-a2a-agent.plist +25 -0
- a2a_mcp_bridge-0.1.0/pyproject.toml +63 -0
- a2a_mcp_bridge-0.1.0/run-copilot-a2a-agent.zsh +36 -0
- a2a_mcp_bridge-0.1.0/scripts/com.claude-reviewer.plist +36 -0
- a2a_mcp_bridge-0.1.0/scripts/com.codex-co-developer.plist +30 -0
- a2a_mcp_bridge-0.1.0/skills/contribute/SKILL.md +51 -0
- a2a_mcp_bridge-0.1.0/skills/setup/SKILL.md +48 -0
- a2a_mcp_bridge-0.1.0/src/mcp_a2a_bridge/__init__.py +1 -0
- a2a_mcp_bridge-0.1.0/src/mcp_a2a_bridge/activity.py +189 -0
- a2a_mcp_bridge-0.1.0/src/mcp_a2a_bridge/activity_store.py +134 -0
- a2a_mcp_bridge-0.1.0/src/mcp_a2a_bridge/activity_writer.py +81 -0
- a2a_mcp_bridge-0.1.0/src/mcp_a2a_bridge/client.py +304 -0
- a2a_mcp_bridge-0.1.0/src/mcp_a2a_bridge/config.py +103 -0
- a2a_mcp_bridge-0.1.0/src/mcp_a2a_bridge/dashboard.py +187 -0
- a2a_mcp_bridge-0.1.0/src/mcp_a2a_bridge/dashboard_service.py +168 -0
- a2a_mcp_bridge-0.1.0/src/mcp_a2a_bridge/hermes_audit.py +133 -0
- a2a_mcp_bridge-0.1.0/src/mcp_a2a_bridge/registry.py +186 -0
- a2a_mcp_bridge-0.1.0/src/mcp_a2a_bridge/server.py +266 -0
- a2a_mcp_bridge-0.1.0/src/mcp_a2a_bridge/snapshots.py +46 -0
- a2a_mcp_bridge-0.1.0/src/mcp_a2a_bridge/sqlite_task_store.py +109 -0
- a2a_mcp_bridge-0.1.0/src/mcp_a2a_bridge/ttl_task_store.py +61 -0
- a2a_mcp_bridge-0.1.0/tests/__init__.py +0 -0
- a2a_mcp_bridge-0.1.0/tests/copilot/conftest.py +6 -0
- a2a_mcp_bridge-0.1.0/tests/copilot/test_activity.py +56 -0
- a2a_mcp_bridge-0.1.0/tests/copilot/test_card.py +25 -0
- a2a_mcp_bridge-0.1.0/tests/copilot/test_executor.py +106 -0
- a2a_mcp_bridge-0.1.0/tests/copilot/test_runner.py +101 -0
- a2a_mcp_bridge-0.1.0/tests/echo_agent.py +93 -0
- a2a_mcp_bridge-0.1.0/tests/test_activity.py +421 -0
- a2a_mcp_bridge-0.1.0/tests/test_activity_store.py +127 -0
- a2a_mcp_bridge-0.1.0/tests/test_activity_writer.py +77 -0
- a2a_mcp_bridge-0.1.0/tests/test_claude_reviewer.py +20 -0
- a2a_mcp_bridge-0.1.0/tests/test_client.py +318 -0
- a2a_mcp_bridge-0.1.0/tests/test_codex_co_developer.py +223 -0
- a2a_mcp_bridge-0.1.0/tests/test_codex_interactive_a2a.py +119 -0
- a2a_mcp_bridge-0.1.0/tests/test_config.py +80 -0
- a2a_mcp_bridge-0.1.0/tests/test_dashboard.py +389 -0
- a2a_mcp_bridge-0.1.0/tests/test_dashboard_service.py +335 -0
- a2a_mcp_bridge-0.1.0/tests/test_integration.py +162 -0
- a2a_mcp_bridge-0.1.0/tests/test_registry.py +148 -0
- a2a_mcp_bridge-0.1.0/tests/test_server.py +275 -0
- a2a_mcp_bridge-0.1.0/tests/test_sqlite_task_store.py +21 -0
- a2a_mcp_bridge-0.1.0/tests/test_ttl_task_store.py +14 -0
- a2a_mcp_bridge-0.1.0/uv.lock +1292 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# AI README
|
|
2
|
+
|
|
3
|
+
This file is the fast-start guide for coding agents working on `mcp-a2a-bridge`.
|
|
4
|
+
Read it before changing code, then read the relevant skill:
|
|
5
|
+
|
|
6
|
+
- `skills/setup/SKILL.md` — install and run MCP-only or MCP + dashboard.
|
|
7
|
+
- `skills/contribute/SKILL.md` — branch, test, security review, commit, and PR workflow.
|
|
8
|
+
|
|
9
|
+
## Project map
|
|
10
|
+
|
|
11
|
+
- `src/mcp_a2a_bridge/` — core MCP bridge, A2A client, registry, activity store, optional dashboard backend.
|
|
12
|
+
- `examples/copilot_a2a_agent/` — optional Copilot A2A server example.
|
|
13
|
+
- `dashboard/` — optional React/Vite dashboard frontend.
|
|
14
|
+
- `tests/` — Python tests, including integration coverage.
|
|
15
|
+
- `.github/workflows/ci.yml` — CI for Python and dashboard.
|
|
16
|
+
|
|
17
|
+
## Choose a setup
|
|
18
|
+
|
|
19
|
+
MCP-only (no dashboard runtime or Node/npm):
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
uv venv --python 3.11
|
|
23
|
+
uv pip install -e .
|
|
24
|
+
uv run mcp-a2a-bridge
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
MCP + dashboard:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
uv venv --python 3.11
|
|
31
|
+
uv pip install -e ".[dashboard]"
|
|
32
|
+
npm --prefix dashboard ci
|
|
33
|
+
npm --prefix dashboard run build
|
|
34
|
+
uv run mcp-a2a-bridge-dashboard
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Set `A2A_BRIDGE_DASHBOARD=1` on bridge processes whose activity should appear in the dashboard. The dashboard defaults to `127.0.0.1:9100`. A non-loopback bind without a token is for trusted LANs only; use a strong `A2A_BRIDGE_DASHBOARD_TOKEN`, TLS, and network controls for protected access. Never expose the dashboard directly to the public internet.
|
|
38
|
+
|
|
39
|
+
For frontend-only screenshots, run `npm --prefix dashboard ci` then
|
|
40
|
+
`npm --prefix dashboard run dev:mock -- --host 0.0.0.0`. This opt-in mode uses
|
|
41
|
+
local mock snapshots instead of the dashboard API/SSE; normal builds stay live.
|
|
42
|
+
|
|
43
|
+
## Agent rules
|
|
44
|
+
|
|
45
|
+
1. Read `AGENTS.md` and the relevant skill before editing.
|
|
46
|
+
2. Preserve MCP-only installs: dashboard dependencies belong in the `dashboard` extra.
|
|
47
|
+
3. Do not commit credentials, local registry files, `.venv`, `node_modules`, or generated screenshots.
|
|
48
|
+
4. Prefer small, tested changes; preserve existing APIs and SSE contracts.
|
|
49
|
+
5. Run the verification commands in `skills/contribute/SKILL.md` before reporting completion.
|
|
50
|
+
6. Do not claim a browser/CDP check, test, commit, push, or PR exists unless it actually ran.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 TonPC64
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: a2a-mcp-bridge
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: MCP server that lets coding agents call remote A2A agents
|
|
5
|
+
Project-URL: Homepage, https://github.com/TonPC64/mcp-a2a-bridge
|
|
6
|
+
Project-URL: Repository, https://github.com/TonPC64/mcp-a2a-bridge
|
|
7
|
+
Project-URL: Issues, https://github.com/TonPC64/mcp-a2a-bridge/issues
|
|
8
|
+
Author: TonPC64
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: a2a,agent2agent,agents,mcp,model-context-protocol
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Requires-Dist: a2a-sdk[http-server]<2,>=1.1
|
|
19
|
+
Requires-Dist: httpx>=0.28.1
|
|
20
|
+
Requires-Dist: mcp<3,>=2.0.0
|
|
21
|
+
Provides-Extra: dashboard
|
|
22
|
+
Requires-Dist: fastapi>=0.115; extra == 'dashboard'
|
|
23
|
+
Requires-Dist: uvicorn>=0.30; extra == 'dashboard'
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: a2a-sdk[http-server]<2,>=1.1; extra == 'dev'
|
|
26
|
+
Requires-Dist: fastapi>=0.115; extra == 'dev'
|
|
27
|
+
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
|
|
28
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
29
|
+
Requires-Dist: uvicorn>=0.30; extra == 'dev'
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
# mcp-a2a-bridge
|
|
33
|
+
|
|
34
|
+
An MCP server that lets coding agents — GitHub Copilot CLI, Claude Code, Codex,
|
|
35
|
+
and Hermes — call remote [A2A](https://a2a-protocol.org) agents. It also
|
|
36
|
+
includes an optional read-only activity dashboard.
|
|
37
|
+
|
|
38
|
+
Repository: https://github.com/TonPC64/mcp-a2a-bridge
|
|
39
|
+
|
|
40
|
+
Licensed under the [MIT License](LICENSE).
|
|
41
|
+
|
|
42
|
+
For coding-agent instructions, start with [`AGENTS.md`](AGENTS.md), then
|
|
43
|
+
use [`skills/setup/SKILL.md`](skills/setup/SKILL.md) for installation or
|
|
44
|
+
[`skills/contribute/SKILL.md`](skills/contribute/SKILL.md) for changes and PRs.
|
|
45
|
+
|
|
46
|
+
## Dashboard UI showcase
|
|
47
|
+
|
|
48
|
+
The optional dashboard uses a futuristic Liquid Glass interface with compact
|
|
49
|
+
agent cards, live task activity, two-column task summaries, status indicators,
|
|
50
|
+
and responsive layouts. This screenshot uses the opt-in frontend mock data mode
|
|
51
|
+
so it is safe to reproduce without connecting to real agents or exposing logs.
|
|
52
|
+
|
|
53
|
+

|
|
54
|
+
|
|
55
|
+
To run the same mock UI locally:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
cd /absolute/path/to/mcp-a2a-bridge/dashboard
|
|
59
|
+
npm ci
|
|
60
|
+
npm run dev:mock -- --host 127.0.0.1
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The mock mode is for UI development and screenshots only; normal builds use the
|
|
64
|
+
live dashboard API and SSE.
|
|
65
|
+
|
|
66
|
+
## Getting started
|
|
67
|
+
|
|
68
|
+
## Choose your setup
|
|
69
|
+
|
|
70
|
+
Both profiles need Python 3.11 or later and [`uv`](https://docs.astral.sh/uv/).
|
|
71
|
+
The optional dashboard frontend requires Node.js 24.15 or later; CI uses the
|
|
72
|
+
latest Node.js 24 release.
|
|
73
|
+
|
|
74
|
+
### Install from PyPI
|
|
75
|
+
|
|
76
|
+
The PyPI distribution is named `a2a-mcp-bridge`, while the commands keep the `mcp-a2a-bridge` name.
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
uvx --from a2a-mcp-bridge mcp-a2a-bridge
|
|
80
|
+
uv tool install a2a-mcp-bridge
|
|
81
|
+
claude mcp add a2a -- uvx --from a2a-mcp-bridge mcp-a2a-bridge
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The dashboard needs the extra:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
uvx --from 'a2a-mcp-bridge[dashboard]' mcp-a2a-bridge-dashboard
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### MCP only
|
|
91
|
+
|
|
92
|
+
Install and run the MCP bridge only. This does not require Node.js/npm or a
|
|
93
|
+
dashboard frontend build.
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
git clone https://github.com/TonPC64/mcp-a2a-bridge.git mcp-a2a-bridge
|
|
97
|
+
cd mcp-a2a-bridge
|
|
98
|
+
uv sync --locked
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### MCP + dashboard
|
|
102
|
+
|
|
103
|
+
Install the optional dashboard web runtime, then build its bundled frontend
|
|
104
|
+
assets. Node.js and npm are needed only for this build (or frontend
|
|
105
|
+
development), not to run an already-built dashboard.
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
git clone https://github.com/TonPC64/mcp-a2a-bridge.git mcp-a2a-bridge
|
|
109
|
+
cd mcp-a2a-bridge
|
|
110
|
+
uv sync --extra dashboard --locked
|
|
111
|
+
npm --prefix dashboard ci
|
|
112
|
+
npm --prefix dashboard run build
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
For development and tests, use `uv sync --all-extras --locked`; it includes
|
|
116
|
+
the Python packages needed by the dashboard test suite. The commands below use
|
|
117
|
+
`/absolute/path/to/mcp-a2a-bridge`. Replace it with the absolute path to your
|
|
118
|
+
clone; do not copy another user's path.
|
|
119
|
+
|
|
120
|
+
### Configure A2A agents
|
|
121
|
+
|
|
122
|
+
Create `.a2a-agents.json` in the repository root:
|
|
123
|
+
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"agents": {
|
|
127
|
+
"example-agent": {
|
|
128
|
+
"url": "https://agent.example.invalid",
|
|
129
|
+
"headers": {
|
|
130
|
+
"Authorization": "Bearer REPLACE_WITH_YOUR_TOKEN"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Use the base URL of an A2A agent; the bridge requests its
|
|
138
|
+
`/.well-known/agent-card.json` automatically. Remove `Authorization` (or use
|
|
139
|
+
an empty `headers` object) when the agent does not require authentication.
|
|
140
|
+
The registry can contain secrets, so do not commit it and restrict its file
|
|
141
|
+
permissions where appropriate.
|
|
142
|
+
|
|
143
|
+
The registry location is resolved in this order:
|
|
144
|
+
|
|
145
|
+
1. `A2A_BRIDGE_CONFIG`
|
|
146
|
+
2. `.a2a-agents.json` in the bridge process's current directory
|
|
147
|
+
3. `~/.config/a2a-bridge/agents.json`
|
|
148
|
+
|
|
149
|
+
For a host that starts the MCP command outside the repository, set
|
|
150
|
+
`A2A_BRIDGE_CONFIG` to an absolute path in that host's MCP environment. You
|
|
151
|
+
can also add a verified agent at runtime with `a2a_add_agent`; by default it
|
|
152
|
+
writes to the resolved registry file.
|
|
153
|
+
|
|
154
|
+
### Register the MCP server
|
|
155
|
+
|
|
156
|
+
Each host should start the same local checkout command:
|
|
157
|
+
|
|
158
|
+
```text
|
|
159
|
+
uv run --directory /absolute/path/to/mcp-a2a-bridge mcp-a2a-bridge
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
This uses the editable installation created above. Configure the host with
|
|
163
|
+
the following portable path placeholder.
|
|
164
|
+
|
|
165
|
+
**GitHub Copilot CLI** — add this server to `~/.copilot/mcp-config.json`:
|
|
166
|
+
|
|
167
|
+
```json
|
|
168
|
+
{
|
|
169
|
+
"mcpServers": {
|
|
170
|
+
"a2a": {
|
|
171
|
+
"type": "stdio",
|
|
172
|
+
"command": "uv",
|
|
173
|
+
"args": [
|
|
174
|
+
"run",
|
|
175
|
+
"--directory",
|
|
176
|
+
"/absolute/path/to/mcp-a2a-bridge",
|
|
177
|
+
"mcp-a2a-bridge"
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Claude Code:**
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
claude mcp add a2a -- uv run --directory /absolute/path/to/mcp-a2a-bridge mcp-a2a-bridge
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**Codex** — add this to `~/.codex/config.toml`:
|
|
191
|
+
|
|
192
|
+
```toml
|
|
193
|
+
[mcp_servers.a2a]
|
|
194
|
+
command = "uv"
|
|
195
|
+
args = ["run", "--directory", "/absolute/path/to/mcp-a2a-bridge", "mcp-a2a-bridge"]
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**Hermes:** use its MCP server registration UI or command, choose a `stdio`
|
|
199
|
+
server, and supply the command `uv` with these arguments:
|
|
200
|
+
|
|
201
|
+
```text
|
|
202
|
+
run --directory /absolute/path/to/mcp-a2a-bridge mcp-a2a-bridge
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Restart the host after registration, then call `a2a_list_agents` to confirm
|
|
206
|
+
that the registry is available and the agents are reachable.
|
|
207
|
+
|
|
208
|
+
### Expose the interactive Codex CLI as A2A (opt-in)
|
|
209
|
+
|
|
210
|
+
With Codex CLI 0.150.1 installed, run this separate adapter in another
|
|
211
|
+
terminal:
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
uv run python examples/run_codex_interactive_a2a.py
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
It binds only to `127.0.0.1:9013`, publishes
|
|
218
|
+
`/.well-known/agent-card.json`, and registers a temporary unique entry in the
|
|
219
|
+
resolved registry. The exact entry is removed on graceful shutdown. It starts
|
|
220
|
+
`codex app-server --stdio` directly; it does not use `codex exec` or attach to
|
|
221
|
+
an existing terminal TUI. Each adapter process starts one new ephemeral
|
|
222
|
+
app-server thread. `--thread-id ID` may resume a known persisted thread only
|
|
223
|
+
when app-server reports `canAcceptDirectInput: true`.
|
|
224
|
+
|
|
225
|
+
Use `--port` for another loopback port and `--codex-bin` when `codex` is not on
|
|
226
|
+
the launcher PATH. The adapter has no public bind, token, or credential-file
|
|
227
|
+
configuration.
|
|
228
|
+
|
|
229
|
+
## Tools
|
|
230
|
+
|
|
231
|
+
| Tool | Purpose |
|
|
232
|
+
|---|---|
|
|
233
|
+
| `a2a_list_agents` | List agents with skills and reachability |
|
|
234
|
+
| `a2a_send_message` | Send a message; continue a task with `task_id` |
|
|
235
|
+
| `a2a_get_task` | Poll a task started earlier |
|
|
236
|
+
| `a2a_cancel_task` | Cancel a running task |
|
|
237
|
+
| `a2a_add_agent` | Register an agent by URL |
|
|
238
|
+
|
|
239
|
+
`a2a_send_message` waits up to `timeout_s` (60 seconds by default). If a task
|
|
240
|
+
is still running, it returns `done: false` with a `task_id`; poll it with
|
|
241
|
+
`a2a_get_task`. If an agent returns `state: "input_required"`, call
|
|
242
|
+
`a2a_send_message` again with the same `task_id`.
|
|
243
|
+
|
|
244
|
+
## Dashboard
|
|
245
|
+
|
|
246
|
+
The optional standalone dashboard shows configured agents, their
|
|
247
|
+
status/skills, and live task activity from bridge processes on the same
|
|
248
|
+
machine. It is read-only: it never sends messages to agents.
|
|
249
|
+
|
|
250
|
+
Install the `dashboard` profile and build the assets before starting it:
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
cd /absolute/path/to/mcp-a2a-bridge
|
|
254
|
+
uv sync --extra dashboard --locked
|
|
255
|
+
npm --prefix dashboard ci
|
|
256
|
+
npm --prefix dashboard run build
|
|
257
|
+
uv run mcp-a2a-bridge-dashboard
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
It listens only on `127.0.0.1:9100` by default. Open
|
|
261
|
+
`http://127.0.0.1:9100` on the same machine.
|
|
262
|
+
|
|
263
|
+
### Frontend mock data
|
|
264
|
+
|
|
265
|
+
To run the dashboard UI without the Python service or SSE, use the opt-in mock
|
|
266
|
+
mode. It includes representative agents and task activity for screenshots:
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
cd /absolute/path/to/mcp-a2a-bridge/dashboard
|
|
270
|
+
npm ci
|
|
271
|
+
npm run dev:mock -- --host 0.0.0.0
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Open the Vite URL on the same network. `VITE_USE_MOCK_DATA=true` is only used
|
|
275
|
+
by the frontend build/dev server; normal `npm run dev` and production builds
|
|
276
|
+
continue to use the live dashboard API and SSE.
|
|
277
|
+
|
|
278
|
+
Enable reporting for every bridge process whose activity should appear in the
|
|
279
|
+
dashboard. Add this environment variable to the MCP server configuration (or
|
|
280
|
+
when launching it manually):
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
A2A_BRIDGE_DASHBOARD=1 uv run --directory /absolute/path/to/mcp-a2a-bridge mcp-a2a-bridge
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
Bridge processes without that flag keep activity in memory and do not appear
|
|
287
|
+
in the shared dashboard. The dashboard can start before or after them.
|
|
288
|
+
Each MCP host (Claude, Hermes, Codex) can set `A2A_BRIDGE_CLIENT_NAME` to its own name.
|
|
289
|
+
|
|
290
|
+
| Environment variable | Default | Purpose |
|
|
291
|
+
|---|---|---|
|
|
292
|
+
| `A2A_BRIDGE_CONFIG` | — | Absolute path to the agents JSON registry |
|
|
293
|
+
| `A2A_BRIDGE_DASHBOARD` | unset (off) | Set to `1` to persist this bridge process's activity |
|
|
294
|
+
| `A2A_BRIDGE_ACTIVITY_DB` | `~/.config/a2a-bridge/activity.sqlite3` | Shared SQLite activity database |
|
|
295
|
+
| `A2A_BRIDGE_ACTIVITY_SOURCE` | `remote` | Source label for activity written by compatible processes |
|
|
296
|
+
| `A2A_BRIDGE_CLIENT_NAME` | `mcp-a2a-bridge` | Label this bridge sends as X-A2A-Source and records as the source of its own activity. |
|
|
297
|
+
| `A2A_BRIDGE_DASHBOARD_HOST` | `127.0.0.1` | Dashboard bind address |
|
|
298
|
+
| `A2A_BRIDGE_DASHBOARD_PORT` | `9100` | Dashboard port |
|
|
299
|
+
| `A2A_BRIDGE_DASHBOARD_TOKEN` | unset (off) | Optional bearer token that protects the dashboard and API |
|
|
300
|
+
| `A2A_BRIDGE_HERMES_AUDIT` | unset | Read-only override for Hermes' `a2a_audit.jsonl` |
|
|
301
|
+
| `HERMES_HOME` | unset | Used to find `$HERMES_HOME/a2a_audit.jsonl` when no override is set |
|
|
302
|
+
|
|
303
|
+
### LAN deployment
|
|
304
|
+
|
|
305
|
+
The dashboard can be exposed deliberately on a trusted LAN without a token by
|
|
306
|
+
setting an explicit non-loopback bind. This mode has no authentication, so use
|
|
307
|
+
it only on a private, trusted network; never expose it to the public internet.
|
|
308
|
+
|
|
309
|
+
For protected LAN access, set a strong token and put the service behind a
|
|
310
|
+
TLS-terminating reverse proxy with its own network access controls:
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
export A2A_BRIDGE_DASHBOARD_HOST=0.0.0.0
|
|
314
|
+
export A2A_BRIDGE_DASHBOARD_TOKEN="$(openssl rand -hex 32)"
|
|
315
|
+
uv run mcp-a2a-bridge-dashboard
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
When a token is set, dashboard HTML, static assets, API routes, and SSE routes
|
|
319
|
+
all require it. Browser users enter it once at `/login`; the resulting
|
|
320
|
+
HttpOnly, same-site session cookie lets EventSource reconnect normally. API clients
|
|
321
|
+
can instead send `Authorization: Bearer <token>`. The service never
|
|
322
|
+
logs the token. A token authenticates access but does not encrypt traffic, so
|
|
323
|
+
do not use the direct HTTP LAN endpoint across untrusted networks; use HTTPS
|
|
324
|
+
at the reverse proxy.
|
|
325
|
+
|
|
326
|
+
For macOS, the `launchd/com.example.a2a-bridge-dashboard.plist` template can
|
|
327
|
+
run the dashboard at login. Replace its `__REPO__` and `__HOME__` placeholders
|
|
328
|
+
before installing it as a LaunchAgent.
|
|
329
|
+
|
|
330
|
+
### Dashboard frontend development
|
|
331
|
+
|
|
332
|
+
Node.js 24.15+ and npm are only required to work on the frontend or rebuild
|
|
333
|
+
its bundled assets:
|
|
334
|
+
|
|
335
|
+
```bash
|
|
336
|
+
cd /absolute/path/to/mcp-a2a-bridge/dashboard
|
|
337
|
+
npm ci
|
|
338
|
+
npm run dev
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
Vite prints the development URL (normally `http://localhost:5173`). Build the
|
|
342
|
+
assets consumed by the Python dashboard with `npm run build`.
|
|
343
|
+
|
|
344
|
+
## Copilot A2A server
|
|
345
|
+
|
|
346
|
+
The optional Copilot example requires an authenticated `copilot` CLI:
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
PYTHONPATH=examples:src python examples/run_copilot_main_dev.py 9010 --cwd /path/to/default/repository
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
It binds to `127.0.0.1` because it runs Copilot with `--allow-all-tools`.
|
|
353
|
+
Its incoming activity can use the same opt-in shared SQLite store and is
|
|
354
|
+
shown with source and destination fields in the dashboard.
|
|
355
|
+
|
|
356
|
+
The dashboard can also read Hermes' native audit file without modifying
|
|
357
|
+
Hermes. It checks `A2A_BRIDGE_HERMES_AUDIT`, then
|
|
358
|
+
`$HERMES_HOME/a2a_audit.jsonl`, then `~/.hermes/a2a_audit.jsonl`.
|
|
359
|
+
|
|
360
|
+
## Development and tests
|
|
361
|
+
|
|
362
|
+
Run the Python test suite from the repository root:
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
uv sync --all-extras --locked
|
|
366
|
+
uv run pytest -v
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
Run dashboard tests or make a production dashboard build from `dashboard/`:
|
|
370
|
+
|
|
371
|
+
```bash
|
|
372
|
+
npm test
|
|
373
|
+
npm run build
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
CI runs the Python suite on Python 3.11, validates `uv.lock`, and
|
|
377
|
+
runs the dashboard install, tests, and production build on the latest Node.js
|
|
378
|
+
24 release.
|
|
379
|
+
|
|
380
|
+
`tests/test_integration.py` runs an A2A agent in-process and exercises the
|
|
381
|
+
bridge end to end.
|