A Model Context Protocol (MCP) server for interacting with IEEE 2030.5 (SEP 2.0) Smart Energy Profile servers.
Quick Start: npx -y @prandogabriel/ieee2030.5-mcp
- Features
- Prerequisites
- Quick Start
- Environment Configuration
- Available MCP Tools
- IEEE 2030.5 Navigation
- Development
- Usage Examples
- Contributing
- Security Notes
- Troubleshooting
- π Certificate-based authentication (single .pem or separate cert/key files)
- π‘ Full IEEE 2030.5 endpoint support
- π οΈ MCP tools for all major IEEE 2030.5 resources
- π― HATEOAS-based navigation with comprehensive guide
- βοΈ Environment-based configuration
- π§ͺ Built-in test client and MCP Inspector support
- Node.js: Version 20.0.0 or higher
- Package Manager: pnpm (recommended) or npm
- Operating System: macOS, Linux, or Windows
If you don't have Node.js installed:
Using Node Version Manager (recommended):
# Install nvm (macOS/Linux)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
# Install and use Node.js 20
nvm install 20
nvm use 20
Direct download:
- Download from nodejs.org (LTS version recommended)
npm install -g pnpm
Or using corepack (Node.js 16.10+):
corepack enable
corepack prepare pnpm@latest --activate
To use this MCP server, you need access to an IEEE 2030.5 compliant server with:
- HTTPS endpoint (typically port 8443)
- Client certificate authentication (.pem format recommended)
- IEEE 2030.5/SEP 2.0 compliance with standard endpoints
Common IEEE 2030.5 implementations:
- OpenADR VEN/VTN servers
- Smart inverter management systems
- Utility demand response platforms
- Distributed Energy Resource (DER) management systems
For most users, the simplest way is to use the published npm package:
-
Ensure Node.js 20+ is installed:
node --version # Should be 20.0.0 or higher
-
Test the server:
npx -y @prandogabriel/ieee2030.5-mcp
-
Configure with Claude Desktop - see Published Package Configuration
For development or customization:
Check your Node.js and pnpm versions:
node --version # Should be 20.0.0 or higher
pnpm --version # Should be 8.0.0 or higher
git clone <repository-url>
cd ieee2030.5-mcp
pnpm install
Copy the example environment file and configure your IEEE 2030.5 server:
cp .env.example .env
Edit .env
with your configuration. The server will automatically load environment variables from the .env
file:
# REQUIRED: Your IEEE 2030.5 server URL
IEEE2030_BASE_URL=https://your-ieee2030-server:port
# REQUIRED: Certificate for authentication (choose one option)
# Option 1: Single PEM file (like curl -E $CTRL_CERT)
IEEE2030_CERT_PATH=/path/to/your/client.pem
# Option 2: Separate files
# IEEE2030_CERT_PATH=/path/to/client.crt
# IEEE2030_KEY_PATH=/path/to/client.key
# Optional: Security settings
IEEE2030_INSECURE=true # Set to true for development with self-signed certs
Note: The .env
file is automatically ignored by git for security.
pnpm build
Use the MCP Inspector for interactive testing and debugging:
# Build and start the inspector
pnpm debug
This will:
- Build your server
- Open the MCP Inspector in your browser at
http://localhost:5173
- Connect to your IEEE 2030.5 MCP server
The inspector provides a web UI where you can:
- View all available tools
- Test tools interactively with parameters
- See real-time responses and errors
- Debug your server behavior
Variable | Description | Required |
---|---|---|
IEEE2030_BASE_URL |
Base URL of your IEEE 2030.5 server | β Yes |
IEEE2030_CERT_PATH |
Path to certificate file (.pem, .crt) | β One of cert options |
IEEE2030_CERT_VALUE |
Certificate content as string | β One of cert options |
IEEE2030_KEY_PATH |
Path to private key file (if separate) | β Optional |
IEEE2030_KEY_VALUE |
Private key content as string | β Optional |
IEEE2030_INSECURE |
Skip SSL verification (dev only) | β Default: false |
IEEE2030_TIMEOUT |
Request timeout in milliseconds | β Default: 30000 |
ieee2030_status
- Check client configuration statusieee2030_test_connection
- Test connectivity to IEEE 2030.5 server
ieee2030_get_device_capabilities
- Get device capabilities (/dcap) - Start here for resource discoveryieee2030_get_end_devices
- Get end devices (/edev) - Physical devices and their DERsieee2030_get_der_programs
- Get DER programs (/derp) - Control programs for DERsieee2030_get_demand_response_programs
- Get demand response programs (/drp)ieee2030_get_usage_points
- Get usage points (/upt) - Metering locationsieee2030_get_time
- Get server time (/tm) - Server time synchronizationieee2030_get_custom_endpoint
- Access any custom endpoint with dynamic navigation
ieee2030_navigation_guide
- Comprehensive guide for navigating IEEE 2030.5 resources using HATEOAS principles
This MCP server includes a comprehensive navigation guide that teaches you how to explore IEEE 2030.5 resources dynamically. The IEEE 2030.5 standard uses HATEOAS (Hypermedia as the Engine of Application State) principles, where each response contains links to related resources.
Key Navigation Tips:
- Always start with
/dcap
(Device Capabilities) to discover available resources - Follow links dynamically - use the
href
attributes in responses to navigate - Use the custom endpoint tool to access any discovered path
- Check the navigation guide prompt for detailed examples and patterns
This project uses modern development tools:
- TypeScript: Type-safe JavaScript development
- esbuild: Fast bundling and compilation
- Biome: Fast linting and formatting (replaces ESLint + Prettier)
- nodemon: Auto-restart during development
- MCP Inspector: Interactive testing and debugging
# Start development server with auto-reload
pnpm dev
# Run linting and formatting
pnpm lint # Check for issues
pnpm lint:fix # Fix issues automatically
pnpm format # Check formatting
pnpm format:fix # Fix formatting
pnpm check # Run both lint and format checks
pnpm check:fix # Fix both lint and format issues
# Build for production
pnpm build
# Start production server
pnpm start
# Development with auto-restart
pnpm watch
- Make changes to source code in
/src
- Run development server:
pnpm dev
- Test with MCP Inspector:
pnpm debug
- Format and lint:
pnpm check:fix
- Build for production:
pnpm build
The easiest way to use this MCP server is through the published npm package. No need to clone or build locally!
You can run the server directly using npx:
npx -y @prandogabriel/ieee2030.5-mcp
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"ieee2030-5-mcp": {
"command": "npx",
"args": [
"-y",
"@prandogabriel/[email protected]"
],
"env": {
"IEEE2030_BASE_URL": "https://your-ieee2030-server:port",
"IEEE2030_CERT_PATH": "/path/to/your/cert.pem",
"IEEE2030_INSECURE": "true"
}
}
}
}
Benefits of using the published package:
- β No local setup required - just install and run
- β Always up-to-date - specify version or use latest
- β Automatic dependency management - npx handles everything
- β Cross-platform compatibility - works on any system with Node.js
Configuration Steps:
- Ensure Node.js 20+ is installed (see Prerequisites)
- Add configuration to Claude Desktop using the JSON above
- Update environment variables with your IEEE 2030.5 server details:
- Replace
https://your-ieee2030-server:port
with your server URL - Replace
/path/to/your/cert.pem
with your certificate path - Set
IEEE2030_INSECURE
to"false"
for production
- Replace
- Restart Claude Desktop
- Test the connection:
- Ask Claude: "Check the IEEE 2030.5 server status"
- Ask Claude: "Show me the navigation guide for IEEE 2030.5 resources"
To use this MCP server with Claude Desktop, add the following configuration to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"ieee2030-5-mcp": {
"command": "node",
"args": [
"/path/to/your/ieee2030.5-mcp/dist/index.js"
],
"env": {
"IEEE2030_BASE_URL": "https://your-ieee2030-server:port",
"IEEE2030_CERT_PATH": "/path/to/your/cert.pem",
"IEEE2030_INSECURE": "true"
}
}
}
}
Configuration Steps:
-
Build your server first:
cd /path/to/your/ieee2030.5-mcp pnpm build
-
Update the config with your actual paths:
- Replace
/path/to/your/ieee2030.5-mcp/dist/index.js
with the full path to your built server - Replace
https://your-ieee2030-server:port
with your actual IEEE 2030.5 server URL - Replace
/path/to/your/cert.pem
with the path to your client certificate
- Replace
-
Restart Claude Desktop for the changes to take effect
-
Test the connection:
- Ask Claude: "Check the IEEE 2030.5 server status"
- Ask Claude: "Get device capabilities from the IEEE 2030.5 server"
- Ask Claude: "Show me the navigation guide for IEEE 2030.5 resources"
-
Start the inspector:
pnpm debug
-
Test ieee2030_get_device_capabilities:
- Open the inspector at
http://localhost:5173
- Click on "Tools" tab
- Find
ieee2030_get_device_capabilities
in the list - Click "Execute" to test the tool
- View the IEEE 2030.5 XML response in JSON format
- Open the inspector at
-
Test custom endpoints:
- Select
ieee2030_get_custom_endpoint
- Enter endpoint path like
/dcap
,/tm
,/drp
- Execute and see results
- Select
-
Access navigation guide:
- Click on "Prompts" tab
- Find
ieee2030_navigation_guide
- Click to view the comprehensive guide for navigating IEEE 2030.5 resources
You can also connect to your MCP server programmatically using the MCP SDK:
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
import { spawn } from 'node:child_process';
// Start your server process
const serverProcess = spawn('node', ['dist/index.js']);
const transport = new StdioClientTransport({
reader: serverProcess.stdout,
writer: serverProcess.stdin,
});
// Connect and use tools
const client = new Client({ name: 'my-client', version: '1.0.0' }, { capabilities: {} });
await client.connect(transport);
// Call IEEE 2030.5 tools
const response = await client.request({
method: 'tools/call',
params: { name: 'ieee2030_get_device_capabilities' }
}, { method: 'tools/call' });
We welcome contributions to the IEEE 2030.5 MCP Server! Whether you're fixing bugs, adding features, improving documentation, or enhancing the navigation guide, your help is appreciated.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/ieee2030.5-mcp.git cd ieee2030.5-mcp
- Install dependencies:
pnpm install
- Create a feature branch:
git checkout -b feature/your-feature-name
- Follow existing TypeScript conventions
- Use Biome for linting and formatting:
pnpm check:fix
- Write descriptive commit messages following conventional commits
- Add JSDoc comments for public APIs
- Build the project:
pnpm build
- Test with MCP Inspector:
pnpm debug
- Test with Claude Desktop using your local build
- Verify all tools work with a real IEEE 2030.5 server (if available)
- Code builds without errors:
pnpm build
- Linting passes:
pnpm lint
- Formatting is correct:
pnpm format
- All tools can be loaded in MCP Inspector
- Navigation guide reflects any new endpoints
- Fix SSL/TLS connection issues
- Improve error handling and messages
- Resolve XML parsing edge cases
- New IEEE 2030.5 endpoints (e.g., pricing, messaging, historical data)
- Enhanced XML/JSON conversion with schema validation
- Expand navigation guide with more examples
- Add more IEEE 2030.5 resource patterns
- Create video tutorials or walkthroughs
- Improve error documentation
- Unit tests for client functions
- Integration tests with mock IEEE 2030.5 servers
- End-to-end tests with MCP protocol
- Create an issue first (for larger changes)
- Implement your changes:
# Make your changes pnpm check:fix # Format and lint pnpm build # Test build pnpm debug # Test functionality
- Commit with conventional format:
git add . git commit -m "feat: add support for new IEEE 2030.5 endpoint" # or git commit -m "fix: resolve SSL certificate validation issue" # or git commit -m "docs: expand navigation guide with pricing examples"
- Push and create PR:
git push origin feature/your-feature-name
- Open a Pull Request with:
- Clear description of changes
- Screenshots/examples if applicable
- Reference to related issues
Understanding the codebase structure:
src/
βββ handlers/ # MCP request handlers
β βββ tools-handler.ts # Tool execution logic
β βββ prompts-handler.ts # Prompt serving logic
βββ prompts/ # MCP prompts
β βββ ieee2030-navigation-guide.ts
βββ services/ # Core business logic
β βββ config.ts # Environment configuration
β βββ ieee2030-5-client.ts # IEEE 2030.5 HTTP client
β βββ ieee2030-5-types.ts # TypeScript definitions
βββ tools/ # MCP tools implementation
β βββ ieee2030-connection-tools.ts
β βββ ieee2030-data-tools.ts
β βββ tool-registry.ts
βββ server.ts # MCP server setup
βββ index.ts # Entry point
- Be respectful and inclusive in all interactions
- Ask questions if you're unsure about anything
- Help others by reviewing PRs and answering issues
- Follow the code of conduct (be kind and professional)
- Open an issue for bugs or feature requests
- Start a discussion for questions or ideas
- Check existing issues before creating new ones
Thank you for contributing to the IEEE 2030.5 MCP Server! π
- Always use HTTPS in production
- Store certificates securely
- Set
IEEE2030_INSECURE=false
in production - Validate all server certificates in production environments
- Never commit
.env
files or certificates to version control
-
"IEEE2030_BASE_URL environment variable is required"
- Set the
IEEE2030_BASE_URL
environment variable
- Set the
-
"Certificate path or value is required"
- Set either
IEEE2030_CERT_PATH
orIEEE2030_CERT_VALUE
- Set either
-
SSL Certificate errors
- For development: Set
IEEE2030_INSECURE=true
- For production: Ensure proper certificate chain
- For development: Set
-
Connection timeouts
- Increase
IEEE2030_TIMEOUT
value - Check network connectivity
- Verify server URL and port
- Increase