BB.MCP.Router (bb_mcp v0.1.0)

Copy Markdown View Source

Phoenix router macro for mounting the BB MCP server over Streamable HTTP.

Usage

defmodule MyAppWeb.Router do
  use Phoenix.Router
  import BB.MCP.Router

  scope "/" do
    bb_mcp "/mcp"
  end
end

This forwards requests at the given path to Anubis.Server.Transport.StreamableHTTP.Plug, configured for BB.MCP.Server. Pass server: MyOtherServerModule to mount a different server module (useful if you've defined your own use Anubis.Server module).

Summary

Functions

Forwards path to the Anubis Streamable HTTP plug for the BB MCP server.

Functions

bb_mcp(path, opts \\ [])

(macro)

Forwards path to the Anubis Streamable HTTP plug for the BB MCP server.

Options

  • :server — the server module to mount. Defaults to BB.MCP.Server.