netcdf-mcp
# NetCDF MCP Server
An MCP server that reads and understands NetCDF files, designed to give coding agents context about scientific data files.
## Installation
```bash
uv pip install -e .
```
## Usage
### With Cursor/Claude
Add to your MCP configuration file (`~/.cursor/mcp.json`):
```json
{
"mcpServers": {
"netcdf-mcp": {
"command": "/path/to/uv",
"args": ["run", "--directory", "/path/to/netcdf-mcp", "netcdf-mcp"]
}
}
}
```
Replace `/path/to/uv` with your `uv` binary location (e.g., `/opt/homebrew/bin/uv`) and `/path/to/netcdf-mcp` with where you cloned this repository.
### Standalone
```bash
netcdf-mcp
```
## Tools
| Tool | Description |
|------|-------------|
| `get_file_structure` | Get dimensions, coordinates, variables, and attributes |
| `list_variables` | List all data variables with shapes and units |
| `get_global_attributes` | Get file-level metadata |
| `get_variable_info` | Detailed info about a specific variable |
| `get_variable_stats` | Statistical summary (min, max, mean, percentiles) |
| `get_variable_sample` | Extract sample values for inspection |
| `get_dimension_values` | Get coordinate values (time, lat, lon) |
| `check_data_quality` | Check for NaN, outliers, and suspicious patterns |
| `compare_variables` | Compare two variables for compatibility and correlation |
| `get_time_range` | Get temporal extent in human-readable format |
| `get_spatial_bounds` | Get geographic extent (lat/lon bounds) |
| `check_cf_compliance` | Verify CF conventions compliance |
| `explain_variable` | Human-readable explanation of a variable |
TDQS
Scored across 13 tools
Most tools have clearly distinct inspection purposes, but get_variable_stats and check_data_quality overlap in their statistical/quality reporting, and get_file_structure subsumes list_variables and get_global_attributes. Overall, descriptions are clear enough to guide correct selection.
All tool names follow a consistent snake_case verb_noun pattern, using get_, list_, check_, compare_, and explain_ appropriately by action. There are no mixed naming conventions or unpredictable style shifts.
Thirteen tools is well within the ideal range for a focused NetCDF inspection server. Each tool covers a distinct aspect of file exploration without feeling redundant or bloated.
The server provides comprehensive read-only coverage for NetCDF files: structure, variables, attributes, dimensions, spatial/time bounds, statistics, samples, quality checks, comparisons, and CF compliance. There are no obvious dead ends for typical inspection workflows.