QUICKSTART.md•3.13 kB
# Quick Start Guide
Get the MCP Energy server running in 5 minutes!
## Installation
```bash
# 1. Clone the repository
git clone https://github.com/YOUR_USERNAME/mcp-energy.git
cd mcp-energy
# 2. Install dependencies
pip install -e .
```
## Configuration
### Option 1: Use the Default API Key (Included)
The server comes with a pre-configured API key. You can start using it immediately!
### Option 2: Use Your Own API Key (Recommended for Production)
1. Get your free API key from [EIA](https://www.eia.gov/opendata/register.php)
2. Create a `.env` file:
```bash
cp .env.example .env
```
3. Edit `.env` and replace the API key with yours
## Running the Server
### Test Run (Command Line)
```bash
python server.py
```
Press `Ctrl+C` to stop.
### Use with Claude Desktop
1. Find your Claude config file:
- **MacOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
2. Add this configuration (replace `/full/path/to/` with your actual path):
```json
{
"mcpServers": {
"energy": {
"command": "python",
"args": ["-m", "server"],
"cwd": "/full/path/to/mcp-energy"
}
}
}
```
3. Restart Claude Desktop
4. Look for the 🔌 icon to confirm the server is connected
## Try It Out!
Ask Claude questions like:
- "What's the latest electricity generation data for California?"
- "Show me natural gas consumption trends"
- "Get renewable energy data for the past year"
- "What are the current petroleum prices?"
- "Show me CO2 emissions by sector"
## Available Tools
The server provides 8 tools for accessing energy data:
1. **get_electricity_data** - Generation, consumption, sales, revenue
2. **get_natural_gas_data** - Production, consumption, prices, storage
3. **get_petroleum_data** - Production, consumption, imports, exports, prices
4. **get_coal_data** - Production, consumption, prices
5. **get_renewable_data** - Solar, wind, hydro, geothermal, biomass
6. **get_co2_emissions_data** - Emissions by state and sector
7. **get_steo_data** - Short-Term Energy Outlook forecasts
8. **get_international_energy_data** - Global energy statistics
## Troubleshooting
### Server won't start
```bash
# Check Python version (needs 3.10+)
python --version
# Reinstall dependencies
pip install -e . --force-reinstall
```
### Claude Desktop can't connect
- Verify the path in `claude_desktop_config.json` is absolute
- Check that `python server.py` runs without errors
- Restart Claude Desktop completely
### API errors
- Check your internet connection
- Verify your API key is valid (if using custom key)
- Check [EIA API status](https://www.eia.gov/opendata/)
## Next Steps
- Read the full [README.md](README.md) for detailed documentation
- Check [DEPLOYMENT.md](DEPLOYMENT.md) for GitHub deployment
- Explore the [EIA Data Browser](https://www.eia.gov/opendata/browser/) to understand available data
## Need Help?
- Create an issue on GitHub
- Check the [MCP Documentation](https://modelcontextprotocol.io)
- Review [EIA API Docs](https://www.eia.gov/opendata/)