Integration setup
CrewAI setup for FrankKi
Connect a CrewAI agent to FrankKi with the structured Streamable HTTP MCP configuration.
Setup
uv add mcpimport os
from crewai import Agent
from crewai.mcp import MCPServerHTTP
from crewai.mcp.filters import create_static_tool_filter
frankki = MCPServerHTTP(
url="https://mcp.frankki.app",
headers={"Authorization": f"Bearer {os.environ['FRANKKI_API_KEY']}"},
streamable=True,
tool_filter=create_static_tool_filter(
allowed_tool_names=["mcp_health", "address_validate", "letter_create_draft", "letter_preview", "shipping_quote", "order_status"]
),
)
agent = Agent(
role="Mail preparation assistant",
goal="Prepare reviewed physical mail without sending autonomously",
backstory="A conservative operator that stops for human review.",
mcps=[frankki],
)- 1.Use the structured configuration so the bearer token stays in a header and tools can be allowlisted.
- 2.Keep send and approval-decision tools out of the agent until the crew has a non-model human approval boundary.
- 3.Call mcp_health first and stop if the expected mode or capability is absent.
- 4.Persist IDs, quote, maxCostEuros, and idempotency keys in deterministic application state rather than relying on agent memory.
Required FrankKi safety boundary
Validate the address, create a stable draft, inspect every preview page, obtain a fresh quote, set maxCostEuros, persist a stable clientOrderId, and obtain an explicit human decision before a live submission. Framework approval controls supplement FrankKi approval; model text never substitutes for the human decision.
Continue with canonical agent onboarding, the draft guide, send guide, and error recovery.
Trust and live status
Machine-readable service facts and the current operational status of the partner interface are publicly available at all times, no login needed.