A Model Context Protocol (MCP) interface for the Nipoppy neuroimaging dataset framework. This server exposes a simple tool through MCP, allowing AI agents to list files in directories.
Nipoppy is a lightweight framework for standardized organization and processing of neuroimaging-clinical datasets. It follows the Brain Imaging Data Structure (BIDS) standard and provides tools for managing datasets and processing pipelines.
The Model Context Protocol (MCP) is a standardized protocol that allows AI applications (LLMs) to access external tools and resources through a consistent interface. This server exposes a file listing tool as an MCP tool.
This MCP server provides the following tool:
list_files: List files in a given directory
- Python 3.8 or higher
# Clone the repository
git clone https://github.com/nipoppy/mcp.git
cd mcp
# Install dependencies
pip install -e .The server can be run in different modes depending on your use case:
# Set the dataset root (optional, defaults to current directory)
export NIPOPPY_DATASET_ROOT=/path/to/your/nipoppy/dataset
# Run the server
python -m nipoppy_mcp.server
```bash
# Run the server
python -m nipoppy_mcp.serverAdd to your Claude Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"nipoppy": {
"command": "python",
"args": ["-m", "nipoppy_mcp.server"]
}
}
}Once connected to an MCP-compatible client, you can use natural language to list files in directories:
Example queries:
- "List files in /path/to/directory"
- "What files are in my home directory?"
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytestmcp/
├── nipoppy_mcp/
│ ├── __init__.py
│ └── server.py # Main MCP server implementation
├── tests/ # Test files
├── pyproject.toml # Project configuration
└── README.md
Contributions are welcome! This is a Brainhack 2026 project. Please feel free to submit issues and pull requests.
MIT License - see LICENSE file for details.