Nexus: gateway for MCP servers and LLM providers

Nexus

A Rust gateway that puts MCP servers and LLM providers behind one address and adds authorization, rate limits and tool search

  • 436 ★ on the repository
  • Last commit
  • MPL-2.0
MCP server

Broad access

Why this level

  • The gateway holds LLM provider keys and MCP server tokens and passes every agent tool call through itself
  • STDIO servers from the configuration start as child processes with an arbitrary `cmd` command, environment variables and a working directory
  • Without OAuth2 the gateway accepts any string in place of a key, so the port has to be kept closed: by default it listens on 127.0.0.1:8000
All reasons and checks

nexus-router/nexus

Install

Manual install

curl -fsSL https://nexusrouter.com/install | bash

Installs the binary on Linux, macOS and Windows through WSL. The `nexus` command starts the gateway with the `nexus.toml` file.

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • The gateway holds LLM provider keys and MCP server tokens and passes every agent tool call through itself
  • STDIO servers from the configuration start as child processes with an arbitrary `cmd` command, environment variables and a working directory
  • Without OAuth2 the gateway accepts any string in place of a key, so the port has to be kept closed: by default it listens on 127.0.0.1:8000

This is third-party code. Review the repository files before installing.

What it does

Nexus is a Rust server that sits between an agent and your MCP servers and LLM providers. The agent connects to one `/mcp` address, while Nexus talks to the connected servers over STDIO, SSE or streamable HTTP and gathers their tools into one list. The agent sees two tools. `search` finds suitable tools from a natural language query with fuzzy matching, and `execute` calls the chosen one. Names get the server prefix, for example `github__search_code` and `filesystem__read_file`. For models, Nexus offers a single OpenAI-format entry point at `/llm/openai`, and the `/llm/anthropic` path can be turned on. Requests are routed by model name and translated into the OpenAI, Anthropic, Google or AWS Bedrock format. Everything is configured in the `nexus.toml` file: group-based access, OAuth2, rate limits in memory or in Redis, TLS and OTLP telemetry.

Who it is for. For teams and developers who run several MCP servers and LLM providers and want agents to go through one protected address with shared access rules.

Good fit when

  • Many MCP servers are connected and their tool lists bloat the agent's context
  • You need one address for Claude Code, Cursor and Codex CLI without configuring every server separately
  • You need to limit which user groups see paid or dangerous MCP tools
  • You need request limits per user, per IP, per MCP server or per model, stored in Redis
  • OpenAI, Anthropic, Google and Bedrock models have to be called through one OpenAI-format endpoint

Not a fit when

  • One or two MCP servers are enough: connecting directly is simpler than running a separate service
  • You need a cloud service with no hosting of your own: you install and run Nexus yourself
  • You need a graphical management interface: configuration lives in the `nexus.toml` file

Example request

Find among the connected tools the one that searches code on GitHub and call it for a query about error handling in Axios

MCP

Transport
http
Authentication
not required

Environment variables

OPENAI_API_KEY secret
OpenAI key for the provider block in nexus.toml. Needed only if the provider is connected.
ANTHROPIC_API_KEY secret
Anthropic key for the provider block in nexus.toml. Needed only if the provider is connected.

Limitations

For MCP only static header insertion is supported, and only for HTTP servers: headers of incoming requests are not forwarded and the rule does not apply to STDIO servers. Keys are substituted from environment variables with the `{{ env.NAME }}` notation.

If at startup the model list cannot be fetched from at least one provider, Nexus exits so you can fix the configuration. With OAuth2 enabled, clients need a JWT, and passing the token to downstream servers is switched on with the `forward` setting when they all use one authorization server. Group limits require client identification.

OpenAI and Anthropic are connected as providers with their own keys, and their APIs are unavailable from Russia. The Docker image is published with the tags `latest`, `stable` and a specific version.

How to disable. Stop the `nexus` process or the container and remove the server from the client configuration: in Claude Code that is `claude mcp remove nexus`. The `nexus.toml` file with keys is stored separately, so delete it if the gateway is no longer needed.

FAQ

How do I connect Nexus to Claude Code?

Start Nexus, then run `claude mcp add --transport http nexus http://localhost:8000/mcp` or put the same address in the project's `.mcp.json`. Check with `claude mcp list`. The gateway has to be running before Claude Code starts.

What do the search and execute tools do?

`search` finds the needed tools across all connected MCP servers from a natural language query and returns names, descriptions and parameters. `execute` calls the chosen tool with those parameters.

How do I add an MCP server to Nexus?

In `nexus.toml` describe a `[mcp.servers.name]` block. For a local process set `cmd`, for example launching the filesystem server through `npx`, for a remote one give `url` and, if needed, `protocol`. Without a protocol Nexus tries streamable HTTP first, then SSE.

How do I route Codex CLI through Nexus?

In `~/.codex/config.toml` add a `nexus` provider with `base_url = "http://127.0.0.1:8000/llm/openai/v1"`. The `/v1` suffix is mandatory. Start with `codex -c model="anthropic/claude-3-5-haiku-latest" -c model_provider=nexus`.

How do I lock Nexus down against outsiders?

Turn on a `[server.oauth]` block with a JWKS address: then every path except `/health` and `/.well-known/oauth-protected-resource` requires a JWT. In addition you set groups with `allow` and `deny` for servers and tools, and request limits.

Discussion

No questions or reviews yet.

Agentgateway

agentgateway

Official

A proxy for agentic traffic: routes and secures connections to MCP servers, LLMs, and other agents over A2A

MCP serverBroad access5.8KRepository stars

An MCP server for NixOS resources: search packages and options so the agent does not invent names and settings

MCP serverExtended access867Repository stars

An IBM gateway and registry that federates MCP servers, A2A agents and REST or gRPC APIs behind one endpoint with auth and observability

MCP serverBroad access4.7KRepository stars

A Node.js manager for MCP servers: it starts local servers, connects remote ones and gives a client one address, with a REST API for control

MCP serverBroad access524Repository stars

A Rust code-quality sensor that scores a project before and after an agent session, installable as a Claude Code plugin or MCP server

CLIExtended access3.3KRepository stars

Comparison with similar tools

Entries that share the main search query, and how they differ.

EntryOfficialAuthenticationRepository starsMain difference
Nexus: gateway for MCP servers and LLM providers (this entry)nonot required436
Docker MCP Gatewayyesnot required1,616the docker mcp CLI plugin and gateway: MCP servers from the Docker catalog in isolated containers behind one connection point
ContextForgenoAPI key4,720a gateway and registry from IBM that unites MCP servers, A2A agents and REST or gRPC APIs with authorization
1MCP Agentnonot required525one MCP server in place of many, serving the connected servers to the client at a single address

README in short

The description starts with the feature list and installation, then goes through `nexus.toml` in detail: MCP server types, authentication, access rules, limits, TLS, model providers and telemetry. At the end it gives connection examples for Cursor, Claude Code and Codex CLI and client snippets in Python and JavaScript.

README badge

Report a problem

Foxx AINexus: gateway for MCP servers and LLM providers
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.