This PR adds initial support for MCP servers and OAuth connections. Some core changes were necessary to allow a plugin to declare connections to remove services that can be used to pull in additional tools. The new, generic MCP plugin is the only one that uses it for now.
Notes:
- Connections on private networks are restricted to admins only.
- Tools are enabled by default. Users can disable them after adding the server.
- Only Streamable HTTP servers are supported for connections.
- To do Output is structured content or text. Images, audio, and binary resources are left out with a "not shown" note until tools can return files.
- Admins can also add 'shared' MCP plugins that will be useable by the specified roles.
Still needed:
- Tool approval runtime + UI
- Handling images and files returned by tools.
- Admin limits on a shared server's tools.
Testing
pnpm checkhas three failures that come frommain, not this branch: lint inapps/server/src/settings/schemas.tsandapps/web/src/shared/ui/sidebar.tsx, and the web test "lets search engines list the login page".