I want my workflows to play nicely with MCP, either by exposing tools through an MCP server or by calling one that already exists. How do I build or connect an MCP server in 3B? Curious what’s involved on each side and how auth gets handled.
Great question on getting your workflows talking to MCP.
There are two directions, and they are independent.
Exposing tools as an MCP server
Your workflow becomes the server; an AI client (Claude, an agent, etc.) calls your tools.
- Build the MCP endpoint as a route in your workflow that speaks the protocol over streamable HTTP, handling the standard methods (list tools, call tool).
- Each tool maps to logic in your workflow: define its name, description, and a strict typed input schema, then return compact structured output.
- Auth: put the route behind the platform’s built-in route authentication (space or tenant scope) and let 3B authenticate incoming clients. You avoid implementing the full MCP OAuth handshake yourself.
Calling an existing MCP server
Your workflow is the client; you invoke tools another server exposes.
- Connect over streamable HTTP: open a session, list the server’s tools, then call the one you want with its arguments.
- Do this from a code step, or wire it into an AI step so the model picks and calls tools during its loop.
- Auth: if the server needs credentials, attach it as a connector so authentication is injected on each request rather than hardcoded.
Quick rule of thumb: exposing = a route others call, secured by route auth; calling = a client session you open, secured by a connector. If you want, I can go deeper on either side, including the tool schema design that makes them reliable.