Integration setup
LangChain setup for FrankKi
Load FrankKi tools through langchain-mcp-adapters, with the sending workflow controlled in application code or LangGraph.
Setup
python -m pip install langchain-mcp-adapters langgraphimport os
from langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({
"frankki": {
"transport": "streamable_http",
"url": "https://mcp.frankki.app",
"headers": {"Authorization": f"Bearer {os.environ['FRANKKI_API_KEY']}"},
}
})
tools = await client.get_tools()- 1.Filter the returned tools before binding them to a model. Start with mcp_health, address_validate, letter_create_draft, letter_preview, shipping_quote, and order_status.
- 2.Use a LangGraph interrupt after quote and before any submission. Resume only from an external human decision bound to the reviewed artifact and quote.
- 3.Route PRICE_CHANGED back through quote and a fresh interrupt. Preserve clientOrderId through bounded retries.
- 4.Do not checkpoint recipient data or letter content unless the checkpoint store has an approved retention and access policy.
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.