Claude Desktop Setup¶
This guide walks you through setting up eptr2 with Claude Desktop for direct electricity market data access.
Prerequisites¶
- Claude Desktop installed
- eptr2 installed with MCP support:
- EPIAS Transparency Platform credentials
Configuration¶
Step 1: Locate Config File¶
Find your Claude Desktop configuration file:
Step 2: Add eptr2 Server¶
Edit claude_desktop_config.json to add the eptr2 MCP server:
{
"mcpServers": {
"eptr2": {
"command": "eptr2-mcp-server",
"env": {
"EPTR_USERNAME": "your.email@example.com",
"EPTR_PASSWORD": "yourpassword"
}
}
}
}
Alternative: Using UV¶
If you're using UV for package management:
{
"mcpServers": {
"eptr2": {
"command": "uv",
"args": [
"run",
"--extra", "mcp",
"eptr2-mcp-server"
],
"env": {
"EPTR_USERNAME": "your.email@example.com",
"EPTR_PASSWORD": "yourpassword"
}
}
}
}
Alternative: Using Python Module¶
{
"mcpServers": {
"eptr2": {
"command": "python",
"args": ["-m", "eptr2.mcp.server"],
"env": {
"EPTR_USERNAME": "your.email@example.com",
"EPTR_PASSWORD": "yourpassword"
}
}
}
}
Step 3: Restart Claude Desktop¶
Close and reopen Claude Desktop to load the new configuration.
Verification¶
Check Server Status¶
In Claude Desktop, you should see the eptr2 tools available. Try asking:
"What MCP tools do you have available for Turkish electricity market data?"
Claude should list the eptr2 tools.
Test a Query¶
Ask Claude:
"What are today's electricity prices in Turkey?"
Claude will use the get_market_clearing_price tool to fetch the data.
Example Conversations¶
Price Analysis¶
You: What were the electricity prices in Turkey on July 29, 2024?
Claude: I'll fetch the market clearing prices for that date... [Uses get_market_clearing_price tool]
The Market Clearing Price (MCP/PTF) on July 29, 2024 ranged from...
Consumption Data¶
You: Show me Turkey's real-time electricity consumption for the past week.
Claude: I'll get the real-time consumption data... [Uses get_real_time_consumption tool]
Here's the hourly consumption data for the past week...
Generation Mix¶
You: What's the current generation mix in Turkey? How much comes from renewables?
Claude: Let me fetch the real-time generation data by source... [Uses get_real_time_generation tool]
Currently, Turkey's electricity generation mix is...
Complex Analysis¶
You: Compare the MCP and SMP for July 2024 and tell me about any patterns.
Claude: I'll fetch both price series and analyze them... [Uses multiple tools]
Here's my analysis of the MCP and SMP comparison...
Troubleshooting¶
Server Not Starting¶
-
Verify eptr2 is installed:
-
Test the server manually:
-
Check the Claude Desktop logs for errors
Authentication Errors¶
- Verify credentials are correct
- Test credentials with direct Python:
Tools Not Appearing¶
- Restart Claude Desktop
- Check JSON syntax in config file
- Verify the command path is correct
Slow Responses¶
- Enable TGT recycling to reduce authentication overhead
- Check your network connection to EPIAS servers
Security Notes¶
Credential Security
The configuration file stores credentials in plain text. Consider:
- Setting appropriate file permissions
- Using environment variables from a
.envfile - Not sharing your configuration file
Using .env File Instead¶
Create a wrapper script that loads from .env:
Then in config:
Advanced Configuration¶
Multiple Servers¶
You can run multiple MCP servers alongside eptr2:
{
"mcpServers": {
"eptr2": {
"command": "eptr2-mcp-server",
"env": {...}
},
"other-server": {
"command": "other-mcp-server"
}
}
}
Custom Settings¶
{
"mcpServers": {
"eptr2": {
"command": "python",
"args": [
"-c",
"from eptr2.mcp import run_mcp_server; import asyncio; asyncio.run(run_mcp_server(recycle_tgt=True))"
],
"env": {
"EPTR_USERNAME": "...",
"EPTR_PASSWORD": "...",
"EPTR_TGT_PATH": "/custom/path"
}
}
}
}