Learn how to use Climate Data Store MCP Server for accessing CDS catalog data with Python API integration
The CDS MCP Server provides a standardized interface for machine learning models and AI applications to interact with and retrieve data from the Climate Data Store (CDS). By using Model Context Protocol (MCP), this server enables seamless integration with diverse AI tools, enhancing their capabilities in handling complex environmental datasets. This document outlines how developers can install, configure, and utilize the CDS MCP Server.
The core features of the CDS MCP Server include:
Job Management:
get_jobs
: Fetches a list of available jobs with optional status filtering.download_job_result
: Downloads data results using a job ID.get_all_collections
: Lists all collections in the CDS catalogue.get_collection_by_id
: Retrieves detailed information about a specific collection.Environment Variable Support:
Environment variables are configured using a .env
file, ensuring secure and efficient operation of the server. Developers can specify API keys, URLs, and other necessary metadata through environment variables to facilitate seamless connectivity with CDS.
The architecture leverages Model Context Protocol (MCP) for universal client-server communication. This protocol ensures compatibility across various AI applications and environments by providing a standardized framework. The underlying API is datapi
, which supports robust retrieval of data from the CDS catalogue. The implementation involves setting up an MCP server that hosts methods to interact with these APIs, ensuring secure and efficient access to climate data.
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
graph TD
A[CDS Catalogue] -->|Query Requests| B[MCP Server]
B --> C[Job Collection] | API Calls |
C --> D[Data Results] | Downloaded Data |
D --> E[AI Applications] | Analysis & Processing |
style A fill:#b3e5fc
style C fill:#f3e5f5
style D fill:#f0f8ff
style E fill:#c6efce
To set up and run the CDS MCP Server, follow these steps:
Clone the Repository:
git clone [email protected]:albertdow/mcp-datapi.git
cd mcp-datapi
Install Dependencies:
uv add "mcp[cli]" datapi python-dotenv
Setup CDS API Key:
Create a .env
file and add the following environment variables:
DATAPI_URL=<DATAPI_URL>
DATAPI_KEY=<DATAPI_KEY>
Test Locally: Run the server using MCP Inspector in development mode:
mcp dev datapi_server.py
Integrate with Claude Desktop (Optional):
Add a configuration to your claude_desktop_config.json
file:
{
"mcpServers": {
"DatapiServer": {
"command": "/Users/username/.local/bin/uv",
"args": [
"--directory",
"mcp-datapi",
"run",
"datapi_server.py"
],
"env": {
"DATAPI_URL": "<DATAPI_URL>",
"DATAPI_KEY": "<DATAPI_KEY>"
}
}
}
}
{
"mcpServers": {
"DatapiServer": {
"command": "/Users/username/.local/bin/uv",
"args": [
"--directory",
"mcp-datapi",
"run",
"datapi_server.py"
],
"env": {
"DATAPI_URL": "https://cds.climate.copernicus.eu/api/",
"DATAPI_KEY": "your-api-key"
}
}
}
}
The CDS MCP Server supports a wide range of clients within the AI ecosystem:
This cross-compatibility ensures broad applicability for diverse AI tools and development workflows.
MCP Client | Resources | Tools | Prompts |
---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ |
Continue | ✅ | ✅ | ✅ |
Cursor | ❌ | ✅ | ❌ |
For advanced users, the following environment variables can be configured:
DATAPI_KEY=your-secure-api-key
MCP_SERVER_PORT=8081
Ensure secure storage and transmission of sensitive data to maintain server integrity.
The CDS MCP Server supports Python 3.13 or higher.
.env
file correctly?Create a .env
file and add these variables:
DATAPI_URL=https://cds.climate.copernicus.eu/api/
DATAPI_KEY=your-api-key
Yes, the CDS MCP Server is compatible with various MCP clients including Claude Desktop and Continue.
You need to create a CDS API Key from the official CDS portal to authenticate your requests.
Check logs for error messages, typically found in datapi_server.log
within the project directory.
To contribute to the development of this repository:
requirements.txt
.For further details about Model Context Protocol and related resources, visit the following links:
This comprehensive document provides a detailed guide for integrating the CDS MCP Server into AI workflows, emphasizing its compatibility and utility in various technological contexts.
Next-generation MCP server enhances documentation analysis with AI-powered neural processing and multi-language support
Learn to connect to MCP servers over HTTP with Python SDK using SSE for efficient protocol communication
Python MCP client for testing servers avoid message limits and customize with API key
Discover easy deployment and management of MCP servers with Glutamate platform for Windows Linux Mac
Explore community contributions to MCP including clients, servers, and projects for seamless integration
Learn how to use MCProto Ruby gem to create and chain MCP servers for custom solutions