netcdf-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@netcdf-mcp What variables are in my NetCDF file?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
NetCDF MCP Server
An MCP server that reads and understands NetCDF files, designed to give coding agents context about scientific data files.
Installation
uv pip install -e .Related MCP server: era5-mcp-server
Usage
With Cursor/Claude
Add to your MCP configuration file (~/.cursor/mcp.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
netcdf-mcpTools
Tool | Description |
| Get dimensions, coordinates, variables, and attributes |
| List all data variables with shapes and units |
| Get file-level metadata |
| Detailed info about a specific variable |
| Statistical summary (min, max, mean, percentiles) |
| Extract sample values for inspection |
| Get coordinate values (time, lat, lon) |
| Check for NaN, outliers, and suspicious patterns |
| Compare two variables for compatibility and correlation |
| Get temporal extent in human-readable format |
| Get geographic extent (lat/lon bounds) |
| Verify CF conventions compliance |
| Human-readable explanation of a variable |
Available Tools
13 toolscheck_cf_complianceB
Check if a NetCDF file follows CF (Climate and Forecast) conventions.
Performs basic checks for common CF requirements.
Args: file_path: Path to the NetCDF file.
Returns: JSON string with compliance report.
Inputs: file_path (required). Returns: result
check_data_qualityB
Check a variable for data quality issues: NaN/missing values, outliers, suspicious patterns.
Args: file_path: Path to the NetCDF file. variable_name: Name of the variable to check.
Returns: JSON string with data quality report.
Inputs: file_path (required), variable_name (required). Returns: result
compare_variablesB
Compare two variables for shape compatibility, range differences, and correlation.
Args: file_path: Path to the NetCDF file. variable1: Name of the first variable. variable2: Name of the second variable.
Returns: JSON string with comparison results.
Inputs: file_path (required), variable1 (required), variable2 (required). Returns: result
explain_variableA
Generate a human-readable explanation of what a variable represents.
Uses standard_name, long_name, units, and other attributes.
Args: file_path: Path to the NetCDF file. variable_name: Name of the variable to explain.
Returns: JSON string with human-readable explanation.
Inputs: file_path (required), variable_name (required). Returns: result
get_dimension_valuesA
Get values along a dimension (e.g., time steps, lat/lon coordinates).
Args: file_path: Path to the NetCDF file. dimension_name: Name of the dimension/coordinate to get values for. max_values: Maximum number of values to return (default: 100).
Returns: JSON string with dimension values.
Inputs: file_path (required), dimension_name (required), max_values. Returns: result
get_file_structureA
Get the complete structure of a NetCDF file.
Returns dimensions, coordinates, data variables, and global attributes.
Args: file_path: Path to the NetCDF file.
Returns: JSON string containing the file structure.
Inputs: file_path (required). Returns: result
get_global_attributesA
Get all global attributes (metadata) from a NetCDF file.
Returns title, institution, history, conventions, and other file-level metadata.
Args: file_path: Path to the NetCDF file.
Returns: JSON string with all global attributes.
Inputs: file_path (required). Returns: result
get_spatial_boundsA
Get the geographic extent (lat/lon bounds) of a NetCDF file.
Args: file_path: Path to the NetCDF file.
Returns: JSON string with spatial bounds.
Inputs: file_path (required). Returns: result
get_time_rangeA
Get the time range of a NetCDF file in human-readable format.
Handles CF-compliant time coordinates with various calendars.
Args: file_path: Path to the NetCDF file.
Returns: JSON string with time range information.
Inputs: file_path (required). Returns: result
get_variable_infoA
Get detailed information about a specific variable in a NetCDF file.
Returns dtype, shape, dimensions, all attributes, and fill value.
Args: file_path: Path to the NetCDF file. variable_name: Name of the variable to inspect.
Returns: JSON string with detailed variable information.
Inputs: file_path (required), variable_name (required). Returns: result
get_variable_sampleA
Extract a sample of actual data values from a variable for inspection.
Args: file_path: Path to the NetCDF file. variable_name: Name of the variable to sample. max_samples: Maximum number of samples to return (default: 100).
Returns: JSON string with sample values and their indices.
Inputs: file_path (required), variable_name (required), max_samples. Returns: result
get_variable_statsA
Get statistical summary of a variable: min, max, mean, std, NaN count, percentiles.
Args: file_path: Path to the NetCDF file. variable_name: Name of the variable to analyze.
Returns: JSON string with statistical summary.
Inputs: file_path (required), variable_name (required). Returns: result
list_variablesA
List all data variables in a NetCDF file with their shapes, dtypes, and units.
Args: file_path: Path to the NetCDF file.
Returns: JSON string with variable names, shapes, dtypes, and units.
Inputs: file_path (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
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.
Related MCP Connectors
Read Physical AI datasets, projects, fleet and quality data. Requires authorized Avala access.
NOAA NCEI MCP — the national climate archive, via the keyless Access services
Build and run data workflows, analyses, reports and dashboards. Inspect and verify every step.
Read, query and check data against ODI standards hub ontologies (OWL, LinkML), and report gaps.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables exploration and analysis of NetCDF scientific data files through intuitive APIs. Supports file discovery, metadata inspection, data extraction with slicing, smart sampling for large datasets, and time series analysis.MIT
- AlicenseNot gradedqualityDmaintenanceEnables natural language access to ERA5 climate data from the Copernicus Climate Data Store. Supports downloading monthly means and inspecting NetCDF files.12MIT
- AlicenseNot gradedqualityDmaintenanceEnables scientific data introspection and visualization of VTK datasets with format-adaptive metadata extraction and interactive 3D visualization through MCP tools.1MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to discover and inspect research datasets via a read-only MCP server, offering search, variable listing, and metadata retrieval without reading data files.-