Overview

Beep.AI.Server implements the Model Context Protocol (MCP) for standardized tool and resource access by AI agents. The MCP service manages server lifecycle, OAuth 2.1 authentication, provider-managed runtimes, and tool discovery.

Core Services

ServiceKey FunctionResponsibility
utils/mcp_environment.pyget_mcp_env()MCP environment lifecycle and package management
utils/mcp_runtime_bridge.pyget_mcp_runtime_bridge()Bridge between MCP servers and agent frameworks
utils/mcp_server_manager.pyMCPServerManagerServer lifecycle: create, start, stop, configure, list tools
utils/managed_mcp_runtime_catalog.pyProvider-managed runtimesPre-configured MCP runtime templates for common providers

Route Blueprints

BlueprintURL PrefixPurpose
mcp_page_routes/admin/mcpOverview, templates, server create/edit, detail pages (Phased: A=setup, B=packages, C=servers list)
mcp_api_server_routes/admin/mcp/api/*Server CRUD, tool listing, transport configuration
mcp_api_environment_routes/admin/mcp/api/*Environment status, create-env, install-packages
mcp_api_managed_provider_routes/admin/mcp/api/*Provider-managed runtime configuration
mcp_catalog_api_routes/admin/mcp/api/catalogTool discovery from registered servers
mcp_registry_routes/mcp/registryPublic MCP registry access for external clients
mcp_oauth/.well-known/oauth-protected-resourceOAuth 2.1 well-known discovery + OpenID configuration

OAuth 2.1 Well-Known Discovery

MCP OAuth endpoints publish standard well-known URIs:

  • /.well-known/oauth-protected-resource — Protected resource metadata
  • /.well-known/openid-configuration — OpenID Connect discovery document

MCP Server Catalog

Pre-built MCP server definitions live in mcp_servers_catalog/. These can be registered as managed runtimes, configured with provider settings, and bound to agent frameworks through the MCP Bridge.