loading…
Search for a command to run...
loading…
Enables carbon emission calculations for Australian electricity and gas consumption using official National Greenhouse Accounts 2024 data, supporting all states
Enables carbon emission calculations for Australian electricity and gas consumption using official National Greenhouse Accounts 2024 data, supporting all states and territories.
A high-performance Model Context Protocol (MCP) server for calculating carbon emissions using official Australian National Greenhouse Accounts (NGA) 2024 data. Built with TypeScript and deployed on Cloudflare Workers for global availability and sub-100ms response times.
This MCP server provides accurate carbon footprint calculations for electricity and gas consumption across Australian states and territories. All emission factors are sourced from the Australian Government's Department of Climate Change, Energy, the Environment and Water (DCCEEW), ensuring compliance with national reporting standards.
The fastest way to get started is using our production deployment:
# Add to your Claude Desktop configuration
{
"mcpServers": {
"carbon-calculator": {
"command": "npx",
"args": ["mcp-remote", "https://mcp-carbon-calculator.mcp-carbon-calculator.workers.dev/sse"],
"env": {
"NODE_ENV": "production"
}
}
}
}
# Clone the repository
git clone https://github.com/Programmer-RD-AI/mcp-carbon-calculator.git
cd mcp-carbon-calculator
# Install dependencies
npm install
# Start development server
npm run dev
# The server will be available at http://localhost:8787
electricity_emissionCalculate carbon emissions from electricity consumption across Australian states and territories.
Parameters:
kilo_watt_hours (number): Electricity consumption in kWhstate (string): Australian state/territorySupported States:
Example Response:
Australian Electricity Emission Calculation:
State: Victoria
Electricity consumed: 350 kWh
Scope 2 factor: 0.77 kg CO₂e/kWh
Scope 3 factor: 0.09 kg CO₂e/kWh
Total factor: 0.86 kg CO₂e/kWh
Total emissions: 301.00 kg CO₂e
Total emissions: 0.301000 tonnes CO₂e
Context: This calculation uses Australian National Greenhouse Accounts (NGA) 2024 emission factors.
gas_emission_metroCalculate carbon emissions from gas consumption in metropolitan areas.
Parameters:
giga_joules (number): Gas consumption in GJgas_type (string): Australian state/territorygas_emission_non_metroCalculate carbon emissions from gas consumption in non-metropolitan areas.
Parameters:
giga_joules (number): Gas consumption in GJgas_type (string): Australian state/territoryThe codebase follows a modular architecture pattern optimized for serverless deployment:
src/
├── index.ts # Main Cloudflare Worker entry point
├── types.ts # Type definitions and interfaces
├── calculators/ # Emission calculation logic
│ ├── electricity.ts # Electricity emission calculations
│ └── gas.ts # Gas emission calculations
├── handlers/ # Request handlers
│ ├── mcp.ts # MCP JSON-RPC handler
│ └── sse.ts # Server-Sent Events handler
├── data/ # Static data and constants
│ └── emissions.ts # NGA 2024 emission factors
├── config/ # Configuration files
│ └── tools.ts # MCP tool definitions
└── utils/ # Utility functions
└── cors.ts # CORS handling utilities
npm run dev # Start development server
npm run build # Build TypeScript
npm run deploy # Deploy to Cloudflare Workers
npm run typecheck # Run TypeScript type checking
npm run lint # Run ESLint
npm run test # Run tests
For deployment, you'll need to configure:
CLOUDFLARE_API_TOKEN: Your Cloudflare API tokenCLOUDFLARE_ACCOUNT_ID: Your Cloudflare account IDThis repository includes GitHub Actions workflows for automatic deployment:
main: Automatically deploys to production# Deploy to production
npm run deploy
# Deploy with specific environment
wrangler deploy --env production
POST /sse - JSON-RPC endpoint for MCP clientsGET /sse - Server-Sent Events endpoint (with Accept: text/event-stream)GET / - Information page with API documentationinitialize - Initialize MCP connectiontools/list - Get available toolstools/call - Execute a calculation toolAll emission factors are sourced from:
Australian National Greenhouse Accounts (NGA) Factors 2024
The emission factors include:
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)Production URL: https://mcp-carbon-calculator.mcp-carbon-calculator.workers.dev
MCP Endpoint: https://mcp-carbon-calculator.mcp-carbon-calculator.workers.dev/sse
Выполни в терминале:
claude mcp add mcp-carbon-calculator -- npx Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development