-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add iii-mcp and iii-a2a protocol workers #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
03ca455
1ff864c
c350791
c08eacb
bcdc5a1
bdd6565
1c8eb95
debbd95
cd96d26
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,80 @@ Worker modules for the [III engine](https://github.com/iii-hq/iii). | |
|
|
||
| ## Modules | ||
|
|
||
| ### mcp | ||
|
|
||
| MCP protocol worker — exposes iii-engine functions as MCP tools via stdio and Streamable HTTP. | ||
|
|
||
| **Protocol version:** `2025-11-25` | ||
|
|
||
| **Features:** | ||
| - Dual transport: stdio (Claude Desktop, Cursor) + HTTP (`POST /mcp`) | ||
| - 6 builtin tools: worker register/stop, trigger register/unregister/void/enqueue | ||
| - 4 MCP resources: `iii://functions`, `iii://workers`, `iii://triggers`, `iii://context` | ||
| - 4 MCP prompts: register-function, build-api, setup-cron, event-pipeline | ||
| - Metadata filtering: only functions with `mcp.expose: true` are exposed (unless `--expose-all`) | ||
| - Spawn Node.js/Python workers on the fly via `iii_worker_register` tool | ||
|
|
||
| #### Build | ||
|
|
||
| ```bash | ||
| cd mcp | ||
| cargo build --release | ||
| ``` | ||
|
|
||
| #### Usage | ||
|
|
||
| ```bash | ||
| iii-mcp # MCP stdio (Claude Desktop, Cursor) | ||
| iii-mcp --no-stdio # MCP HTTP only (POST /mcp) | ||
| iii-mcp --expose-all # show all functions, ignore metadata filter | ||
| ``` | ||
|
|
||
| Tag functions for MCP exposure: | ||
| ```js | ||
| iii.registerFunction({ | ||
| id: 'orders::process', | ||
| metadata: { "mcp.expose": true } | ||
| }, handler) | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ### a2a | ||
|
|
||
| A2A protocol worker — exposes iii-engine functions as A2A agent skills via HTTP. | ||
|
|
||
| **Features:** | ||
| - Full A2A type system: AgentCard, Task (8 states), Message, Part, Artifact | ||
| - Methods: `message/send`, `tasks/get`, `tasks/cancel`, `tasks/list` | ||
| - Agent card at `GET /.well-known/agent-card.json` | ||
| - Task state stored via engine KV (`a2a:tasks` scope) | ||
| - Metadata filtering: only functions with `a2a.expose: true` are exposed (unless `--expose-all`) | ||
|
|
||
| #### Build | ||
|
|
||
| ```bash | ||
| cd a2a | ||
| cargo build --release | ||
| ``` | ||
|
|
||
| #### Usage | ||
|
|
||
| ```bash | ||
| iii-a2a # A2A HTTP (POST /a2a + GET /.well-known/agent-card.json) | ||
| iii-a2a --expose-all # show all functions as skills | ||
| ``` | ||
|
Comment on lines
+145
to
+150
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Document the public URL flag in the A2A usage section. The PR adds a configurable agent-card URL, but this block only shows local/default invocations. Please document 🤖 Prompt for AI Agents |
||
|
|
||
| Tag functions for A2A exposure: | ||
| ```js | ||
| iii.registerFunction({ | ||
| id: 'orders::process', | ||
| metadata: { "a2a.expose": true } | ||
| }, handler) | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ### image-resize | ||
|
|
||
| A Rust-based image resize worker that connects to the III engine via WebSocket and processes images through stream channels. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| [package] | ||
| name = "iii-a2a" | ||
| version = "0.3.0" | ||
| edition = "2024" | ||
| description = "A2A protocol worker for iii-engine" | ||
| license = "Apache-2.0" | ||
| authors = ["Rohit Ghumare <ghumare64@gmail.com>"] | ||
| repository = "https://github.com/iii-hq/workers" | ||
| homepage = "https://github.com/iii-hq/workers" | ||
| rust-version = "1.85" | ||
| keywords = ["a2a", "agent-to-agent", "ai", "iii-engine"] | ||
| categories = ["command-line-utilities"] | ||
|
|
||
| [[bin]] | ||
| name = "iii-a2a" | ||
| path = "src/main.rs" | ||
|
|
||
| [dependencies] | ||
| iii-sdk = "0.10.0" | ||
| tokio = { version = "1", features = ["macros", "rt-multi-thread", "sync", "time", "signal"] } | ||
| serde = { version = "1", features = ["derive"] } | ||
| serde_json = "1" | ||
| clap = { version = "4", features = ["derive"] } | ||
| tracing = "0.1" | ||
| tracing-subscriber = { version = "0.3", features = ["env-filter"] } | ||
| anyhow = "1" | ||
| uuid = { version = "1", features = ["v4"] } |
Uh oh!
There was an error while loading. Please reload this page.