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.
Greentic does not treat MCP as a separate hand-written YAML tool language. The current implementation centers on:
wasm32-wasip2 MCP components, usually from OpenAPI or Google Discovery documentsmcp.execgreentic-dev mcp doctorOpenAPI / Discovery document | vgreentic-mcp-gen | vwasm32-wasip2 MCP component | vGreentic pack / bundle | vFlow node: mcp.exec | vHost bindings: MCP endpoint, network, secrets, telemetryGenerated 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.
Use greentic-mcp-gen to generate MCP components from an API description:
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: