Climatiq MCP Server

Climatiq MCP Server

MCP server providing AI assistants with real-time carbon emissions calculations via Climatiq API.

6
Stars
8
Forks
6
Watchers
4
Issues
Climatiq MCP Server implements the Model Context Protocol to bridge AI assistants with the Climatiq API for precise carbon emissions calculations. It exposes a set of tools for various emissions scenarios, including electricity use, travel, freight, and more. The server generates resource URIs for detailed emission reports and provides natural language explanations on climate impact. Configuration is streamlined via environment variables, CLI tools, or files, supporting easy integration with platforms like Claude Desktop.

Key Features

Model Context Protocol (MCP) server implementation
Integration with Climatiq API for emissions data
Multiple calculation tools covering diverse emission scenarios
Resource-centric URIs for structured emissions results
Natural language climate impact explanations
Configurable via environment variable, CLI, tool, or config file
Supports real-time emissions calculations
Comprehensive emission factor search and customization
Cloud computing and procurement emissions calculation
Easy setup for AI assistants (e.g., Claude Desktop)

Use Cases

Enabling AI assistants to provide carbon footprint calculations in real time
Integrating climate insights into conversational or enterprise AI applications
Configuring organizational tools to assess travel, cloud, or procurement emissions
Generating natural language reports on environmental impact
Assisting businesses in tracking and reducing their carbon footprint
Providing instant emissions data for user queries in chat assistants
Supporting sustainability reporting and compliance initiatives
Calculating environmental impact for diverse usage scenarios (travel, hotels, freight)
Enhancing AI workflows with direct access to up-to-date emissions factors
Automating climate impact explanations within AI-powered decision tools

README

Climatiq MCP Server

License: MIT

A Model Context Protocol (MCP) server for accessing the Climatiq API to calculate carbon emissions. This allows AI assistants to perform real-time carbon calculations and provide climate impact insights.

Demo

https://github.com/user-attachments/assets/c253d6d1-ccf6-4c14-965e-6023ba2a0296

https://github.com/user-attachments/assets/d61c1181-acf6-4d9f-9a48-537fc64ac4c3

Features

This MCP server integrates with the Climatiq API to provide carbon emission calculations for AI assistants:

Tools

  • set-api-key: Configure the Climatiq API key used for authentication
  • electricity-emission: Calculate carbon emissions from electricity consumption
  • travel-emission: Calculate carbon emissions from travel by car, plane, or train
  • search-emission-factors: Search for specific emission factors in the Climatiq database
  • custom-emission-calculation: Perform custom calculations using specific emission factors
  • cloud-computing-emission: Calculate emissions from cloud computing resources usage
  • freight-emission: Calculate emissions from freight transportation
  • procurement-emission: Calculate emissions from procurement spending
  • hotel-emission: Calculate emissions from hotel stays
  • travel-spend: Calculate emissions from travel expenses

Resources

  • Carbon calculation results are exposed as resources with a climatiq://calculation/{id} URI scheme
  • Each resource contains detailed information about an emission factor and calculation results

Prompts

  • climate-impact-explanation: Generate natural language explanations about the climate impact of specific emission calculations

Installation

From Source

This project uses uv for virtual environment and dependency management. Make sure to install uv first.

bash
# Clone the repository
git clone https://github.com/your-org/climatiq-mcp-server.git
cd climatiq-mcp-server

# Create a virtual environment
uv venv

# Activate the virtual environment
# On macOS/Linux:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate

# Install dependencies with development extras
uv sync --dev --extra all

Using uv

bash
uv pip install climatiq-mcp-server

API Key Configuration

The server requires a Climatiq API key to function. You have several options to provide it:

  1. Environment Variable: Set the CLIMATIQ_API_KEY environment variable before starting the server

    bash
    export CLIMATIQ_API_KEY=your_climatiq_api_key
    
  2. Configuration During Installation:

    bash
    CLIMATIQ_API_KEY=your_climatiq_api_key uv pip install climatiq-mcp-server
    
  3. set-api-key Tool: Use the set-api-key tool to configure it during runtime within the AI assistant

  4. Configuration File: Create a .env file in the project directory:

    CLIMATIQ_API_KEY=your_climatiq_api_key
    

To get a Climatiq API key:

  1. Sign up at app.climatiq.io
  2. Follow the instructions at Getting API Keys

Running the Server

The server can be started directly from the command line:

bash
climatiq-mcp-server

Setup in AI Assistants

Claude Desktop

On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

json
"mcpServers": {
  "climatiq-mcp-server": {
    "command": "climatiq-mcp-server",
    "env": {
      "CLIMATIQ_API_KEY": "your_climatiq_api_key"
    }
  }
}

Examples and Utilities

Examples Directory

The examples/ directory contains:

  • climatiq.ipynb: A Jupyter notebook demonstrating direct API usage with Climatiq
  • simple_test.py: A simple utility for testing the API integration directly without MCP protocol
bash
# Run the simple test
python examples/simple_test.py

Utility Scripts

The utils/ directory contains several helpful scripts:

Test Client

The test_client.py script tests all the tools, prompts, and resources:

bash
python utils/test_client.py

LLM Example Client

The llm_example_client.py script demonstrates how a Large Language Model (like Claude) could interact with the Climatiq MCP server:

bash
python utils/llm_example_client.py

Key features:

  • Complete API wrapper with error handling and timeout management
  • Resource and result caching to preserve calculation history
  • Example prompts showing how to generate natural language explanations
  • Demonstrates electricity emission, travel emission, and emission factor search capabilities

CLI Tool

A command-line interface tool for direct API access without the MCP server complexity:

bash
# For electricity emissions
python utils/climatiq_cli.py electricity --energy 1000 --unit kWh --region US

# For travel emissions
python utils/climatiq_cli.py travel --mode car --distance 100 --unit km --region US

Run MCP Server Script

Use the run_mcp_server.py script to directly run the server without installing:

bash
python utils/run_mcp_server.py

Key Concepts

Activity IDs

An Activity ID is a key concept in Climatiq's API that groups similar emission factors together:

  • Each emission factor in the Climatiq database has an activity ID
  • Activity IDs group emission factors describing the same activity across regions, years, sources, etc.
  • Examples: electricity-supply_grid-source_residual_mix (electricity), passenger_vehicle-vehicle_type_car (car travel)

Calculation Methods

The Climatiq MCP server supports multiple calculation methods:

  1. Distance-based method for travel emissions
  2. Advanced travel calculations with origin-destination pairs
  3. Spend-based method for when you only have expenditure data
  4. Direct calculations using specific emission factors

Troubleshooting

API Key Issues

  1. Ensure CLIMATIQ_API_KEY is set correctly in your environment or .env file
  2. Verify the API key is active in your Climatiq dashboard
  3. Use examples/simple_test.py to check if your API key works correctly

Advanced Usage

For detailed documentation on using specific tools and advanced features, see the docs/README.md file.

About Climatiq

Climatiq provides a powerful API for carbon intelligence, allowing you to calculate emissions from electricity usage, transportation, procurement, and more. This MCP server makes those capabilities accessible to AI assistants through the Model Context Protocol.

For more information about Climatiq, visit climatiq.io.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Star History

Star History Chart

Repository Owner

Repository Details

Language Python
Default Branch main
Size 53 KB
Contributors 1
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

Python
100%

Tags

Topics

anthropic-claude climate-data llm mcp

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • Perplexity MCP Server

    Perplexity MCP Server

    MCP Server integration for accessing the Perplexity API with context-aware chat completion.

    Perplexity MCP Server provides a Model Context Protocol (MCP) compliant server that interfaces with the Perplexity API, enabling chat completion with citations. Designed for seamless integration with clients such as Claude Desktop, it allows users to send queries and receive context-rich responses from Perplexity. Environment configuration for API key management is supported, and limitations with long-running requests are noted. Future updates are planned to enhance support for client progress reporting.

    • 85
    • MCP
    • tanigami/mcp-server-perplexity
  • OpenAI MCP Server

    OpenAI MCP Server

    Bridge between Claude and OpenAI models using the MCP protocol.

    OpenAI MCP Server enables direct querying of OpenAI language models from Claude via the Model Context Protocol (MCP). It provides a configurable Python server that exposes OpenAI APIs as MCP endpoints. The server is designed for seamless integration, requiring simple configuration updates and environment variable setup. Automated testing is supported to verify connectivity and response from the OpenAI API.

    • 77
    • MCP
    • pierrebrunelle/mcp-server-openai
  • MyMCP Server (All-in-One Model Context Protocol)

    MyMCP Server (All-in-One Model Context Protocol)

    Powerful and extensible Model Context Protocol server with developer and productivity integrations.

    MyMCP Server is a robust Model Context Protocol (MCP) server implementation that integrates with services like GitLab, Jira, Confluence, YouTube, Google Workspace, and more. It provides AI-powered search, contextual tool execution, and workflow automation for development and productivity tasks. The system supports extensive configuration and enables selective activation of grouped toolsets for various environments. Installation and deployment are streamlined, with both automated and manual setup options available.

    • 93
    • MCP
    • nguyenvanduocit/all-in-one-model-context-protocol
  • Klavis

    Klavis

    One MCP server for AI agents to handle thousands of tools.

    Klavis provides an MCP (Model Context Protocol) server with over 100 prebuilt integrations for AI agents, enabling seamless connectivity with various tools and services. It offers both cloud-hosted and self-hosted deployment options and includes out-of-the-box OAuth support for secure authentication. Klavis is designed to act as an intelligent connector, streamlining workflow automation and enhancing agent capability through standardized context management.

    • 5,447
    • MCP
    • Klavis-AI/klavis
  • MCP Manager for Claude Desktop

    MCP Manager for Claude Desktop

    A desktop app to manage Model Context Protocol (MCP) servers for Claude Desktop on MacOS.

    MCP Manager for Claude Desktop provides a user-friendly interface to manage Model Context Protocol (MCP) servers, enabling Claude to access private data, APIs, and local or remote services securely from a MacOS desktop. It facilitates rapid configuration and integration with a wide variety of MCP servers, including productivity tools, databases, and web APIs. The app runs locally to ensure data privacy and streamlines connecting Claude to new sources through simple environment and server settings management.

    • 270
    • MCP
    • zueai/mcp-manager
  • mcp-cli

    mcp-cli

    A command-line inspector and client for the Model Context Protocol

    mcp-cli is a command-line interface tool designed to interact with Model Context Protocol (MCP) servers. It allows users to run and connect to MCP servers from various sources, inspect available tools, resources, and prompts, and execute commands non-interactively or interactively. The tool supports OAuth for various server types, making integration and automation seamless for developers working with MCP-compliant servers.

    • 391
    • MCP
    • wong2/mcp-cli
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results