stewai-mcp16.6 KB
View saved version →
---
name: stewai-mcp
description: "Use the StewAI MCP plugin whenever the user mentions StewAI, a recipe, or a reusable AI workflow, or wants an agent to turn a recurring task into a tested workflow. It finds, compares, and previews public recipes before sign-in, then authenticates for private access, quotes, runs, and authoring. Do not use for the Python SDK."
---
# StewAI MCP
StewAI is one capability: reuse a suitable published recipe when one exists; otherwise build,
qualify, and privately run a new one. Route by fit. Do not ask the user to choose between
marketplace and authoring workflows.
## Routing
Use only the StewAI MCP tools in the table below. Never fall back to the Python SDK, an API key,
browser search, shell commands, or workspace files when an MCP tool needs authentication or is
unavailable. Ask the user to connect or reauthenticate StewAI, then retry the same MCP tool.
A failed or unauthenticated MCP call never authorizes that fallback. If StewAI reports
`insufficient_scope`, ask the user to reconnect and approve the listed scopes.
Recipe creation requires one connection carrying the complete StewAI scope set:
`marketplace:read`, `marketplace:run`, `recipes:read`, `recipes:run`, `recipes:author`,
`recipes:test`, `recipes:publish`, and `runs:read`. Admin status does not replace OAuth
consent. Before authoring, `discover_stewai` must report `authoring_available:true` and list an
authoring journey. If it does not, reconnect the same StewAI server with those scopes and retry
`get_recipe_build`; do not create a draft until that read succeeds.
In the Codex desktop app, when both the locally installed `stewai` MCP server and a
`codex_apps` StewAI connector wrapper are available, always use the direct `stewai` server.
The native HTML card resource is registered on that installed-plugin server; do not route a
StewAI call through the connector wrapper.
`discover_stewai`, public-only `search_recipes`, and previews of their public references are
anonymous. Call discovery once per fresh connection and follow its journeys and rules. Sign in
by email only when the user requests private sources, a live quote or run, run data, or authoring.
The email sign-in uses a one-time code and preserves the selected public recipe reference.
Tool schemas and responses are the authoritative syntax; never invent operation names, fields,
modes, views, or recipe syntax.
## Before anything is spent
`run_recipe` is destructive and open-world: a real run spends credits and may call external
systems. Keep these stops, in this order.
1. Always call `estimate_recipe_run` first, but only for the selected recipe. Lead
with `history`: recent charges when history is sparse, or median and p90 when available. Then
report `fee_credits`, `available_credits`, and `can_start`. `safety_ceiling_credits` is a
pathological safety bound, not a quote or admission threshold. It may be null when provider
search has no request-side query ceiling; null never blocks a run. `estimated_credits` and
`sufficient` are deprecated compatibility fields; `sufficient: false` must never override
`can_start: true` or block an approved run. With fewer than three past runs, say there is
little history.
2. Obtain the user's approval before a real run when it can spend credits or affect an external
system. Then run exactly once.
3. Quote every paid review or acceptance action before executing it. State the cap and the
remaining authoring budget, then follow the quote's `next_action` exactly: redeem
`budget_capability` with `approve_recipe_budget`, then execute the quoted
request.
4. When acceptance returns `supervised_required`, call `bind_recipe_resource` once per required
selector, using the exact selector frozen in the draft.
Only then ask the user to open `action_url`. After approval, resume the same activity with
`resume_recipe_activity`.
5. Prefer selected failing cases while repairing; do not pay repeatedly for a complete suite
Preview of the first 4,000 characters. Read full instructions →