An Agentic AI Workspace Powered by the Model Context Protocol
An AI-powered workspace for understanding software projects through Filesystem, Git, and RAG-powered Knowledge MCP servers.
π Live Demo: mcp-nexus-ai.streamlit.app Β β’Β GitHub Repository
MCP Nexus is an agentic AI workspace for understanding and analyzing software projects using the Model Context Protocol (MCP).
Instead of relying on a single tool or a fixed retrieval pipeline, MCP Nexus combines three specialized MCP servers under a LangGraph-based agent:
- Filesystem MCP β explores and searches project files
- Git MCP β analyzes commits, diffs, and file history
- Knowledge MCP β performs semantic retrieval over project documentation
The agent receives a natural-language question, decides which tools are required, executes those tools, and generates a response grounded in the returned information.
MCP Nexus can analyze the current project, inspect another local repository, or clone and analyze a public GitHub repository.
Example questions:
What does this project do?
What changed in the last commit?
How does this function handle errors?
How does the Knowledge server retrieve information?
Which files are responsible for Git operations?
Show me the recent commits in this repository.
π€ Agentic Project Analysis
- LangGraph-based agent orchestration with dynamic MCP tool selection
- Multi-tool reasoning across sources
π Codebase Intelligence
- Browse, read, and search project source code
- Understand structure and implementation details
πΏ Git Intelligence
- Inspect recent commits, diffs, and file-level history
- Safely handle invalid Git references
π§ RAG Knowledge Retrieval
- Ingest
.md/.txtdocs, chunk, embed, and store with FAISS - Retrieve semantically relevant documentation, rejecting low-confidence results
π GitHub Repository Support
- Clone and analyze any public GitHub repository
- Run the same agent workflow against a cloned repo
π― Grounded Responses
- Answers are based on actual tool outputs, not invented information
ββββββββββββββββββββββββ
β User β
ββββββββββββ¬ββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β Streamlit UI β
ββββββββββββ¬ββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β LangGraph Agent β
β gpt-oss-120b β
β via Groq β
ββββββββββββ¬ββββββββββββ
β
MCP Protocol
β
βββββββββββββββββββββββΌββββββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Filesystem β β Git β β Knowledge β
β MCP β β MCP β β MCP β
ββββββββ¬βββββββ ββββββββ¬βββββββ ββββββββ¬βββββββ
β β β
βΌ βΌ βΌ
Project Files Git History FAISS + Docs
Request flow:
- The user asks a natural-language question in the Streamlit UI
- The LangGraph agent decides which MCP tool(s) to call and executes them
- The agent grounds its answer in the returned tool output before responding
The agent can combine multiple servers when a question needs more than one source.
| Category | Technology | Purpose |
|---|---|---|
| Language | Python 3.12 | Application development |
| Tool Protocol | FastMCP | MCP server and tool interface |
| Agent Orchestration | LangGraph | Agent state and tool-calling workflow |
| LLM Framework | LangChain | LLM and tool integration |
| LLM Inference | Groq | Fast inference with gpt-oss-120b |
| Embeddings | Sentence Transformers | Local document embeddings |
| Embedding Model | all-MiniLM-L6-v2 | Text representation for semantic search |
| Vector Store | FAISS | Persistent vector similarity search |
| Git Operations | GitPython | Repository and Git analysis |
| UI | Streamlit | Interactive web interface |
| Containerization | Docker | Reproducible deployment |
| Package Management | uv | Python dependency management |
MCP Nexus uses three specialized MCP servers.
Provides controlled access to project files.
| Tool | Purpose |
|---|---|
list_files |
Explore repository structure |
read_file |
Read project files |
search_files |
Search for content across files |
Security controls include path validation, sensitive-file blocking, and repository sandboxing.
Provides Git repository intelligence.
| Tool | Purpose |
|---|---|
get_recent_commits |
Inspect recent commits |
get_diff |
Analyze repository changes |
get_file_history |
Inspect file-level Git history |
Inputs are validated and bounded to prevent unsafe repository operations.
Provides RAG-based documentation retrieval.
| Tool | Purpose |
|---|---|
ingest_docs |
Chunk and index project documentation |
query_knowledge |
Retrieve relevant documentation |
Retrieval pipeline:
Documents β Chunking β Sentence Transformers β Embeddings β FAISS Index β Similarity Search β Relevant Context
The current retrieval threshold is 0.35. Results below this threshold are discarded rather than being treated as reliable evidence.
Prerequisites: Python 3.12 Β· Git Β· uv Β· Groq API key
1. Clone the repository
git clone https://github.com/21f3001527/mcp-nexus.git
cd mcp-nexus2. Install dependencies
uv sync3. Configure environment variables
Create a .env file:
GROQ_API_KEY=your_groq_api_key
4. Start the application
uv run streamlit run app.pyThe application will be available at http://localhost:8501.
Run the MCP Nexus agent directly from the terminal:
uv run python main.py "What does this project do?"
uv run python main.py "Show me the structure of the agent folder"
uv run python main.py "What changed in the last commit?"To analyze a different local repository:
uv run python main.py "Explain this project" --repo /path/to/projectTest the agent against any public GitHub repository:
uv run python test_clone_agent.py https://github.com/octocat/Hello-World "List the files in this repository"Build the image
docker build -t mcp-nexus .Run the container
docker run --env-file .env -p 8502:8501 mcp-nexusOpen http://localhost:8502 β the application listens on port 8501 inside the container, mapped to port 8502 on the host.
The Docker image includes: Python 3.12, MCP dependencies, LangGraph/LangChain, Sentence Transformers, FAISS, GitPython, Streamlit, and the application source code.
The .dockerignore file excludes development-only files such as virtual environments, Git metadata, caches, and generated evaluation results.
MCP Nexus includes two levels of automated testing, run from the command line β evaluation is a development/testing component, not part of the deployed Streamlit UI.
Verifies that the individual MCP servers behave correctly.
uv run pytest tests/ -vCurrent result: 21/21 tests passing
Tests whether the agent uses the available MCP tools correctly β tool selection, filesystem reasoning, Git reasoning, knowledge retrieval, multi-tool workflows, grounding, security boundaries, and unsupported requests.
uv run python evaluation/run_tests.pyCurrent evaluation: 26 scenarios Β· 24 passed Β· 2 failed Β· 92.31% overall
The 2 failures occur because the agent correctly refuses a sensitive-file request before calling the tool the test expected β no data is exposed, but the strict test criteria still marks it as a failure.
Resumable evaluation β progress is saved during execution, allowing runs to resume after interruptions such as API rate limits or timeouts.
Results are written to evaluation/results/latest.json and evaluation/results/summary.json.
| Safeguard | Description |
|---|---|
| Path Security | Filesystem operations resolve requested paths against the configured project directory and reject paths that escape the allowed workspace |
| Sensitive File Protection | Files such as .env, .pem, and id_rsa are blocked from being exposed through filesystem tools |
| Repository Filtering | The filesystem server ignores .git, .venv, __pycache__, and node_modules |
| Git Input Validation | Git operations use bounded inputs and handle invalid references safely |
| Grounded Responses | The agent is instructed to base responses on actual tool outputs rather than inventing repository information |
| Retrieval Confidence | The Knowledge server applies a similarity threshold before returning retrieved documentation |
mcp-nexus/
βββ agent/ # LangGraph orchestrator, MCP client, repo utilities
βββ servers/ # Filesystem, Git, and Knowledge MCP servers
βββ tests/ # MCP server test suite
βββ evaluation/ # Agent evaluation runner, scenarios, results
βββ data/ # Ingested docs + generated FAISS index (git-ignored)
βββ assets/ # README screenshots and demo GIF
βββ app.py # Streamlit app (primary entry point)
βββ main.py # CLI for debugging the agent
βββ test_clone_agent.py # CLI for testing the clone β agent pipeline
βββ Dockerfile
βββ pyproject.toml
βββ LICENSE
βββ README.md
- The 0.35 retrieval threshold is heuristic and hasn't been validated at scale
- Agent tool-calling reliability depends on the selected LLM
- Evaluation is CLI-based, not yet integrated into the Streamlit UI
Rajeev Kumar
B.S. Data Science and Applications β IIT Madras
This project is licensed under the MIT License.


