Skip to main content

MCP-Server

Experimental

The MCP server is experimental and may change at any time.

With the Model Context Protocol (MCP for short), it is possible to give LLMs like Claude, Gemini, and ChatGPT structured access to external systems, such as evcc.

Start evcc with the MCP server enabled:

evcc --mcp

Usage with Claude Code

This example shows how you can use evcc with Claude Code via CLI. MCPs via HTTP are currently only available with the paid version. Of course, you can also use other LLMs like Gemini or ChatGPT.

  1. Install Claude Code according to the official guide.

  2. Create an empty folder for your test and navigate to this folder:

    mkdir evcc-mcp-test
    cd evcc-mcp-test
  3. Add evcc as an MCP server to your workspace:

    claude mcp add --transport http evcc http://localhost:7070/mcp
  4. Make sure your evcc instance is running with the MCP server:

    evcc --mcp
  5. Start Claude Code and enter a query.

    claude

    ╭──────────────────────────────────────────────────────────────────────────────────────────╮
    │ > Will I be able to fill my car with solar energy today? │
    ╰──────────────────────────────────────────────────────────────────────────────────────────╯
  6. By default, you will be asked before the system makes a request to evcc. You must confirm these requests.

Now you can watch Claude Code work and should ultimately receive a proper answer to your question. However, the above query will only work if you have configured a PV forecast.

Example: Creating a Charging Plan

Here you can see an example query where Claude creates a charging plan for the white Model 3. The Sonnet 4 model is used.

Demo Server

MCP is enabled on the demo server at demo.evcc.io. So you can also test directly with it:

claude mcp add --transport http evcc-demo https://demo.evcc.io/mcp

Since this instance is used by many people, the results may be unreliable.