MCP Transport¶
obsidian_palace.mcp.transport
¶
MCP transport — serves both SSE and Streamable HTTP transports.
With FastMCP, the transport and auth middleware are handled internally. This module creates a Starlette ASGI app that supports:
- SSE transport at
/sse+/messages/(for Claude Code/Desktop) - Streamable HTTP at
/mcp(for OpenCode and newer MCP clients)
Both transports share the same underlying MCP server, OAuth provider, and auth middleware. The Google OAuth callback route is injected for the auth delegation flow.
logger = logging.getLogger(__name__)
module-attribute
¶
create_mcp_app() -> Starlette
¶
Build the MCP Starlette app with SSE + Streamable HTTP transports.
Returns:
| Type | Description |
|---|---|
Starlette
|
A Starlette ASGI application with both MCP transports, OAuth |
Starlette
|
discovery/auth/token endpoints, and the Google callback route. |