Skip to main content

MCP server for intelligent emission factor matching using hybrid keyword + embedding retrieval

Project description

smithery badge

Carbon Factor Matcher — MCP Server for Carbon Accounting

An MCP (Model Context Protocol) server that connects AI agents with carbon emission factor databases. It provides intelligent emission factor matching for carbon accounting, LCA (Life Cycle Assessment), and ESG reporting applications.

What is this MCP?

Carbon Factor Matcher helps AI agents find the most appropriate emission factors from standardized environmental databases. It uses a hybrid search algorithm:

  1. Keyword + Embedding retrieval — Field-weighted keyword scoring and semantic similarity to find candidate factors

The calling AI agent selects the best match from the ranked candidates. No external LLM API needed.

Supported Databases

  • ELCD — European Reference Life Cycle Database (500+ factors, included in Free tier)
  • ecoinvent 3.10 — Swiss Centre for Life Cycle Inventories (6,000+ factors, Pro license required)
  • MEE — China Ministry of Ecology and Environment (48 provincial/grid factors, Pro license required)

Key Features

  • Hybrid keyword + embedding matching (DashScope text-embedding-v4)
  • Multi-language support (Chinese/English activity descriptions)
  • Zero configuration — works out of the box after installation
  • MCP-compatible — works with Claude, Cursor, Windsurf, Cline, Continue, and any MCP client

Installation

Claude Code

claude mcp add carbon-factor-matcher -- npx -y @nikeandocean/carbon-factor-matcher

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "carbon-factor-matcher": {
      "command": "npx",
      "args": ["-y", "@nikeandocean/carbon-factor-matcher"]
    }
  }
}

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Cursor

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):

{
  "mcpServers": {
    "carbon-factor-matcher": {
      "command": "npx",
      "args": ["-y", "@nikeandocean/carbon-factor-matcher"]
    }
  }
}

Or via Cursor UI: Settings → MCP → Add new global MCP server.

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "carbon-factor-matcher": {
      "command": "npx",
      "args": ["-y", "@nikeandocean/carbon-factor-matcher"]
    }
  }
}

Or via Windsurf UI: Settings → Cascade → MCP Servers → Add.

Cline (VS Code Extension)

Add to Cline MCP settings (click MCP Servers icon in Cline panel):

{
  "mcpServers": {
    "carbon-factor-matcher": {
      "command": "npx",
      "args": ["-y", "@nikeandocean/carbon-factor-matcher"]
    }
  }
}

Continue (VS Code / JetBrains)

Add to ~/.continue/config.yaml:

mcpServers:
  - name: carbon-factor-matcher
    command: npx
    args:
      - "-y"
      - "@nikeandocean/carbon-factor-matcher"

Smithery.ai (One-Click Install)

npx -y smithery mcp add nikeandocean/carbon-factor-matcher

Or visit smithery.ai/server/@nikeandocean/carbon-factor-matcher for hosted endpoint.

Pro License

The Free tier works immediately after installation (300 queries/day, ELCD database, keyword search). To unlock the full experience:

Plan Price Features
Free $0 ELCD database (500+ factors), keyword search, 300 queries/day
Pro $5 (one-time) ELCD + ecoinvent + MEE (6,370+ factors), hybrid keyword + embedding matching, unlimited queries

Purchase License Key

👉 Buy Pro License

After purchase, you'll receive a license key via email. Set it as an environment variable in your MCP config:

{
  "mcpServers": {
    "carbon-factor-matcher": {
      "command": "npx",
      "args": ["-y", "@nikeandocean/carbon-factor-matcher"],
      "env": {
        "CARBON_FACTOR_LICENSE_KEY": "PRO-xxxx-xxxx"
      }
    }
  }
}

Configuration

Variable Description Default
CARBON_FACTOR_LICENSE_KEY Your license key (empty = Free tier)
CARBON_FACTOR_DATA_DIR Path to local factor database data/factors

Note: No external LLM API configuration needed. The calling AI agent handles final factor selection.

Available Tools

factor_match

Match activity data to emission factors. Free tier uses keyword search; Pro tier uses hybrid keyword + embedding matching. Returns ranked candidates for the calling agent to select from.

Input:

{
  "activity_data": "electricity, medium voltage, industrial grid, China, Guangdong",
  "top_k": 5
}

Output (Pro tier):

{
  "candidates": [
    {
      "name": "electricity, provincial grid, Guangdong (广东)",
      "value": 0.4419,
      "unit": "kgCO2/kWh",
      "geography": {"location": "China, Guangdong (广东)"},
      "source": "MEE (Ministry of Ecology and Environment), China",
      "source_year": 2023,
      "db_source": "mee",
      "keyword_score": 0.8293,
      "embedding_score": 0.6779,
      "hybrid_score": 0.7233,
      "final_score": 0.7233
    }
  ],
  "selection_guidance": "从候选列表中选择最匹配的排放因子..."
}

factor_search

Search emission factors by keyword with optional filters.

Input:

{
  "query": "diesel",
  "category": "fuel",
  "limit": 10
}

factor_detail

Get full metadata for a specific factor.

Input:

{
  "factor_id": "elec-cn-south-10kv-2024"
}

Demo

👉 Try the Live Demo — Search 30+ emission factors directly in your browser (no installation needed).

System Requirements

  • Node.js 18+ (for npx)
  • Python 3.11+ (auto-installed via pip)

Support

License

This is proprietary software. See LICENSE for details.


© 2024 Carbon Factor Matcher. All rights reserved.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

carbon_factor_matcher-2.2.1-py3-none-any.whl (36.5 kB view details)

Uploaded Python 3

File details

Details for the file carbon_factor_matcher-2.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for carbon_factor_matcher-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b968261a31c12cb97b06ea28a52d6f92f29122a9c3af6913a3a69cefe9b2da05
MD5 8e3c7c619bcad48840e9b674bc969f36
BLAKE2b-256 d3daf6069efb1418e50c1818568988dbaa46bc67d31880d727b89b8b63809fb0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page