Everything that reaches your server from outside comes in through a door. A door is a way in that you open on purpose. Every door leads to the same gate. The gate marks who is asking, checks the grants, and writes the audit diary. This page goes app by app. Pick the thing you are connecting. Follow its shape.
#MCP agents
MCP is a shared language that AI apps use to call your server's tools. Claude Desktop, Cursor, a custom agent, or a peer Recued can connect over MCP:
- Open the MCP door. Choose the tools it may show. The door makes its own secret key.
- Give the agent your server's MCP address and that secret key.
- The agent's calls arrive marked with its name. They pass your grants. They land in the audit diary.
The agent sees only what the door grants: warehouse reads, timelines, and recipes as tools. Close the door, and its secret key stops working.
Change what a door grants, and some apps notice on their own. Claude Code, Gemini CLI, OpenCode, OpenClaw, and DeepSeek Harness hear about it within about ten seconds. They use the new tools from your next message. Cursor, Cline, Codex, and Claude Desktop keep the tools they saw when they connected, until you restart them. Either way, a tool you take away stops working at once, because the gate checks every call. This was checked in October 2026, with Recued 26.10.27.
A peer Recued connects the same way, with one extra. Its owner can put a question to you and hold their own run until you answer. See Ask a peer.
#Recued Kitchen for VS Code
The VS Code add-on can open and save Kitchen drafts. Its contract needs four Kitchen tool grants. It can also edit and check local source without a server or key. Follow the Recued Kitchen guide for setup and use.
#An app on the same computer
An app on the computer Recued runs on can start Recued's MCP server
itself, with recued --mcp, instead of reaching it over the network. It
still needs a contract's key. There are two ways to give it one:
- Save the key in Recued, with
recued mcp-key setin a terminal. The key then stays out of the app's settings. This needs Recued 26.10.30 or later. An app that loads Recued as a plugin, such as Codex, needs this way. A plugin cannot carry a key, and the app does not pass one on. The contract's Connect tab shows it for Claude Desktop and for the Codex plugin. - Put the key in the app's own MCP settings, as
RECUED_MCP_TOKEN. This works with any version of Recued, but the key then sits in that app's settings file.
recued mcp-key set asks which app the key is for, then asks for the
key. It does not show the key as you paste it. It lists each app that has
started recued --mcp on this computer, and "Every app" too. An app uses
its own key first, then the key for every app. An app with neither gets
no tools. You can save a different contract for each app, or one for all
of them.
recued mcp-key list shows the contract each app uses. recued mcp-key clear removes a saved key. Restart the app after a change, so that it
loads the contract's tools.
Recued tells apps apart by the folder each app gives its plugin, or by
--app <name> in the app's settings. A saved key decides which contract
an app is offered. It does not stop another program on this computer from
starting recued --mcp with that name.
#The Codex plugin
The Recued plugin for Codex and other apps that load plugins is at
github.com/recued/agent-plugin.
In Codex, run codex plugin marketplace add recued/agent-plugin, then
codex plugin add recued@recued. Start Codex once, so Recued notes it.
Then save the key for it with recued mcp-key set, and restart Codex.
It needs Recued 26.10.30 or later.
With codex exec, Codex runs with no one to answer it. It asks before any
tool that changes something, so there it refuses those tools. To use them,
set default_tools_approval_mode = "approve" for the Recued server in
Codex's settings. Your approvals in Recued still apply to each write. This
was checked in November 2026, with Codex 0.166.0.
#OpenAI-compatible chat apps
Some chat apps let you type in a custom base URL and an API key. Any app like that can talk to a Recued server that has given it access. The app does not need MCP. This is the way a seller's customers use an "ask my operated knowledge" product. It speaks the standard shape:
- Base URL: your server's gateway address.
- API key: the door's secret key. The app sends it as a normal bearer key, which is a secret key sent with each request. Customers get theirs through a claim link.
GET /v1/models: returns one model. Its name is an alias the server owner picks (recued-sellerby default). The alias is only a label, not a choice. The server decides which real model answers. Its owner sets that.POST /v1/chat/completions: one request is one chat turn, and the gate checks it.
A turn runs on the server's chat engine. Answers come from what the connected contract grants. A contract is the saved list of what one actor may do. Granted recipes can be called as tools. They follow the same approval rules as everything else. The privacy alias rule applies too. Known names, emails, phone numbers, and addresses are swapped for placeholder aliases before text leaves for the model. Your chat history stays in your own app. The server does not mix it into the owner's chat history.
#Streaming, and what the gateway is not
Two things to know. Streaming works: set stream: true and the answer comes
back as chunks, the way OpenAI sends them. The whole turn still runs first,
and the gate still checks it. While it runs, the gateway keeps the connection
open with small keep-alive lines, so a long turn does not time out. Then it
sends the answer in pieces. Ask for stream_options.include_usage and you
also get the token counts at the end. And expect chat completions only. This
is a chat surface. It is not a full copy of the OpenAI platform.
#When a request gets no answer
A request the gateway cannot answer gets an error in OpenAI's shape, with a status and a code that say what went wrong:
- 503,
llm_gateway_model_cooling_down: the model the server uses is paused, because its provider failed or rate-limited it. ARetry-Afterheader says how many seconds to wait, and the message says it too. OpenAI's own libraries wait that long before they retry. - 503,
llm_gateway_no_model: no model is available to the server right now. The server's owner sets one up. - 503,
llm_gateway_route_unavailable: the model the owner chose for the gateway is not available, for example because it has used its budget for the day. - 502,
llm_gateway_model_output_invalid: the model answered with something that could not be read, even when asked again. - 502,
llm_gateway_provider_failed: the model's provider failed before answering. When it said when to try again,Retry-Aftersays so too.
With stream: true, a failure after the stream has started comes as an
error event in the stream, with the same code and message. The status was
already 200 by then.
#Chat platforms
Slack and Telegram connect as messenger doors. Messages and slash commands POST straight to your server. They never go through Recued's cloud. Replies, notifications, and approvals can reach you in the same channel.
#Your own devices are different
The webclient and the Browser Bridge do not come in through doors. They pair. Pairing links a device to your server. It is a narrower, more trusted link. It is only for machines you own. See Pairing and devices.
#What every connection shares
No matter which app it is, the same things hold. The caller has a name. Its access is exactly what its door or contract grants. Every call is written in the audit diary. Rate and usage limits apply where the door sets them. And taking access back is one action: close the door, or issue a new secret key.
#Related
- AI chat and MCP: the built-in chat, and why it stays safe.
- Selling access: giving outsiders access in tiers, on your own terms.
- Grants and approvals: the gate behind every door.