wattlayer-mcp
v1.0.0
Published
Model Context Protocol server for WattLayer — East Asia power data (SMP, supply, distributed-energy zones, regional siting intelligence) for LLM agents.
Maintainers
Readme
wattlayer-mcp
An MCP (Model Context Protocol) server that exposes WattLayer — East Asia power-data developer infrastructure ("the Stripe for Energy Data") — to LLM agents such as Claude Desktop and Cursor.
Ask your assistant things like "What's the current SMP?", "Score a 200 MW AI data center in Gyeonggi", or "Rank Korean regions for a renewable project" and it will call the WattLayer REST API for you.
Tools
| Tool | Arguments | Description |
| ------------------- | ------------------------------------------------ | --------------------------------------------------------------------------- |
| smp_latest | (none) | Latest System Marginal Price (wholesale electricity clearing price, KRW/kWh). |
| supply_current | (none) | Real-time grid supply/demand snapshot (capacity, load, reserve rate). |
| zones_get | code (string) | Distributed-energy (분산에너지) special zone detail by code. |
| regions_scorecard | loadType (datacenter|factory|renewable) | Nationwide regional power-competitiveness ranking for a load type. |
| siting_score | region (string), capacityMw (number), loadType | Siting & profitability intelligence for a proposed load at a region. |
Each tool calls the WattLayer REST API at https://api.wattlayer.io with the
X-API-Key header and returns the JSON response.
Requirements
- Node.js >= 20
- A WattLayer API key (
wl_live_...orwl_test_...) — get one at https://wattlayer.io.
Install & build
cd mcp
npm install
npm run buildThis compiles src/index.ts to dist/index.js (an executable with a shebang).
For local development without building you can run it directly with tsx:
WATTLAYER_API_KEY=wl_live_xxx npm run devConfiguration
The server is configured entirely through environment variables:
| Variable | Required | Default | Description |
| -------------------- | -------- | --------------------------- | ------------------------------------ |
| WATTLAYER_API_KEY | yes | — | Your WattLayer API key. |
| WATTLAYER_BASE_URL | no | https://api.wattlayer.io | Override the API base URL (e.g. for local dev http://localhost:3000). |
Claude Desktop setup
Edit your claude_desktop_config.json:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add a wattlayer entry under mcpServers (use the absolute path to the built dist/index.js):
{
"mcpServers": {
"wattlayer": {
"command": "node",
"args": ["C:\\Users\\A\\watt_layer\\mcp\\dist\\index.js"],
"env": {
"WATTLAYER_API_KEY": "wl_live_your_key_here"
}
}
}
}Once published to npm you can instead use npx with no build step:
{
"mcpServers": {
"wattlayer": {
"command": "npx",
"args": ["-y", "wattlayer-mcp"],
"env": {
"WATTLAYER_API_KEY": "wl_live_your_key_here"
}
}
}
}Restart Claude Desktop after saving. The WattLayer tools appear under the tools (🔌) menu.
Cursor setup
Create or edit .cursor/mcp.json in your project (or the global ~/.cursor/mcp.json):
{
"mcpServers": {
"wattlayer": {
"command": "node",
"args": ["C:\\Users\\A\\watt_layer\\mcp\\dist\\index.js"],
"env": {
"WATTLAYER_API_KEY": "wl_live_your_key_here"
}
}
}
}Then enable the wattlayer server in Cursor Settings → MCP.
Example prompts
- "Using WattLayer, what is the latest SMP right now?"
- "Get the current grid reserve rate."
- "Show me the Jeju distributed-energy zone (
zones_get code=jeju)." - "Rank all Korean regions for a renewable project."
- "Score a 300 MW data center in Chungnam."
Notes
stdoutis reserved for the MCP JSON-RPC protocol; the server logs diagnostics tostderr.- Requests time out after 20 seconds.
- HTTP / auth errors from the API are returned as MCP tool errors with the status and body.
License
MIT
