Skip to main content

Overview

The Dcycle MCP Server integrates with Claude Desktop and Claude Code, allowing you to query your sustainability data using natural language.

Prerequisites

  • Dcycle API Key - Get it from Settings > API
  • Organization ID - Your organization UUID from Dcycle
  • Claude Desktop or Claude Code

Installation

# Run directly with uvx (no install needed)
uvx dcycle-mcp

# Or install with pip
pip install dcycle-mcp

Configuration

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
  "mcpServers": {
    "dcycle": {
      "command": "uvx",
      "args": ["dcycle-mcp"],
      "env": {
        "DCYCLE_API_KEY": "your_api_key",
        "DCYCLE_ORG_ID": "your_org_uuid"
      }
    }
  }
}

Claude Code

Add a .mcp.json file to your project root:
{
  "mcpServers": {
    "dcycle": {
      "command": "uvx",
      "args": ["dcycle-mcp"],
      "env": {
        "DCYCLE_API_KEY": "your_api_key",
        "DCYCLE_ORG_ID": "your_org_uuid"
      }
    }
  }
}
After saving, restart Claude to load the MCP server.

Environment Variables

VariableRequiredDefaultDescription
DCYCLE_API_KEYYesYour Dcycle API key
DCYCLE_ORG_IDRecommendedDefault organization UUID
DCYCLE_API_URLNohttps://api.dcycle.ioAPI base URL

Verify the Connection

Ask Claude:
"Check my Dcycle connection status"
Claude will call get_connection_status and show your organization metrics — facilities, vehicles, employees, and more.

Example Queries

Organization Overview

"Show me my organization tree"
"How many facilities, vehicles, and employees do we have?"

Energy & Invoices

"List our electricity invoices from the last quarter"

Fleet

"Show me our vehicle fleet"

Supply Chain

"List our purchases with the highest emissions"

Business Travel

"Show business travel records by train"

Logistics

"Show our recent shipping requests and their emissions"

Tips for Better Results

If you have access to multiple organizations, your DCYCLE_ORG_ID env var sets the default. You can also pass organization_id to any tool.
Most list tools support filters: status, type, date ranges, and search. Ask Claude to filter — it will use the right parameters.
Claude maintains context. After listing vehicles, ask “which ones use diesel?” or “show me the top emitters”.
Ask for tables, comparisons, or summaries: “show this as a table” or “summarize the key findings”.

Troubleshooting

”MCP server not found”

  • Ensure you have Python 3.10+ installed
  • Verify uvx is available (install with pip install uv)
  • Check the configuration file syntax is valid JSON

”Authentication failed”

  • Verify your API key is correct and hasn’t expired
  • Ensure DCYCLE_API_KEY is set in the config
  • Generate a new API key if needed at app.dcycle.io/settings/api

”organization_id is required”

  • Set DCYCLE_ORG_ID in your env config, or pass the organization UUID directly in your query

Next Steps