Generated Components
greentic-mcp-gen turns API descriptions into WASM components that expose MCP tools.
MCP (Model Context Protocol) is a standard way to describe tools that an AI system can call. In Greentic, MCP is used as an integration surface for digital workers that need to call external APIs, SaaS systems, internal services, and generated tool components.
MCP tools run on a single, shared MCP rail. Servers are registered per tenant/team in greentic-admin (tenant_mcp_servers) and are consumed by both flow nodes and agentic workers through one McpToolSource. There is no separate tool wiring for flows versus agents — the same registered server is reused everywhere.
The rail supports two transports:
2025-06-18).wasix:mcp/router WASM component run in-process by the runner. No HTTP hop.A registered MCP server uses one of two transports. Both are reached the same way by callers (flow nodes and agentic workers) through the shared McpToolSource.
| Transport | What it is | Where it runs |
|---|---|---|
http | A remote MCP server over Streamable HTTP (JSON-RPC 2.0, protocol 2025-06-18). | An external process/service. |
local-wasm | A wasix:mcp/router WASM component executed in-process by the runner. | Inside the Greentic runner — no HTTP hop. |
Use http for existing or hosted MCP servers. Use local-wasm when you want a sandboxed, signed tool that ships and runs as a WASM component with no network round-trip. See Local-WASM Tools below for the authoring path.
http transport local-wasm transport-------------- --------------------Remote MCP server wasix:mcp/router .gtxpack(Streamable HTTP, (gtdx new --kind mcp) JSON-RPC 2025-06-18) | | v | publish to store | | +------------+---------------+ v Register in greentic-admin (tenant_mcp_servers, per tenant/team) | v Shared McpToolSource | +------------+------------+ v v Flow nodes Agentic workersA local-wasm MCP tool is a wasix:mcp/router WASM component packaged as a .gtxpack. The end-to-end path is:
Scaffold a router component:
gtdx new --kind mcp my-toolThis generates a wasix:mcp/router component (exports wasix:mcp/router@25.6.18).
Publish the .gtxpack to the store. The store validates kind: wasix:mcp/router against its describe-mcp-v1 schema.
Register the server in greentic-admin. Admin pulls the .gtxpack, verifies its sha256 and Ed25519 signature against trusted publisher keys, and caches the tool list by running list_tools at registration (best-effort and non-fatal — tools is left null on failure).
Author in the Designer. The flow-editor prompt and the agentic-worker tool picker surface the cached tools without an HTTP probe.
Run. The runner pulls, verifies, caches, and executes the component in-process.
Tool lists can be warmed eagerly via the best-effort greentic.mcp.warm.v1 NATS event; a lazy store-pull is the fallback.
Generated Components
greentic-mcp-gen turns API descriptions into WASM components that expose MCP tools.
Flow Calls
Flows call MCP-backed operations through mcp.exec, passing an action and JSON-style arguments.
Binding Hints
Packs can describe MCP servers, endpoints, transports, capability tags, secrets, environment variables, and network allowlists for the host.
Doctor Checks
greentic-dev mcp doctor inspects tool maps and reports missing component files, entries, retry settings, and timeouts.
Current Greentic flow fixtures use component-style nodes. An MCP call is represented as a node operation named mcp.exec:
nodes: forecast_weather: mcp.exec: component: weather_api action: forecast_weather args: q: in.q_location days: parameters.days_default routing: - to: weather_textThe important fields are:
| Field | Purpose |
|---|---|
component | Logical MCP component or adapter name available to the pack/runtime. |
action | Tool operation to call on that component. |
args | Arguments passed to the operation. These should match the tool input schema. |
This is different from older docs that showed:
type: mcp-toolDo not use that older shape for new flows.
For a publish-ready wasix:mcp/router extension from an OpenAPI or Swagger spec, use the
gtdx high-level wrapper:
gtdx new --kind mcp --from-openapi ./openapi/weatherapi.yamlgtdx shells out to greentic-mcp-gen and auto-authors describe.json — deriving
runtime.permissions.network from the spec’s servers and secret_requirements from its
security schemes. See Creating MCP Tools for the full step-by-step
including dependency setup and gtdx publish.
For lower-level control, call greentic-mcp-gen directly:
greentic-mcp-gen \ --spec ./openapi/weatherapi.yaml \ --output-dir ./outputUseful validation commands:
greentic-mcp-gen --spec ./openapi/weatherapi.yaml --list-toolsgreentic-mcp-gen --spec ./openapi/weatherapi.yaml --tool-schema forecast_weathergreentic-mcp-gen --spec ./openapi/weatherapi.yaml --tool-plan forecast_weatherThe installed generator help states that generated components target the current protocol with:
greentic-mcp-gen --protocol latestThe local generator source currently supports latest / 25.06.18.
For Google APIs, use the discovery subcommand:
greentic-mcp-gen discovery \ --url "https://sheets.googleapis.com/$discovery/rest?version=v4" \ --profile sheets-crm \ --out ./outputYou can also convert Discovery to OpenAPI first:
greentic-mcp-gen discovery-to-openapi \ --url "https://sheets.googleapis.com/$discovery/rest?version=v4" \ --profile sheets-crm \ --out ./specs/sheets.openapi.jsonGreentic types include MCP binding hints so the runner can prepare host-side tool access:
{ "mcp": { "servers": [ { "name": "weather_api", "transport": "http", "endpoint": "https://api.weather.example", "caps": ["weather"] } ] }}Binding hints are not a substitute for secrets or policy. They tell the host what the pack expects so runtime setup can wire the right endpoint, transport, and capability tags.
The dev CLI can inspect MCP tool maps. The current source accepts JSON or YAML files named toolmap.json, toolmap.yaml, toolmap.yml, mcp.json, or mcp.yaml.
{ "tools": [ { "name": "echo", "component": "./target/wasm32-wasi/release/echo_tool.wasm", "entry": "tool_invoke", "timeout_ms": 3000, "max_retries": 1, "retry_backoff_ms": 100 } ]}Run:
greentic-dev mcp doctor providers/weatheror:
greentic-dev mcp doctor providers/weather --jsonThe doctor resolves component paths relative to the tool-map file and reports missing components, entry names, retry settings, and timeout settings.
MCP integrations still follow Greentic’s host capability model: