home / mcp / ev assistant mcp server

EV Assistant MCP Server

Provides EV charging station data, EV trip planning, and PDF resource management via an MCP server.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "abiorh001-mcp_ev_assistant_server": {
      "command": "/home/$USER/path/mcp_learning/.venv/bin/python",
      "args": [
        "/home/$USER/path/mcp_ev_assistant_server/ev_assistant_server.py"
      ],
      "env": {
        "GOOGLE_MAP_API_KEY": "your_google_map_api_key",
        "OPENCHARGE_MAP_API_KEY": "your_opencharge_map_api_key"
      }
    }
  }
}

You can run the EV Assistant MCP server to manage charging stations, plan EV-friendly trips, and handle PDF resources with real-time updates. This server combines location-based charging data, route optimization, and document management into a single, extensible MCP. You install it, configure API keys for mapping services, start the local server, and interact with its tools to search charging points, plan routes, and manage EV-related resources.

How to use

Start the server in your environment and connect your MCP client to the local process. You will interact with two core tools: one that locates nearby charging stations and one that plans EV-friendly routes. Use the tools to search for charging points by location and socket type, and to generate routes that include charging stops based on range and current charge. You can also subscribe to PDF resources and perform text extraction on EV manuals or guides for offline access.

How to install

{
  "mcpServers": {
    "ev_assistant": {
      "command": "/home/$USER/path/mcp_learning/.venv/bin/python",
      "args": ["/home/$USER/path/mcp_ev_assistant_server/ev_assistant_server.py"],
      "env": {
        "OPENCHARGE_MAP_API_KEY": "your_opencharge_map_api_key",
        "GOOGLE_MAP_API_KEY": "your_google_map_api_key"
      }
    }
  }
}

Configuration

Prepare API keys for mapping and charging data access. Create a file named .env in your project root and populate it with your OpenChargeMap and Google Maps API keys. Use the provided server configuration snippet to wire the environment variables into the MCP server process.

Example environment variable setup in a JSON server configuration looks like the following. This config runs the Python MCP server from a local virtual environment and passes necessary API keys to the process.

{ "mcpServers": { "ev_assistant": { "command": "/home/$USER/path/mcp_learning/.venv/bin/python", "args": ["/home/$USER/path/mcp_ev_assistant_server/ev_assistant_server.py"], "env": { "OPENCHARGE_MAP_API_KEY": "your_opencharge_map_api_key", "GOOGLE_MAP_API_KEY": "your_google_map_api_key" } } } }

Usage notes

Start the server with the configured Python command from your terminal. The included tools handle charging station discovery and EV trip planning. Manage resources and subscriptions through the provided interfaces to keep up with updates to PDFs and manuals.

Resource management and prompts

The server automatically discovers PDF resources in the Data directory and supports text extraction with fallback methods. You can subscribe to resources to receive real-time updates and unsubscribe when needed.

Error handling and development

The server includes input validation and robust error logging to help diagnose issues with charging data or route planning. In development, you can extend the available tools by adding new tool implementations under the agentTools directory and updating the core schemas accordingly.

Contributing and license

Contributing follows common open source practices: fork, create a feature branch, implement, and open a pull request. This project is licensed under the MIT License.

Available tools

charge_points_locator

Find EV charging stations near a location by address, radius, and socket type.

ev_trip_planner

Plan an EV-friendly route between a start and destination, considering charging stops and socket types.