Ragex.API.Router (Ragex v0.18.4)

View Source

HTTP router for the Ragex REST API bridge.

Exposes MCP tools over HTTP for non-MCP integrations (CI pipelines, dashboards, scripts, custom tooling).

Endpoints

  • GET /api/health -- server health check
  • GET /api/tools -- list all available MCP tools
  • GET /api/openapi.json -- OpenAPI 3.0 specification
  • POST /api/tools/:tool_name -- invoke an MCP tool with JSON body

Authentication

When RAGEX_API_KEY is set, all requests require Authorization: Bearer <key>. Unset = open access.

Usage

Started via mix ragex.serve or programmatically:

Ragex.API.Server.start_link(port: 4321)

Summary

Functions

Callback implementation for Plug.call/2.

Callback implementation for Plug.init/1.

Functions

call(conn, opts)

Callback implementation for Plug.call/2.

init(opts)

Callback implementation for Plug.init/1.