Back to the blog

Connecting MCP servers to a team workspace

· By Bee Flow · 4 min read

Bee Flow is an MCP client over stdio and Streamable HTTP. In a shared workspace the harder questions are who may add a server and what its tools may do. This is how we answer both.

A patch panel with several cables, one being plugged in, and a padlock beside it

The Model Context Protocol gives an agent tools from an outside program: search a repository, read a ticket, query a database. Bee Flow is an MCP client, so any server that speaks the protocol can add tools to chats and agents. On a laptop with one user that is the whole story. In a workspace shared by an organisation, or by several organisations on one server, two more questions decide whether it is safe: who may add a server, and what its tools may do once they are there.

Two transports

The client lives in server/core/mcpManager.js and uses the official @modelcontextprotocol/sdk. Over stdio, the Bee Flow server starts the MCP server as a child process (npx, uv, node) and talks JSON-RPC over its stdin and stdout. Over Streamable HTTP, it connects to a URL and sends the stored credential as the Authorization header.

Connections are pooled per user and per server, and closed after five minutes idle. A stdio child does not inherit the server's environment. The child gets an allow-list of exact names (PATH, home and temp directories, locale and proxy settings) plus the credentials configured for that server. We chose an allow-list because a deny-list leaks the next secret somebody adds to the server's environment.

Some integrations ask users for a password to a service we do not control, an IMAP mailbox for example. Those MCP servers ship inside the server image under server/mcpServers/ and run from there, so nothing is fetched from npm when they start.

Who may add what

Server administrator Organisation admin
Installs for Every organisation on the server Their own organisation
Sources Curated library, the open MCP registry, a custom command or address The library, and other https servers when the policy allows
Local (stdio) servers Yes Never
Sets the policy Yes No

An organisation admin can never install a command or a package. Organisation servers are remote-only, so nothing they add runs on the Bee Flow host. A server-wide local server is a program the Bee Flow server downloads and starts. It runs with the minimal environment described above, but it does have network access, which is why the docs advise remote servers and pinned package versions.

The policy

The server administrator sets one policy for organisation admins, on the Server-wide tab of the MCP library:

Policy Organisation admins may install
Switched off Nothing. Servers installed earlier stop working but are kept.
Official servers only (default) Vendor-hosted servers from the Bee Flow library, at fixed addresses
Official servers and approved hosts The above, plus hosts you list, such as mcp.example.com or *.example.com
Any public server Any public https server

The policy is checked again on every tool call. Tightening it stops servers that no longer qualify straight away, and the library marks them "Blocked by policy". In every mode a connection has to resolve to a public address. It is pinned to that address and sent over https without following redirects, which keeps private networks out of reach.

Permissions per tool and per person

Adding a server has three steps: connect, pick tools, choose access. Bee Flow connects once to list the tools and stores nothing until you install. Each tool shows whether the server declares it read-only or able to change data, and tools the server marks as destructive start switched off. When a server adds tools later, they show up under "Check for new tools" and stay off until an admin turns them on.

Access goes to the whole organisation or to specific groups. A curated agent still gets only the tools it was given, so installing a server does not widen an agent that already exists. Each call checks again that the server belongs to the caller's organisation, is switched on and is part of the caller's entitlements.

There are two modes for the key. With one key for everyone, the admin's key is encrypted and lent to the organisation, and every member acts with its permissions. With everyone using their own key, members add it under Settings → Connections and the admin's key only checks the connection. Keys are encrypted per organisation and bound to the server's origin. Bee Flow refuses to send a key to any other address and scrubs keys from tool results and error messages. Every install, change and removal goes to the access audit log, with names and counts and never keys.

An example

Server-wide entries in the library are plain data. This is the GitHub entry, shortened:

{ id: 'github', name: 'GitHub', transport: 'stdio', command: 'npx',
  args: ['-y', '@modelcontextprotocol/server-github'],
  required_credentials: [{ key: 'GITHUB_PERSONAL_ACCESS_TOKEN', label: 'GitHub PAT' }] }

Each person fills in their own token under Settings → Connections. The first time they use a GitHub tool, the server spawns the process for that user with GITHUB_PERSONAL_ACCESS_TOKEN in its environment and nothing else of Bee Flow's. If you add a command of your own, pin the version (@1.2.3), so that what runs tomorrow is what you reviewed today.

For an organisation that wants a vendor's hosted server from outside the library, the server administrator puts the vendor's host on the approved list. The organisation admin then chooses Connect another server, enters the https address, checks the connection and installs.

What is missing

Organisation servers do not work in automations yet, only in chats and agents. The outgoing connections of a stdio server are invisible to Bee Flow, so the Privacy Shield map of where data went lists those calls under "No known location", with the reason that the tool runs as a separate program.

The MCP library docs have the full API. Which licence includes the library is on the plans page, and the built-in integrations are on the integrations page.

To see the library with the servers your team uses, plan a 20-minute call.

#security #self-hosting