Carbon Intensity MCP Server
An MCP (Model Context Protocol) server that provides access to the UK Carbon Intensity API from National Energy System Operator (NESO).
Features
- Get current carbon intensity data for Great Britain
- Retrieve historical and forecast carbon intensity data
- Access regional carbon intensity data by postcode or region ID
- Get generation mix data (renewable vs non-renewable sources)
- Statistical analysis of carbon intensity trends
- Carbon intensity factors for different fuel types
Installation
From PyPI (Recommended)
# No installation needed - uvx will handle it automatically
uvx carbon-intensity-mcp --help
From Source
git clone https://github.com/benomahony/carbon-intensity-mcp.git
cd carbon-intensity-mcp
uv sync
Usage
If using from PyPI
Add to your MCP client configuration:
{
"mcpServers": {
"carbon-intensity": {
"command": "uvx",
"args": ["carbon-intensity-mcp"]
}
}
}
If installed from source
Add to your MCP client configuration:
{
"mcpServers": {
"carbon-intensity": {
"command": "uv",
"args": ["--directory", "/path/to/carbon-intensity-mcp", "run", "carbon-intensity-mcp"]
}
}
}
Important: Replace /path/to/carbon-intensity-mcp with the actual absolute path to your cloned repository.
For the example configuration provided:
cp example-config.json ~/.config/claude/mcp_servers.json
# Edit the path in the file to match your setup
Testing
Test the server works:
# If using from PyPI
echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {"tools": {}}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | uvx carbon-intensity-mcp
# If installed from source
echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {"tools": {}}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | uv run carbon-intensity-mcp
Available Tools
National Intensity
get_current_intensity- Get carbon intensity for current half hourget_intensity_today- Get carbon intensity for todayget_intensity_by_date- Get carbon intensity for specific dateget_intensity_by_date_period- Get carbon intensity for specific date and periodget_intensity_by_datetime- Get carbon intensity for specific datetimeget_intensity_forward_24h- Get 24h forward forecastget_intensity_forward_48h- Get 48h forward forecastget_intensity_past_24h- Get past 24h dataget_intensity_range- Get data for date range (max 14 days)
Statistics
get_intensity_statistics- Get statistics for date range (max 30 days)get_intensity_statistics_blocks- Get block average statistics
Generation Mix
get_current_generation_mix- Get current fuel mixget_generation_mix_past_24h- Get past 24h generation mixget_generation_mix_range- Get generation mix for date range
Regional Data
get_regional_current- Get all GB regions current dataget_regional_england- Get England dataget_regional_scotland- Get Scotland dataget_regional_wales- Get Wales dataget_regional_by_postcode- Get data by UK postcodeget_regional_by_region_id- Get data by region ID
Factors
get_intensity_factors- Get carbon intensity factors by fuel type
API Coverage
This server provides access to the complete UK Carbon Intensity API v2.0.0:
- National Intensity: Current, historical and forecast carbon intensity
- Regional Intensity: Regional data by postcode or region ID
- Generation Mix: Fuel mix breakdown (gas, nuclear, renewables, etc.)
- Statistics: Statistical analysis of carbon intensity trends
- Factors: Carbon intensity factors by fuel type
License
CC BY 4.0 (following the source API license)
Metadata
Release files for carbon-intensity-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| carbon_intensity_mcp-0.1.1.tar.gz | 24.3 kB | With provenance | Details for carbon_intensity_mcp-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| carbon_intensity_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for carbon_intensity_mcp-0.1.1-py3-none-any.whl |
Total release size: 29.4 kB
Release files / carbon_intensity_mcp-0.1.1.tar.gz
| Download URL | carbon_intensity_mcp-0.1.1.tar.gz |
|---|---|
| Size | 24.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ef2d47e3b4f54aa2d91e0a1002df73775b0533e76cfce494da1f43228054c8d
|
|
BLAKE2b-256 checksum How to use checksums |
914f7631b5380fd8623fa684059c261d651850becd5d9e283c5725b665c37980
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 20, 2025.
Transparency logRelease files / carbon_intensity_mcp-0.1.1-py3-none-any.whl
| Download URL | carbon_intensity_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ac842d24f883551060d93070d297afd57d11108ea8a61f19b33c7cf5b250f782
|
|
BLAKE2b-256 checksum How to use checksums |
052b1269a23855891850a4093597d19aa3e6adcda7a4d71bb8646667d84088a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 20, 2025.
Transparency logSecurity for carbon-intensity-mcp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for carbon_intensity_mcp-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 20, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.