Nexus MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add nexus-mcp -- uvx nexus-mcp
README.md

Invoke AI CLI agents as tools with parallel execution and retries

Nexus MCP

A MCP server that enables AI models to invoke AI CLI agents (Gemini CLI, Codex, Claude Code, OpenCode) as tools. Provides parallel execution, automatic retries with exponential backoff, JSON-first response parsing, and structured output through five MCP tools.

Use Cases

Nexus MCP is useful whenever a task benefits from querying multiple AI agents in parallel rather than sequentially:

  • Research & summarization — fan out a topic to multiple agents, then synthesize their responses into a single summary with diverse perspectives
  • Code review — send different files or review angles (security, correctness, style) to separate agents simultaneously
  • Multi-model comparison — prompt the same question to different models and compare outputs side-by-side for quality or consistency
  • Bulk content generation — generate multiple test cases, translations, or documentation pages concurrently instead of one at a time
  • Second-opinion workflows — get independent answers from separate agents before making a decision, reducing single-model bias

Features

  • Parallel executionbatch_prompt fans out tasks with asyncio.gather and a configurable semaphore (default concurrency: 3)
  • Automatic retries — exponential backoff with full jitter for transient errors (HTTP 429/503)
  • Output handling — JSON-first parsing, brace-depth fallback for noisy stdout, temp-file spillover for outputs exceeding 50 KB
  • Execution modesdefault (safe, no auto-approve), yolo (full auto-approve)
  • CLI detection — auto-detects binary path, version, and JSON output capability at startup
  • Session preferences — set defaults for execution mode, model, max retries, output limit, and timeout once per session; subsequent calls inherit them without repeating parameters
  • Tool timeouts — configurable safety timeout (default 15 min) cancels long-running tool calls to prevent the server from blocking indefinitely
  • Client-visible logging — runner events (retries, output truncation, error recovery) are sent to MCP clients via protocol notifications, not just server stderr
  • Extensible — implement build_command + parse_output, register in RunnerFactory
Agent Status
Gemini CLI Supported
Codex Supported
Claude Code Supported
OpenCode Supported

Installation

Run with uvx (recommended)

uvx nexus-mcp

uvx installs the package in an ephemeral virtual environment and runs it — no cloning required.

To check the installed version:

uvx nexus-mcp --version

To update to the latest version:

uvx --reinstall nexus-mcp

MCP Client Configuration

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "nexus-mcp": {
      "command": "uvx",
      "args": ["nexus-mcp"],
      "env": {
        "NEXUS_GEMINI_MODEL": "gemini-3-flash-preview",
        "NEXUS_GEMINI_MODELS": "gemini-3.1-pro-preview,gemini-3-flash-preview,gemini-2.5-pro,gemini-2.5-flash,gemini-2.5-flash-lite",
        "NEXUS_CODEX_MODEL": "gpt-5.2",
        "NEXUS_CODEX_MODELS": "gpt-5.4,gpt-5.4-mini,gpt-5.3-codex,gpt-5.2-codex,gpt-5.2,gpt-5.1-codex-max,gpt-5.1-codex-mini",
        "NEXUS_OPENCODE_MODEL": "ollama-cloud/kimi-k2.5",
        "NEXUS_OPENCODE_MODELS": "ollama-cloud/glm-5,ollama-cloud/kimi-k2.5,ollama-cloud/qwen3-coder-next,ollama-cloud/minimax-m2.5,ollama/gemini-3-flash-preview"
      }
    }
  }
}

Cursor (.cursor/mcp.json in your project or ~/.cursor/mcp.json globally):

{
  "mcpServers": {
    "nexus-mcp": {
      "command": "uvx",
      "args": ["nexus-mcp"],
      "env": {
        "NEXUS_GEMINI_MODEL": "gemini-3-flash-preview",
        "NEXUS_GEMINI_MODELS": "gemini-3.1-pro-preview,gemini-3-flash-preview,gemini-2.5-pro,gemini-2.5-flash,gemini-2.5-flash-lite",
        "NEXUS_CODEX_MODEL": "gpt-5.2",
        "NEXUS_CODEX_MODELS": "gpt-5.4,gpt-5.4-mini,gpt-5.3-codex,gpt-5.2-codex,gpt-5.2,gpt-5.1-codex-max,gpt-5.1-codex-mini",
        "NEXUS_OPENCODE_MODEL": "ollama-cloud/kimi-k2.5",
        "NEXUS_OPENCODE_MODEL

Tools (1)

batch_promptExecutes prompts across multiple AI agents in parallel with automatic retries.

Environment Variables

NEXUS_GEMINI_MODELDefault Gemini model to use
NEXUS_CODEX_MODELDefault Codex model to use
NEXUS_OPENCODE_MODELDefault OpenCode model to use

Configuration

claude_desktop_config.json
{"mcpServers": {"nexus-mcp": {"command": "uvx", "args": ["nexus-mcp"], "env": {"NEXUS_GEMINI_MODEL": "gemini-3-flash-preview", "NEXUS_CODEX_MODEL": "gpt-5.2", "NEXUS_OPENCODE_MODEL": "ollama-cloud/kimi-k2.5"}}}}

Try it

Research the latest developments in quantum computing by querying Gemini and Claude Code in parallel and summarize the findings.
Perform a security review of the current directory using the Codex agent and report any vulnerabilities.
Compare the output of Gemini and OpenCode for the same coding task to determine which provides a more efficient solution.
Generate documentation for the project files using multiple agents to ensure comprehensive coverage.

Frequently Asked Questions

What are the key features of Nexus MCP?

Parallel execution of AI agent tasks using asyncio.gather. Automatic retries with exponential backoff and jitter for transient errors. JSON-first response parsing with brace-depth fallback. Configurable execution modes including safe and yolo (auto-approve). Client-visible logging for runner events like retries and output truncation.

What can I use Nexus MCP for?

Research and summarization by fanning out topics to multiple agents for diverse perspectives. Code review by sending different files or review angles to separate agents simultaneously. Multi-model comparison to evaluate output quality and consistency side-by-side. Bulk content generation for test cases, translations, or documentation. Second-opinion workflows to reduce single-model bias before making decisions.

How do I install Nexus MCP?

Install Nexus MCP by running: uvx nexus-mcp

What MCP clients work with Nexus MCP?

Nexus MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Nexus MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare