Nexus MCP
by RAUNAK-RAJ19
README.md
::: {align="center"}
# π Nexus MCP
### A Modular Model Context Protocol Server for Developer Tools & Data Science
[](https://www.python.org/)
[](https://modelcontextprotocol.io/)
[](LICENSE)
[](#testing)
[](#roadmap)
**One MCP server. Multiple practical capabilities.**
Nexus MCP brings together secure workspace operations, Git insights,
system information, public text retrieval, and data-science workflows in
a modular Python project designed to be extended and connected to
MCP-compatible AI clients.
:::
------------------------------------------------------------------------
## π Overview
Nexus MCP is a modular Python implementation of the **Model Context
Protocol (MCP)**. It exposes developer utilities and data-science
operations as tools, resources, and prompts so an MCP-compatible client
can interact with a project workspace and supported workflows.
The project focuses on:
- **Modularity** --- separate tool modules and service-layer logic.
- **Practical developer workflows** --- workspace, Git, and system
utilities.
- **Data science support** --- CSV profiling, EDA, correlations,
outlier detection, and cleaning previews.
- **Safer defaults** --- workspace sandboxing, opt-in write/fetch
capabilities, and read-only Git tools.
- **Testability** --- service and security tests.
> Nexus MCP is an actively developed portfolio project. Review the
> security notes before exposing it to untrusted users or networks.
## β¨ Features
-----------------------------------------------------------------------
Module Capabilities
----------------------------------- -----------------------------------
π Workspace List files, read files, search
workspace content, optionally write
files
π₯οΈ System System information and workspace
summary
πΏ Git Repository status, recent commits,
and diffs
π Data Science CSV profile, numeric summary,
automated EDA, correlation
analysis, outlier detection,
cleaning preview
π Web Fetch public text over HTTPS when
explicitly enabled
π§© MCP Tools, resources, and reusable
prompts
-----------------------------------------------------------------------
### Data Science toolkit
-----------------------------------------------------------------------
Tool What it does
----------------------------------- -----------------------------------
`csv_profile` Reports dataset dimensions, column
types, missing values, uniqueness,
and sample rows
`csv_numeric_summary` Summarizes numeric columns with
descriptive statistics
`automated_eda` Combines dataset profiling with
numeric/categorical summaries and
quality recommendations
`correlation_analysis` Calculates Pearson, Spearman, or
Kendall correlations for numeric
columns
`detect_dataset_outliers` Flags potential outliers using IQR
or Z-score methods
`clean_dataset` Previews missing-value handling and
duplicate removal without
overwriting the original CSV
-----------------------------------------------------------------------
**Cleaning strategies:** `none`, `drop_rows`, `median`, `mean`, and
`mode`.
**Outlier methods:** `IQR` and `Z-score`.
The cleaning workflow returns a preview and summary; it does not
silently replace the source dataset.
## ποΈ Architecture
``` mermaid
flowchart TB
Client["MCP Client<br/>(Inspector / compatible AI app)"]
Server["Nexus MCP Server"]
Registry["Tool / Resource / Prompt Registration"]
Client <-->|"MCP over stdio"| Server
Server --> Registry
Registry --> FS["Workspace Tools"]
Registry --> SYS["System Tools"]
Registry --> GIT["Git Tools"]
Registry --> DS["Data Science Tools"]
Registry --> WEB["Public Text Fetch Tool"]
Registry --> RES["MCP Resources"]
Registry --> PROMPT["MCP Prompts"]
DS --> SERVICES["Data Science Service Layer"]
SERVICES --> IO["CSV I/O"]
SERVICES --> PROFILE["Profiling"]
SERVICES --> CORR["Correlation"]
SERVICES --> OUT["Outlier Detection"]
SERVICES --> CLEAN["Cleaning"]
```
### Data science request flow
``` mermaid
flowchart LR
A["CSV in workspace"] --> B["Validate workspace path"]
B --> C["Load dataset"]
C --> D["Run selected analysis"]
D --> E["Return structured result"]
E --> F["Client displays insights"]
```
## π§° Technology Stack
- **Language:** Python
- **Protocol:** Model Context Protocol (MCP)
- **Data processing:** pandas, NumPy
- **Validation/configuration:** Pydantic, pydantic-settings
- **HTTP client:** httpx
- **Testing:** pytest
- **Code quality:** Ruff and mypy configuration
- **Packaging:** `pyproject.toml`
## π Project Structure
``` text
nexus-mcp/
βββ src/
β βββ nexus_mcp/
β βββ server.py
β βββ logging_config.py
β βββ prompts.py
β βββ resources.py
β βββ security.py
β βββ tools/
β β βββ filesystem.py
β β βββ system.py
β β βββ git.py
β β βββ data_science.py
β β βββ web.py
β βββ services/
β βββ data_science/
β βββ io.py
β βββ profiling.py
β βββ correlation.py
β βββ outliers.py
β βββ cleaning.py
βββ tests/
βββ examples/
βββ workspace/
βββ .github/workflows/
βββ Dockerfile
βββ pyproject.toml
βββ uv.lock
βββ README.md
```
## βοΈ Installation
### 1. Clone the repository
``` bash
git clone https://github.com/RAUNAK-RAJ19/Basic-mcp-server.git
cd Basic-mcp-server
```
### 2. Create and activate a virtual environment
**Windows PowerShell**
``` powershell
python -m venv .venv
.\.venv\Scripts\Activate.ps1
```
**macOS / Linux**
``` bash
python -m venv .venv
source .venv/bin/activate
```
### 3. Install the project
Install the project with development and data-science dependencies:
``` bash
python -m pip install --upgrade pip
pip install -e ".[dev,data]"
```
If you use `uv`, you can install from the lockfile:
``` bash
uv sync --all-extras
```
## βΆοΈ Run the server
Start the MCP server:
``` bash
mcp run src/nexus_mcp/server.py
```
If your project entry point is configured through the root `server.py`,
you can also run:
``` bash
mcp dev server.py
```
The development command opens **MCP Inspector**, allowing you to connect
to the server and inspect its tools, resources, and prompts.
> Run the command that matches the entry point in your local checkout.
> The Inspector development command is intended for local development
> and testing.
## π§ͺ Example workflow
Place a CSV file inside the `workspace/` directory. For example, use
`examples/sample.csv` and copy it into the workspace:
``` powershell
Copy-Item examples/sample.csv workspace/sample.csv
```
Then call the tools from MCP Inspector or your connected MCP client:
1. `workspace_list` --- confirm that `sample.csv` is available.
2. `csv_profile` --- inspect dimensions, data types, and missing
values.
3. `automated_eda` --- get a broader exploratory summary.
4. `correlation_analysis` --- inspect relationships between numeric
columns.
5. `detect_dataset_outliers` --- flag potential outliers.
6. `clean_dataset` --- preview a cleaning strategy such as median
imputation.
Example dataset:
``` csv
name,age,score
Asha,21,88
Ravi,22,91
Mina,,84
Dev,20,91
```
For this sample, median imputation fills Mina's missing age with **21**.
The original CSV is not overwritten by the cleaning preview.
## π Security model
Nexus MCP uses safer defaults for local development:
-----------------------------------------------------------------------
Control Default / behavior
----------------------------------- -----------------------------------
Workspace boundary File operations are restricted to
the configured workspace
File writes Disabled unless explicitly enabled
HTTP fetch Disabled unless explicitly enabled
Web requests HTTPS-only; private-address targets
are rejected; redirects are
disabled
Git operations Read-only commands, without shell
execution
Command execution No general-purpose arbitrary
terminal command tool
-----------------------------------------------------------------------
### Optional environment settings
Create a local `.env` file only if you need to change these settings.
Never commit secrets or local environment files.
``` env
NEXUS_ALLOW_FILE_WRITES=false
NEXUS_ALLOW_HTTP_FETCH=false
```
To enable a capability for a trusted local workflow, set its value to
`true` and restart the server. Understand the risks before enabling it.
**Security disclaimer:** These controls are not a substitute for a
security audit. Do not expose the server to untrusted users or public
networks without additional authentication, authorization, isolation,
and deployment hardening.
## π§ͺ Testing
Run the test suite from the project root:
``` bash
pytest -q
```
Run with coverage:
``` bash
pytest --cov=nexus_mcp --cov-report=term-missing
```
The project test suite covers data-science services, security behavior,
and tool functionality.
## π MCP capabilities
The current implementation registers **16 tools**, **2 resources**, and
**2 prompts**.
```{=html}
<details>
```
```{=html}
<summary>
```
`<strong>`{=html}View the tool inventory`</strong>`{=html}
```{=html}
</summary>
```
-----------------------------------------------------------------------
Category Tools
----------------------------------- -----------------------------------
Workspace `workspace_list`,
`workspace_read_file`,
`workspace_write_file`,
`workspace_search`
System `system_information`,
`workspace_summary`
Git `git_status`, `git_recent_commits`,
`git_diff`
Data Science `csv_profile`,
`csv_numeric_summary`,
`automated_eda`,
`correlation_analysis`,
`detect_dataset_outliers`,
`clean_dataset`
Web `fetch_public_text`
-----------------------------------------------------------------------
**Resources** - `nexus://server/info` - `nexus://workspace/guide`
**Prompts** - `code_review` - `dataset_analysis`
```{=html}
</details>
```
## πΊοΈ Roadmap
- [x] Modular MCP server structure
- [x] Workspace and system tools
- [x] Read-only Git integration
- [x] CSV profiling and automated EDA
- [x] Correlation and outlier analysis
- [x] Safe cleaning preview
- [x] Security and service tests
- [ ] Machine-learning training and evaluation tools
- [ ] Model persistence and prediction workflows
- [ ] Expanded integration examples
- [ ] Additional deployment and observability options
## π€ Contributing
Contributions, bug reports, and feature suggestions are welcome.
1. Fork the repository.
2. Create a feature branch.
3. Add or update tests.
4. Run `pytest -q`.
5. Open a pull request describing the change.
## π¨βπ» Author
**Raunak Raj**
- GitHub: [@RAUNAK-RAJ19](https://github.com/RAUNAK-RAJ19)
If you find this project useful, consider giving the repository a β.
------------------------------------------------------------------------
::: {align="center"}
**Built to make practical AI-agent workflows easier to compose.**
:::
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues