Wirsam.EnergyMCP 1.0.0

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.

                    
dotnet tool install --global Wirsam.EnergyMCP --version 1.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Wirsam.EnergyMCP --version 1.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Wirsam.EnergyMCP&version=1.0.0
                    
nuke :add-package Wirsam.EnergyMCP --version 1.0.0
                    

🔥 Energy Sensor MCP Server

A Model Context Protocol (MCP) server for real-time energy and sensor data monitoring, analysis, and smart home integration. Perfect for heat pump monitoring, energy consumption tracking, and AI-powered home automation.

⚡ Features

  • 🏠 Real-time Energy Monitoring - Track heat pump and energy sensor data in real-time
  • 📊 Smart Analytics - Consumption patterns, efficiency analysis, cost calculations
  • 🤖 AI-Ready Integration - Works seamlessly with Claude, ChatGPT, GitHub Copilot, and other AI assistants
  • 🔌 GraphQL API Integration - Connects to sensor data APIs for live data access
  • 🌍 Cross-Platform - Windows, macOS, Linux support via .NET
  • 📈 Energy Insights - Trend analysis, anomaly detection, predictive maintenance

🚀 Quick Start

Installation

# Install as global .NET tool
dotnet tool install -g Wirsam.EnergyMCP

# Or install locally in your project
dotnet tool install Wirsam.EnergyMCP

Usage

# Start the MCP server (uses default sensor API)
energy-mcp-server

# With custom API endpoint
SENSOR_API_URL=https://your-sensor-api.com/graphql energy-mcp-server

# Check installation
energy-mcp-server --help

Connect to AI Assistants

Claude Desktop (.claude_desktop_config.json):

{
  "mcpServers": {
    "energy-sensors": {
      "command": "energy-mcp-server",
      "env": {
        "SENSOR_API_URL": "https://sensorapi-two.vercel.app/graphql"
      }
    }
  }
}

VS Code with GitHub Copilot (.vscode/mcp.json):

{
  "mcpServers": {
    "energy-sensors": {
      "command": "energy-mcp-server",
      "env": {
        "SENSOR_API_URL": "https://sensorapi-two.vercel.app/graphql"
      }
    }
  }
}

Installation & Usage

Option 1: Local Development

  1. Clone this repository
  2. Navigate to the project directory
  3. Build the project:
    dotnet build
    
  4. Configure VS Code by creating .vscode/mcp.json (see Configuration section)
  5. Use with GitHub Copilot in VS Code

Option 2: NuGet Package (when published)

  1. Search for the package on NuGet.org
  2. Copy the MCP configuration from the package's "MCP Server" tab
  3. Add to your .vscode/mcp.json file

Configuration

Environment Variables

  • SENSOR_API_URL (optional): GraphQL endpoint URL for the sensor data API
    • Default: https://sensorapi-cpbpps2rw-widos-projects.vercel.app/graphql

VS Code Configuration

Create .vscode/mcp.json in your workspace:

{
  "inputs": [
    {
      "type": "promptString",
      "id": "sensor_api_url",
      "description": "GraphQL API URL for sensor data",
      "password": false
    }
  ],
  "servers": {
    "SensorDataMCP": {
      "type": "stdio",
      "command": "dotnet",
      "args": [
        "run",
        "--project",
        "path/to/SensorDataMCP"
      ],
      "env": {
        "SENSOR_API_URL": "${input:sensor_api_url}"
      }
    }
  }
}

Usage Examples

Once configured in VS Code with GitHub Copilot, you can use natural language prompts:

  • "Show me all available sensor types"
  • "Get the current status of all sensors in location X"
  • "What are the latest readings from temperature sensors?"
  • "Show me any active alerts"
  • "Analyze the readings from sensor ABC123 for the last 24 hours"
  • "Find sensor with device ID DEV456"

GraphQL API Schema

This MCP server connects to a GraphQL API with the following main types:

  • SensorType: Defines types of sensors (temperature, humidity, etc.)
  • Location: Physical locations where sensors are deployed
  • Sensor: Individual sensor devices with metadata
  • SensorReading: Time-series data from sensors
  • Alert: System alerts and warnings

Development

Project Structure

SensorDataMCP/
├── Models/
│   ├── SensorModels.cs      # Data models for sensors, readings, etc.
│   └── GraphQLResponses.cs  # Response wrapper types
├── Services/
│   └── SensorApiService.cs  # GraphQL client service
├── Tools/
│   └── SensorTools.cs       # MCP tool implementations
└── Program.cs               # Application entry point

Building and Testing

# Build the project
dotnet build

# Run locally
dotnet run

# Pack for NuGet
dotnet pack -c Release

# Publish to NuGet
dotnet nuget push bin/Release/*.nupkg --api-key <your-api-key> --source https://api.nuget.org/v3/index.json

Troubleshooting

Common Issues

  1. "dnx command not found": Install .NET 10 Preview 6 or higher
  2. Tools not appearing: Check that the MCP server is configured correctly in VS Code settings
  3. API connection issues: Verify the SENSOR_API_URL environment variable

Debugging

Check VS Code's MCP server status in the settings to ensure the server starts successfully.

Publishing to NuGet.org

Follow the Microsoft guide for publishing MCP servers to NuGet:

  1. Update <PackageId> in the .csproj file to be unique on NuGet.org
  2. Update .mcp/server.json with your server configuration
  3. Run dotnet pack -c Release
  4. Publish with dotnet nuget push bin/Release/*.nupkg --api-key <your-api-key> --source https://api.nuget.org/v3/index.json

License

MIT License - see LICENSE file for details.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated

Initial release of Energy MCP Server v1.0.0
     - Real-time sensor data queries via GraphQL
     - Energy consumption analysis and visualization
     - Heat pump monitoring and efficiency tracking
     - Smart home integration ready
     - Support for 5 core tools: GetSensorTypes, GetLocations, GetAllSensors, GetSensorReadings, GetSpecificSensor