Nexus
Nexus is an autonomous CLI coding agent powered by LangGraph and MCP. It plans complex tasks, persists context via SQLite, and securely orchestrates tools. Features specialized Architect/Code modes, real-time metrics, and human-in-the-loop safety for production workflows.
claude mcp add --transport stdio datarohit-nexus python -m nexus \ --env DATABASE_URL="sqlite:///nexus.db" \ --env OPENAI_API_KEY="your-openai-api-key" \ --env NEXUS_CONFIG_PATH=".nexus/mcp_config.json"
How to use
Nexus is an autonomous AI coding agent that integrates with the Model Context Protocol (MCP) to dynamically load and manage MCP servers for extended capabilities. It operates in multiple modes (CODE, ARCHITECT, ASK) to support different workflows: CODE for direct code manipulation and execution, ARCHITECT for planning and architectural tasks with restricted access, and ASK for research and information gathering. Nexus uses LangGraph and LangChain to coordinate tool usage, plan tasks, and maintain a persistent context across sessions. When connected to MCP servers, Nexus can discover available tooling, inject tool descriptions into prompts, and orchestrate multi-server capabilities to accelerate development tasks. To start, ensure the required Python environment is active, and the Nexus MCP server is configured to load its MCP servers from the .nexus/mcp_config.json file. Nexus will then automatically load tools from connected MCP servers and make them available in its toolbox for execution within the active task context.
How to install
Prerequisites:
- Python 3.11+ (recommended 3.11–3.12 for compatibility with LangChain/LangGraph)
- Git
- Access to OpenAI or other LLM providers as configured
Installation steps:
-
Clone the repository: git clone https://github.com/DataRohit/Nexus.git cd Nexus
-
Create and activate a Python virtual environment:
- On Unix or macOS: python3 -m venv venv source venv/bin/activate
- On Windows: python -m venv venv .\venv\Scripts\activate
-
Install dependencies: pip install -r requirements.txt
If a specific MCP-related dependency is listed, install it as well
e.g., pip install mcp-python
-
Configure environment variables and MCP config:
- Copy or create the MCP config at .nexus/mcp_config.json as needed (see mcp_config example below).
- Set your OpenAI API key or other LLM provider credentials in the environment or config file.
-
Run the Nexus server: python -m nexus
Or if using a specific entrypoint/module, adjust accordingly
-
Verify the server is running and MCP servers are loaded. Access the CLI or UI as documented in the repository to interact with Nexus.
Additional notes
Tips and common issues:
- Ensure Python virtual environment is active before starting Nexus to avoid dependency conflicts.
- The MCP configuration file (.nexus/mcp_config.json) must exist and be valid JSON to allow dynamic server loading. Use the MCP schema described in the repository docs.
- If MCP servers fail to load, check environment variables (OPENAI_API_KEY, DATABASE_URL) and ensure network access to external services.
- If using multiple MCP servers, you can define several entries under mcp_config.mcpServers and Nexus will manage them concurrently.
- For production deployments, consider persisting metrics in a dedicated database and securing API keys with a secrets manager.
Related MCP Servers
langchain -adapters
LangChain 🔌 MCP
fullstack-langgraph-nextjs-agent
Production-ready Next.js template for building AI agents with LangGraph.js. Features MCP integration for dynamic tool loading, human-in-the-loop tool approval, persistent conversation memory with PostgreSQL, and real-time streaming responses. Built with TypeScript, React, Prisma, and Tailwind CSS.
lc2mcp
Convert LangChain tools to FastMCP tools
MCP-MultiServer-Interoperable-Agent2Agent-LangGraph-AI-System
This project demonstrates a decoupled real-time agent architecture that connects LangGraph agents to remote tools served by custom MCP (Modular Command Protocol) servers. The architecture enables a flexible and scalable multi-agent system where each tool can be hosted independently (via SSE or STDIO), offering modularity and cloud-deployable execut
django-firebase
A production-ready Django app implementing Firebase Model Context Protocol (MCP) server with 14 Firebase tools for AI agents. Features standalone agent, HTTP/stdio transport, LangChain integration, and complete Firebase service coverage (Auth, Firestore, Storage).
mcp-agent-tool-adapter
Transforms MCP tools into collaborative, reasoning agents using modern agent frameworks.