Claude Desktop Integration

Updated 5 May 2025

ScopeGreen can be integrated directly into Claude Desktop through the Model Context Protocol (MCP), giving your AI assistant direct access to sustainability metrics data without copying and pasting. This guide walks you through setting up and using the ScopeGreen MCP server.


1 What is MCP?

Model Context Protocol (MCP) allows AI assistants like Claude to interact with external tools and data sources. By connecting Claude Desktop to the ScopeGreen MCP server, you enable Claude to:

  • Directly search for environmental metrics data
  • Access current sustainability information for materials and products
  • Compare carbon footprints across different regions or materials
  • Format results into reports, visualizations, or comparisons

2 Prerequisites

Before setting up the ScopeGreen MCP server, ensure you have:

  • Python 3.10+ installed on your system
  • A ScopeGreen API key (obtain via the Builder Form or Enterprise Form)
  • Claude Desktop installed and updated to the latest version
  • Basic familiarity with command line operations

3 Installation

Step 1: Clone the repository

git clone https://github.com/scope4/MCP_ScopeGreen
cd MCP_ScopeGreen

Step 2: Create and activate a virtual environment

# Using venv (standard Python)
python -m venv .venv
# On Windows
.venv\Scripts\activate
# On macOS/Linux
source .venv/bin/activate

Step 3: Install dependencies

pip install -r requirements.txt

Step 4: Configure Claude Desktop

Add the ScopeGreen MCP server to your Claude Desktop configuration:

  1. Open Claude Desktop
  2. Navigate to Settings > Developer
  3. Click "Edit Config" to open the claude_desktop_config.json file
  4. Add the following configuration, replacing paths with your actual paths:
{
  "mcpServers": {
    "ScopeGreen LCA": {
      "command": "/path/to/MCP_ScopeGreen/.venv/bin/python",
      "args": [
        "/path/to/MCP_ScopeGreen/server.py"
      ],
      "env": {
        "SCOPEGREEN_API_KEY": "your_api_key_here"
      }
    }
  }
}

Note: On Windows, use double backslashes (\\) in paths.

Step 5: Restart Claude Desktop

Restart Claude Desktop to apply the configuration changes.


4 Using ScopeGreen in Claude

Once configured, you'll see the MCP tools icon in Claude Desktop's chat interface. Click it to access the ScopeGreen tools:

  • search_lca_metrics: Search for environmental metrics data
  • get_available_metrics: Get the list of available metrics

Example prompts for Claude:

  • "What's the carbon footprint of cotton production?"
  • "Compare the carbon footprint of steel vs. aluminum production in Europe."
  • "Find the land use impact of rice production."
  • "What's the EF3.1 Score for electricity generation in Germany?"
  • "Create a comparison chart of carbon footprints for different transportation methods."

Note: Explicitly ask Claude to use ScopeGreen in your prompts to make sure that the MCP is actually used.

Parameters explained:

When Claude uses the ScopeGreen tools, it will have access to the same parameters as the API:

ParameterDescription
item_nameName of the item to find metrics for (REQUIRED)
metricThe specific environmental metric (Carbon footprint, EF3.1 Score, Land Use)
yearYear of the requested data (≥ 2020)
geographyRegion for the requested data (ISO codes like 'DE', 'US')
num_matchesHow many ranked matches to return (1-3)
unitTarget unit for conversion (e.g., 'g', 'kg', 'kWh')
domainCategory filter (Materials & Products, Energy, Transport, etc.)
not_englishSet to true for non-English item names

5 Troubleshooting

Common issues:

  • "Could not attach to MCP server": Verify paths in your configuration file and ensure Python is properly installed.
  • API errors: Check that your API key is valid and properly set in the Claude Desktop config.
  • Missing tools: Restart Claude Desktop after configuration changes.
  • Connection issues: Verify network connectivity and API access.

Checking logs:

  • macOS: View logs at ~/Library/Application Support/Claude/logs/
  • Windows: View logs at %APPDATA%\Claude Desktop\logs\

Need help? → tommaso@scope4.dev


6 Technical Details

The ScopeGreen MCP server uses the following components:

  • FastMCP: Provides a Pythonic interface for building MCP servers
  • httpx: Modern HTTP client for making API requests
  • Python 3.10+: Required for type hinting and async features

The server acts as a bridge between Claude and the ScopeGreen API, translating Claude's requests into API calls and formatting the responses in a way Claude can understand.