Skip to content

Documents

Build request policies in Ruby inside nginx. These pages describe the v3 development branch next: implemented behavior and planned work are kept separate. For the released 2.7 line, use the stable documentation.

  • Model routing with local mocks: choose an upstream by model, verify credential replacement, then edit the Ruby mapping and send the same request again. No provider key is needed.
  • Install: build the module for your own nginx, with the requirements, build options and upgrade checks.
  • Model API relay: client-key checks, model routing, concurrency limits and streamed relay. Each planned extension is marked.
  • HTTP routing: select a backend from request data.
  • Access control: refuse clients on a local denylist.
  • Rate limits: apply a limit per API key.
  • Response filters: modify a response body.
  • TCP connections: check the client before relaying a connection.
  • MCP gateway design: an unverified architecture, with its missing evidence and boundaries stated explicitly.
  • Planned gateway and site access uses: MCP policy and client profiles, model API fallback, AI crawler requests, and cache/telemetry boundaries for v3.
  • Glossary: the terms these pages use for models, model APIs, agents, MCP, A2A, their traffic and the AI gateway.

ngx_mruby is distributed under the MIT License.