Unoffical Polestar 2 MCP

Unoffical Polestar 2 MCP

An MCP (Model Context Protocol) server that exposes Polestar 2 vehicle data to AI assistants like Claude. Query your car's battery status, vehicle info, and health data through natural conversation.

Category
Visit Server

README

Polestar MCP Server

An MCP (Model Context Protocol) server that exposes Polestar 2 vehicle data to AI assistants like Claude. Query your car's battery status, vehicle info, and health data through natural conversation.

Disclaimer: This project uses an unofficial, reverse-engineered API and is not affiliated with or endorsed by Polestar. Use at your own risk. The API may change or break at any time.

Features

  • Battery & Charging Status — Current charge level, charging state, estimated range, time to full charge
  • Vehicle Information — Model details, VIN, registration number, software version, performance package
  • Vehicle Health — Fluid levels, tire pressure warnings, service alerts

Prerequisites

  • Python 3.10+
  • A Polestar account with a registered vehicle
  • Claude Desktop (or any MCP-compatible client)

Installation

# Clone the repository
git clone https://github.com/holger1411/polestar-mcp.git
cd polestar-mcp

# Create virtual environment
python -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt

Configuration

Copy the example environment file and fill in your credentials:

cp .env.example .env

Edit .env with your Polestar account credentials:

POLESTAR_USERNAME=your-email@example.com
POLESTAR_PASSWORD=your-password
POLESTAR_VIN=              # Optional: specify VIN if you have multiple vehicles
POLESTAR_LOG_LEVEL=INFO    # Optional: DEBUG, INFO, WARNING, ERROR

Claude Desktop Setup

Add the following to your Claude Desktop configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "polestar-mcp-server": {
      "command": "/path/to/your/venv/bin/python",
      "args": ["-m", "polestar_mcp_server"],
      "env": {
        "POLESTAR_USERNAME": "YOUR_EMAIL",
        "POLESTAR_PASSWORD": "YOUR_PASSWORD",
        "POLESTAR_VIN": "",
        "POLESTAR_LOG_LEVEL": "INFO",
        "PYTHONPATH": "/path/to/polestar-mcp/src"
      }
    }
  }
}

Available Tools

Tool Description
polestar_get_status Current battery level, charging state, range, and odometer reading
polestar_get_vehicle_info Static vehicle details (model, VIN, registration, specs)
polestar_get_health Vehicle health data (fluid levels, tire warnings, service alerts)

Architecture

  • Async-first — All API calls use httpx.AsyncClient for non-blocking I/O
  • OIDC/PKCE Authentication — Secure OAuth flow against Polestar's identity provider
  • Smart Caching — TTL-based caching (battery: 3 min, health: 30 min, vehicle info: 24 h)
  • Automatic Token Refresh — Handles expired tokens and re-authentication transparently
  • Retry Logic — Handles rate limits (429) and transient server errors (5xx)

Dashboard

A standalone HTML dashboard (polestar-dashboard.html) is included as a visual prototype. It is a static mockup and does not connect to the API.

License

MIT

Acknowledgments

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured