About openchargemap-mcp-server
An MCP server for EV drivers and trip planners to find Open Charge Map stations, inspect station records, and review community reports on charger reliability. It combines coordinate-based search with reference lookup and explicit reliability details.
Key features
- 01Search by coordinates, area, connector, and network
- 02Retrieve full station records and access details
- 03Resolve filter names to reference IDs offline
- 04Review check-ins and reliability indicators
Use cases
- 01Find compatible chargers near a location
- 02Check access rules and station details before a trip
- 03Compare registry status with recent community reports
MCP support
Exposes station search, record lookup, reference resolution, and community comments as MCP tools, plus a station resource. Supports STDIO and Streamable HTTP transports.
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://openchargemap.caseyjhand.com/mcpclaude mcp add --transport http cyanheads-openchargemap https://openchargemap.caseyjhand.com/mcp{"mcpServers":{"cyanheads-openchargemap":{"type":"http","url":"https://openchargemap.caseyjhand.com/mcp"}}}Open in Cursor{"servers":{"cyanheads-openchargemap":{"type":"http","url":"https://openchargemap.caseyjhand.com/mcp"}}}Open in VS Code{"mcpServers":{"cyanheads-openchargemap":{"type":"http","url":"https://openchargemap.caseyjhand.com/mcp"}}}{"mcpServers":{"cyanheads-openchargemap":{"serverUrl":"https://openchargemap.caseyjhand.com/mcp"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
Tools
4| Parameter | Type | Required | Description |
|---|---|---|---|
| offset | integer | No | Matching stations to skip before the returned page, for reading past a truncated result. Repeat the same search with the nextOffset value the previous call reported. One search reaches at most 500 stations, so 499 is the deepest offset that can return one — narrow the area or add filters to reach stations beyond that. Ordering is by distance and stable, but Open Charge Map is edited continuously, so a station added or removed between pages can shift what a later offset lands on. |
| levelid | any | No | Charge level ID (1=Low <2kW, 2=Medium >2kW, 3=High >40kW/fast). Array OR-matched. Use 3 as a coarse "fast charging only" filter when a specific connector is not required. |
| distance | number | No | Search radius from the center point, in the unit given by distanceUnit (default km). Max 500. Keep small (5-25) for dense urban areas; widen for rural coverage. |
| latitude | number | No | Center latitude (WGS84 decimal degrees). Use with longitude + distance for a radius search. Resolve place names via openstreetmap_search_places first. |
| longitude | number | No | Center longitude (WGS84 decimal degrees). Use with latitude + distance for a radius search. |
| maxresults | integer | No | Maximum stations to return, ordered by distance from the search point. Max 200. |
| minpowerkw | number | No | Minimum charging power in kW across any connection at the station. Use ~50 for DC fast charging, ~150 for high-power DC. Stations whose fastest connection is below this are excluded. |
| operatorid | any | No | Operator/network ID, or array of IDs (OR-matched). Resolve a network name with openchargemap_lookup_reference (category "operators") — e.g. "Tesla", "ChargePoint". |
| boundingbox | object | No | Bounding-box search as an alternative to a center+radius. Mutually exclusive with latitude/longitude/distance — sending a boundingbox alongside a latitude or a longitude is rejected, not resolved in favour of one of them. |
| boundingbox.ne_lat | number | Yes | North-east corner latitude. |
| boundingbox.ne_lng | number | Yes | North-east corner longitude. |
| boundingbox.sw_lat | number | Yes | South-west corner latitude. |
| boundingbox.sw_lng | number | Yes | South-west corner longitude. |
| countrycode | string | No | Restrict to one country by ISO 3166-1 alpha-2 code (e.g. "US", "FR", "GB"). Omit for a global search. The server is global by default — there is no implicit country. |
| usagetypeid | any | No | Usage/access type ID, or array (OR-matched). Resolve via openchargemap_lookup_reference (category "usagetypes") — e.g. Public=1, Public-Pay At Location=5, Public-Membership Required=4. |
| distanceUnit | enum | No | Unit for the distance parameter and the returned distance values.KM | Miles |
| statustypeid | any | No | Registry operational-status ID, or array (OR-matched). Resolve via openchargemap_lookup_reference (category "statustypes"). NOTE: registry status is operator-reported and can be stale — combine with dateLastVerified and openchargemap_get_station_comments to judge real-world reliability, do not treat it as ground truth. |
| minchargepoints | integer | No | Minimum number of charge points (stalls) at the station. Filters out single-point locations when you need a station likely to have an open stall. |
| connectiontypeid | any | No | Connector type ID, or an array of IDs (OR-matched). Resolve names with openchargemap_lookup_reference — e.g. CCS (Type 2)=33, CHAdeMO=2, NACS/Tesla Supercharger=27, Type 2 socket=25, Type 1/J1772=1. |
Details
From the project README@cyanheads/openchargemap-mcp-server
Find EV charging stations worldwide by location and connector from the global Open Charge Map registry — full station detail, reference-ID resolution, and community reliability check-ins via MCP. STDIO or Streamable HTTP.
Public Hosted Server: https://openchargemap.caseyjhand.com/mcp
Overview
EV charging stations worldwide from Open Charge Map. Search by location, connector, and network, pull full station detail, and read community check-ins on whether a charger actually works.
Tools
| Tool | Description |
|---|---|
openchargemap_find_stations | Find charging stations near a point or within a bounding box, filtered by connector, power, network, usage, status, and charge points. Coordinate-native. |
openchargemap_get_station | Full record for one station by numeric OCM ID — every connection, operator, access rules, charge points, cost, media, and a computed reliability note. |
openchargemap_lookup_reference | Resolve connector/operator/usage/status/country names to the integer filter IDs find_stations needs. Served from a bundled snapshot — offline and instant. |
openchargemap_get_station_comments | Community check-ins for one station alongside the registry status and last-verified date, so registry-vs-reality mismatch is visible. |
Resources
| Resource | Description |
|---|---|
openchargemap://station/{id} | Full station record (with community comments) by numeric OCM ID — the URI-addressable twin of openchargemap_get_station. |
skill://openchargemap-guide/SKILL.md | Guide to recommending compatible, accessible chargers, assessing reliability evidence, and checking search coverage. Also ships with plugin, npm, Docker, and MCPB installs. |
All station data is also reachable via the tools; the station corpus (~200k locations, geo-scoped) isn't exposed as a listable resource, and reference data is served by openchargemap_lookup_reference rather than a resource.
Capability reference
openchargemap_find_stations tool
- Radius search (
latitude+longitude+distance,distanceUnitKMorMiles, max 500) orboundingbox— exactly one mode per call; optionalcountrycode(ISO 3166-1 alpha-2) and filtersconnectiontypeid,minpowerkw,operatorid,usagetypeid,levelid,statustypeid,minchargepoints(the ID filters take one integer ID or an OR-matched array, resolved viaopenchargemap_lookup_reference) maxresultscaps the page (default 25, max 200) andoffsetpages through a fixed cached pool of up to 500 candidates per search. A 501st record only detects an upstream remainder:totalCountis exact without that sentinel and a floor when it is present; thenoticesays which- No matches returns a successful empty list with search recovery guidance. Unknown country codes are not applied and are disclosed in the summary and notice. Fails with
invalid_location(no search area, half a center, or a coordinate beside aboundingbox),auth_failed, orupstream_unavailable
openchargemap_get_station tool
- Full record for one station by numeric OCM
id— every connection, operator/network, usage and access rules, charge-point count, usage cost, data provider, media, anddateLastVerified;includeCommentsadds every check-in inline, unpaged (useopenchargemap_get_station_commentsfor a heavily-commented station) reliabilityNoteis plain prose computed from observable facts (verification age, registry status, operational flag, fault-vs-positive check-ins), omitted when there is nothing to flag; fails withnot_found,auth_failed, orupstream_unavailable
openchargemap_lookup_reference tool
category(connectiontypes,operators,usagetypes,statustypes,currenttypes,levels,countries) plus an optional case-insensitivequerynaming a title, code, or alias ("CCS","Tesla Supercharger","FR"); omitqueryto browse the category (limitmax 100, default 25, paged viaoffset/nextOffset)- Returns the matching
id(s), thefilterParamthey feed intoopenchargemap_find_stations, andsource(liveorbundled) with asnapshotDate— answered offline from the bundled snapshot unlessOPENCHARGEMAP_REFERENCE_REFRESHrefreshed it at startup. A miss returns a successful empty list with spelling/browse guidance
openchargemap_get_station_comments tool
- Check-ins for one station by numeric OCM
id, newest first, each with rating, date, and recorded outcome —maxresultscaps the page (default 25, max 100), paged viaoffset/nextOffset;totalCommentscounts the station's whole set, andreliabilityNote's fault ratio is computed over all of it - Returns the registry status,
isOperational, anddateLastVerifiedbeside the comments; an emptycomments: []is not an error (no reports is not evidence the charger works); fails withnot_found,auth_failed, orupstream_unavailable
openchargemap://station/{id} resource
- Full record for one station by numeric OCM ID, community comments always included — the URI-addressable twin of
openchargemap_get_station, cached for 600 seconds, and not listable - Fails with
not_foundwhen the ID doesn't resolve to a station
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
Open Charge Map-specific:
- Type-safe client for the OCM v3 POI API with retry and session-scoped result caching
- Reference data (connectors, operators, usage/status types, countries) bundled as an offline snapshot — name→ID resolution needs no live
/referencedatacall, with an optional startup refresh to prevent drift - Curated connector aliases (
CCS,NACS/Supercharger,J1772,Type 2,CHAdeMO) so the names agents actually use resolve to the right IDs - Geocoding intentionally delegated — the server is coordinate-native and composes with any geocoding MCP server (e.g. the
openstreetmapserver'sopenstreetmap_search_places) rather than rebuilding place-name lookup - Stations are addressed by numeric OCM ID, discovered through
openchargemap_find_stations— the OCM API has no UUID lookup
Agent-friendly output:
- Reliability surfaced as first-class signal —
status,statusTypeId,isOperational, anddateLastVerifiedon every station, plus a plain-prosereliabilityNotederived only from observable facts (no fabricated confidence score) - Honest sparsity — heavily-omitted upstream fields are optional with "absence means unknown, not zero/false" descriptions; the server never invents data OCM didn't return
- Attribution to Open Charge Map contributors and station data providers on every response; per-station provider license terms and open-data flags when supplied
Getting started
Public Hosted Instance
A public instance is available at https://openchargemap.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP, with this client config:
{
"mcpServers": {
"openchargemap-mcp-server": {
"type": "streamable-http",
"url": "https://openchargemap.caseyjhand.com/mcp"
}
}
}
Self-Hosted / Local
Add the following to your MCP client configuration file. An Open Charge Map API key is required — see Prerequisites.
{
"mcpServers": {
"openchargemap-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/openchargemap-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"OPENCHARGEMAP_API_KEY": "your-api-key"
}
}
}
}
Or with npx (no Bun required):
{
"mcpServers": {
"openchargemap-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/openchargemap-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"OPENCHARGEMAP_API_KEY": "your-api-key"
}
}
}
}
Or with Docker:
{
"mcpServers": {
"openchargemap-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"-e", "OPENCHARGEMAP_API_KEY=your-api-key",
"ghcr.io/cyanheads/openchargemap-mcp-server:latest"
]
}
}
}
For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 OPENCHARGEMAP_API_KEY=... bun run start:http
# Server listens at http://localhost:3010/mcp
Prerequisites
- Bun v1.4 or higher (or Node.js v24+).
- An Open Charge Map API key — free instant signup: register an application at openchargemap.org. Sent as the
X-API-Keyheader on every request; the server fails fast at startup if it's unset.
Installation
- Clone the repository:
git clone https://github.com/cyanheads/openchargemap-mcp-server.git
- Navigate into the directory:
cd openchargemap-mcp-server
- Install dependencies:
bun install
- Configure environment:
cp .env.example .env
# edit .env and set OPENCHARGEMAP_API_KEY
Configuration
All configuration is validated at startup via Zod schemas in src/config/server-config.ts. Key environment variables:
| Variable | Description | Default |
|---|---|---|
OPENCHARGEMAP_API_KEY | Required. Open Charge Map API key, sent as the X-API-Key header. Free signup at openchargemap.org. | — |
OPENCHARGEMAP_BASE_URL | OCM API base URL. Override for a private mirror or testing. | https://api.openchargemap.io/v3 |
OPENCHARGEMAP_REFERENCE_REFRESH | When true, refresh reference data from the live /referencedata endpoint at startup, falling back to the bundled snapshot on failure. When false, stay fully offline on the bundled snapshot. | false |
OPENCHARGEMAP_CLAMP_LIMITS | Clamp oversized positive integer page sizes to the tool maximum (stations 200, comments/reference 100), with a notice, log and openchargemap.pagination.clamps counter. false restores rejection. Zero, negative and fractional sizes always reject. | true |
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_PORT | Port for the HTTP server. | 3010 |
MCP_AUTH_MODE | Auth mode: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (RFC 5424). | info |
LOGS_DIR | Directory for log files (Node.js only). | <project-root>/logs |
LOG_TOOL_FAILURE_PAYLOADS | Log each failed tool call's arguments and result, redacted by key name and capped at LOG_TOOL_FAILURE_PAYLOAD_MAX_BYTES (default 16384). A secret inside a free-form value is not redacted. | false |
STORAGE_PROVIDER_TYPE | Storage backend. | in-memory |
OTEL_ENABLED | Enable OpenTelemetry instrumentation (spans, metrics, completion logs). | false |
See .env.example for the full list of optional overrides.
Running the server
Local development
-
Build and run:
# One-time build bun run rebuild # Run the built server bun run start:stdio # or bun run start:http -
Run checks and tests:
bun run devcheck # Lint, format, typecheck, security, changelog sync bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
docker build -t openchargemap-mcp-server .
docker run --rm -e OPENCHARGEMAP_API_KEY=your-key -p 3010:3010 openchargemap-mcp-server
The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/openchargemap-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
| Directory | Purpose |
|---|---|
src/index.ts | createApp() entry point — registers tools/resources and inits services. |
src/config | Server-specific environment variable parsing and validation with Zod. |
src/data | Bundled Open Charge Map reference snapshot (ocm-reference-data.ts) — the offline source for ID resolution. |
src/mcp-server/tools | Tool definitions (*.tool.ts) plus the shared station schema and renderers. |
src/mcp-server/resources | Resource definitions (*.resource.ts). |
src/services/openchargemap | OCM POI API client, response normalization, attribution, and the reliability-note helper. |
src/services/reference-data | Reference-data service — snapshot loading, lookup indices, curated aliases, optional live refresh. |
tests/ | Unit and integration tests mirroring src/. |
Development guide
See AGENTS.md (and CLAUDE.md) for development guidelines and architectural rules. The short version:
- Handlers throw, framework catches — no
try/catchin tool logic - Use
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storage - Register new tools and resources in the
createApp()arrays - Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Attribution and data license
Charging-station, connector, and operator data is sourced from Open Charge Map, the community-maintained global registry of EV charging locations. License terms vary by data provider. Station records expose dataProviderLicense and isOpenDataLicensed when supplied; an unspecified license is unknown.
Station data © Open Charge Map contributors and the providers named on each station (openchargemap.org). License terms vary by provider.
Every tool response carries this attribution string, and the server restates it in its session-level instructions. Preserve attribution to Open Charge Map, its contributors, and each station's provider, and consult that provider's license terms before reuse. This server's own code is Apache-2.0 (below).
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run test
License
Apache-2.0 — see LICENSE for details. Open Charge Map data carries its own license; see Attribution and data license.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.