{
  "markdown": "<div align=\"center\">\n  <h1>@cyanheads/openchargemap-mcp-server</h1>\n  <p><b>Find EV charging stations worldwide by location and connector via the global Open Charge Map registry — full station detail, reference-ID resolution, and community reliability check-ins via MCP. STDIO or Streamable HTTP.</b>\n  <div>4 Tools • 1 Resource</div>\n  </p>\n</div>\n\n<div align=\"center\">\n\n[![Version](https://img.shields.io/badge/Version-0.1.8-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/openchargemap-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/openchargemap-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/openchargemap-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3-blueviolet.svg?style=flat-square)](https://bun.sh/)\n\n</div>\n\n<div align=\"center\">\n\n[![Install in Claude Desktop](https://img.shields.io/badge/Install_in-Claude_Desktop-D97757?style=for-the-badge&logo=anthropic&logoColor=white)](https://github.com/cyanheads/openchargemap-mcp-server/releases/latest/download/openchargemap-mcp-server.mcpb) [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=openchargemap-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvb3BlbmNoYXJnZW1hcC1tY3Atc2VydmVyIl0sImVudiI6eyJPUEVOQ0hBUkdFTUFQX0FQSV9LRVkiOiJ5b3VyLWFwaS1rZXkifX0=) [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22openchargemap-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads%2Fopenchargemap-mcp-server%22%5D%2C%22env%22%3A%7B%22OPENCHARGEMAP_API_KEY%22%3A%22your-api-key%22%7D%7D)\n\n[![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-67E8F9?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)\n\n</div>\n\n<div align=\"center\">\n\n**Public Hosted Server:** [https://openchargemap.caseyjhand.com/mcp](https://openchargemap.caseyjhand.com/mcp)\n\n</div>\n\n---\n\n## Tools\n\nFour tools across the find-and-detail surface — search, detail, offline ID resolution, and the community reliability layer:\n\n| Tool | Description |\n|:---|:---|\n| `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. |\n| `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. |\n| `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. |\n| `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. |\n\n### `openchargemap_find_stations`\n\nThe workhorse. Search the global registry by location, then narrow with filters.\n\n- Radius search (`latitude` + `longitude` + `distance`, in `KM` or `Miles`) or `boundingbox` — exactly one mode per call. A `boundingbox` sent alongside a `latitude` or a `longitude` is rejected rather than searched with the coordinate quietly dropped\n- Optional country scope via ISO 3166-1 alpha-2 `countrycode`; global by default, no implicit country\n- Filters: connector type, minimum power (kW), operator/network, usage type, charge level, operational status, minimum charge points — all integer IDs, single or OR-matched arrays\n- Resolve a connector or network name to its filter ID with `openchargemap_lookup_reference` first (e.g. `\"CCS\"` → `33`)\n- Each result carries title, address, distance, connections (type/power/current/count), operator, access rules, registry status, and `dateLastVerified`\n- `maxresults` caps the page (default 25, max 200), ordered by distance. A truncated page reports `nextOffset`; pass it back as `offset` for the next page. OCM has no offset parameter of its own, so paging runs over an over-fetched candidate page — reachable depth is 500 stations per search (`offset` 0–499), and `totalCount` is what the search retrieved rather than a registry-wide total (OCM publishes none). It is exact only when the candidate page came back short of its cap; otherwise it is a floor, and the notice says so\n- Local filters (`minchargepoints`, and the drop of OCM's 0,0 coordinate sentinels) run over that whole candidate page, so a match ranked past `maxresults` is not lost and a page emptied by filtering is reported as truncated, not as \"no stations\"\n- **Coordinate-native — does not geocode place names.** Resolve a place like \"Ballard, Seattle\" to coordinates with a geocoding server (e.g. the `openstreetmap` MCP server's `openstreetmap_geocode`) first, then pass them here\n\n---\n\n### `openchargemap_get_station`\n\nFull detail for one station by its numeric OCM ID (fetched with `verbose=true`).\n\n- Every connection: type, level, power, current, amperage, voltage, quantity\n- Operator and network, usage and access restrictions (pay-at-location, membership, access key), number of charge points\n- General comments, usage cost, data provider, submitted media, verification recency\n- Optional inline community check-ins with `includeComments`\n- Computes a plain-prose `reliabilityNote` from observable facts (verification age, registry status, operational flag, fault-vs-positive check-in counts) — no synthetic score; omitted when status is fresh and uncontested\n- A status of \"Temporarily Unavailable\" or \"Partly Operational (Mixed)\" raises a caveat of its own — OCM flags both operational, so the flag alone would read as all-clear on a station the operator has said is down\n- Obtain an ID from `openchargemap_find_stations`. UUID lookup is not supported by the OCM API.\n\n---\n\n### `openchargemap_lookup_reference`\n\nResolve Open Charge Map reference data to the integer IDs the `find_stations` filters require — served from a bundled snapshot, so it makes **no network call** (offline, instant).\n\n- Categories: `connectiontypes`, `operators`, `usagetypes`, `statustypes`, `currenttypes`, `levels`, `countries`\n- Pass a `query` to resolve a name, title, code, or alias (`\"CCS\"`, `\"Tesla Supercharger\"`, `\"ChargePoint\"`, `\"Public - Pay At Location\"`, `\"France\"`, `\"FR\"`) — case-insensitive, matched on title, formal name, and curated connector aliases\n- Omit the `query` to browse the whole category (up to `limit`, max 100). Browsing and querying both page: `totalCount` is the full match count, and a truncated page reports `nextOffset` to pass back as `offset` — every entry in a large category like `operators` (974) or `countries` (250) is reachable\n- Returns the matching `id`(s) plus the `filterParam` they feed and the vintage of the data actually served — `snapshotDate` with a `source` of `live` or `bundled`, so a fresh fetch is never mistaken for a freshly cut bundle\n- An optional startup refresh keeps the snapshot from drifting — see `OPENCHARGEMAP_REFERENCE_REFRESH` below. When it succeeds, `source` is `live` and `snapshotDate` is the day it ran; when it is off or it failed, `source` is `bundled` and the date is the bundle's own\n\n---\n\n### `openchargemap_get_station_comments`\n\nCommunity check-ins for one station — the honest reliability signal beyond the operator-reported registry flag.\n\n- Returns user comments and fault reports with ratings, dates, and the recorded check-in outcome (\"Charged Successfully\", \"Failed to Charge (Equipment Not Operational)\", …), newest first (`maxresults` caps the page, max 100)\n- One POI fetch carries every comment the station has, so `totalCount` is exact and `offset` (paired with the `nextOffset` a truncated page reports) reads the rest without a further upstream call\n- Every count states its population: `totalComments` is the station's whole set, the rendered header reads `2 of 6 comment(s)` when a page is only part of it, and `reliabilityNote`'s fault ratio is counted over the whole set so it does not move with `maxresults`\n- The check-in outcome is the charge-attempt result and drives fault detection — a failed charge counts even when it was filed as a plain comment\n- Surfaces the station's registry status, operational flag, and `dateLastVerified` alongside the comments so you can flag mismatches like \"listed operational, but recent check-ins report a fault\"\n- An empty result is **not** an error — a station with no check-ins returns `comments: []`; absence of reports is not evidence the charger works\n- Backed by the POI fetch with `includecomments=true` (OCM has no standalone comments endpoint)\n- Obtain a station ID from `openchargemap_find_stations`\n\n## Resource\n\n| Type | Name | Description |\n|:---|:---|:---|\n| Resource | `openchargemap://station/{id}` | Full station record (with community comments) by numeric OCM ID — the URI-addressable twin of `openchargemap_get_station`. |\n\nAll station data is also reachable via the tools. The station corpus (~200k locations, geo-scoped) is not exposed as a listable resource — discover stations with `openchargemap_find_stations`. Reference data is a resolve surface, not a stable-by-URI record, so it is served by `openchargemap_lookup_reference` rather than a resource.\n\n## Features\n\nBuilt on [`@cyanheads/mcp-ts-core`](https://www.npmjs.com/package/@cyanheads/mcp-ts-core):\n\n- Declarative tool and resource definitions — single file per primitive, framework handles registration and validation\n- Unified error handling — handlers throw, framework catches, classifies, and formats; typed error contracts with recovery hints\n- Pluggable auth: `none`, `jwt`, `oauth`\n- Swappable storage backends: `in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2/D1`\n- Structured logging with optional OpenTelemetry tracing\n- STDIO and Streamable HTTP transports\n\nOpen Charge Map–specific:\n\n- Type-safe client for the OCM v3 POI API with retry and session-scoped result caching\n- Reference data (connectors, operators, usage/status types, countries) bundled as an offline snapshot — name→ID resolution needs no live `/referencedata` call, with an optional startup refresh to prevent drift\n- Curated connector aliases (`CCS`, `NACS`/`Supercharger`, `J1772`, `Type 2`, `CHAdeMO`) so the names agents actually use resolve to the right IDs\n- Geocoding intentionally delegated — the server is coordinate-native and composes with any geocoding MCP server rather than rebuilding place-name lookup\n\nAgent-friendly output:\n\n- Reliability surfaced as first-class signal — `status`, `statusTypeId`, `isOperational`, and `dateLastVerified` on every station, plus a plain-prose `reliabilityNote` derived only from observable facts (no fabricated confidence score). Upstream values are passed through verbatim; where a status contradicts its own operational flag, the judgment lives in the note and the rendered text, never in the boolean\n- 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. An explicit `false` is a fact and reaches the text output, not just `structuredContent`\n- CC BY 4.0 attribution on every tool response and in the server-level instructions, per the data license\n\n## Getting started\n\n### Public Hosted Instance\n\nA 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:\n\n```json\n{\n  \"mcpServers\": {\n    \"openchargemap-mcp-server\": {\n      \"type\": \"streamable-http\",\n      \"url\": \"https://openchargemap.caseyjhand.com/mcp\"\n    }\n  }\n}\n```\n\n### Local / self-hosted\n\nAdd the following to your MCP client configuration file. An Open Charge Map API key is required — see [Prerequisites](#prerequisites).\n\n```json\n{\n  \"mcpServers\": {\n    \"openchargemap-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"bunx\",\n      \"args\": [\"@cyanheads/openchargemap-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\",\n        \"OPENCHARGEMAP_API_KEY\": \"your-api-key\"\n      }\n    }\n  }\n}\n```\n\nOr with npx (no Bun required):\n\n```json\n{\n  \"mcpServers\": {\n    \"openchargemap-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@cyanheads/openchargemap-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\",\n        \"OPENCHARGEMAP_API_KEY\": \"your-api-key\"\n      }\n    }\n  }\n}\n```\n\nOr with Docker:\n\n```json\n{\n  \"mcpServers\": {\n    \"openchargemap-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\", \"-i\", \"--rm\",\n        \"-e\", \"MCP_TRANSPORT_TYPE=stdio\",\n        \"-e\", \"OPENCHARGEMAP_API_KEY=your-api-key\",\n        \"ghcr.io/cyanheads/openchargemap-mcp-server:latest\"\n      ]\n    }\n  }\n}\n```\n\nFor Streamable HTTP, set the transport and start the server:\n\n```sh\nMCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 OPENCHARGEMAP_API_KEY=... bun run start:http\n# Server listens at http://localhost:3010/mcp\n```\n\n### Prerequisites\n\n- [Bun v1.3](https://bun.sh/) or higher (or Node.js v24+).\n- An Open Charge Map API key — free instant signup: register an application at [openchargemap.org](https://openchargemap.org/site/profile/applications). Sent as the `X-API-Key` header on every request; the server fails fast at startup if it's unset.\n\n### Installation\n\n1. **Clone the repository:**\n\n```sh\ngit clone https://github.com/cyanheads/openchargemap-mcp-server.git\n```\n\n2. **Navigate into the directory:**\n\n```sh\ncd openchargemap-mcp-server\n```\n\n3. **Install dependencies:**\n\n```sh\nbun install\n```\n\n4. **Configure environment:**\n\n```sh\ncp .env.example .env\n# edit .env and set OPENCHARGEMAP_API_KEY\n```\n\n## Configuration\n\nAll configuration is validated at startup via Zod schemas in `src/config/server-config.ts`. Key environment variables:\n\n| Variable | Description | Default |\n|:---|:---|:---|\n| `OPENCHARGEMAP_API_KEY` | **Required.** Open Charge Map API key, sent as the `X-API-Key` header. Free signup at [openchargemap.org](https://openchargemap.org/site/profile/applications). | — |\n| `OPENCHARGEMAP_BASE_URL` | OCM API base URL. Override for a private mirror or testing. | `https://api.openchargemap.io/v3` |\n| `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` |\n| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` |\n| `MCP_HTTP_PORT` | Port for the HTTP server. | `3010` |\n| `MCP_AUTH_MODE` | Auth mode: `none`, `jwt`, or `oauth`. | `none` |\n| `MCP_LOG_LEVEL` | Log level (RFC 5424). | `info` |\n| `LOGS_DIR` | Directory for log files (Node.js only). | `<project-root>/logs` |\n| `STORAGE_PROVIDER_TYPE` | Storage backend. | `in-memory` |\n| `OTEL_ENABLED` | Enable [OpenTelemetry instrumentation](https://github.com/cyanheads/mcp-ts-core/tree/main/docs/telemetry) (spans, metrics, completion logs). | `false` |\n\nSee [`.env.example`](./.env.example) for the full list of optional overrides.\n\n## Running the server\n\n### Local development\n\n- **Build and run:**\n\n  ```sh\n  # One-time build\n  bun run rebuild\n\n  # Run the built server\n  bun run start:stdio\n  # or\n  bun run start:http\n  ```\n\n- **Run checks and tests:**\n\n  ```sh\n  bun run devcheck   # Lint, format, typecheck, security, changelog sync\n  bun run test       # Vitest test suite\n  bun run lint:mcp   # Validate MCP definitions against spec\n  ```\n\n### Docker\n\n```sh\ndocker build -t openchargemap-mcp-server .\ndocker run --rm -e OPENCHARGEMAP_API_KEY=your-key -p 3010:3010 openchargemap-mcp-server\n```\n\nThe 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.\n\n## Project structure\n\n| Directory | Purpose |\n|:---|:---|\n| `src/index.ts` | `createApp()` entry point — registers tools/resources and inits services. |\n| `src/config` | Server-specific environment variable parsing and validation with Zod. |\n| `src/data` | Bundled Open Charge Map reference snapshot (`ocm-reference-data.ts`) — the offline source for ID resolution. |\n| `src/mcp-server/tools` | Tool definitions (`*.tool.ts`) plus the shared station schema and renderers. |\n| `src/mcp-server/resources` | Resource definitions (`*.resource.ts`). |\n| `src/services/openchargemap` | OCM POI API client, response normalization, attribution, and the reliability-note helper. |\n| `src/services/reference-data` | Reference-data service — snapshot loading, lookup indices, curated aliases, optional live refresh. |\n| `tests/` | Unit and integration tests mirroring `src/`. |\n\n## Development guide\n\nSee [`AGENTS.md`](./AGENTS.md) (and [`CLAUDE.md`](./CLAUDE.md)) for development guidelines and architectural rules. The short version:\n\n- Handlers throw, framework catches — no `try/catch` in tool logic\n- Use `ctx.log` for request-scoped logging, `ctx.state` for tenant-scoped storage\n- Register new tools and resources in the `createApp()` arrays\n- Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields\n\n## Attribution and data license\n\nCharging-station, connector, and operator data is sourced from **[Open Charge Map](https://openchargemap.org)**, the community-maintained global registry of EV charging locations, and is licensed under [**CC BY 4.0**](https://creativecommons.org/licenses/by/4.0/).\n\n> Station data © Open Charge Map contributors, licensed under CC BY 4.0 (openchargemap.org).\n\nAttribution is mandatory: every tool response carries this `attribution` string, and the server restates it in its session-level `instructions`. Any downstream use of the data must credit Open Charge Map and its contributors. This server's own code is Apache-2.0 (below); the license terms above apply to the **data**, not the software.\n\n## Contributing\n\nIssues and pull requests are welcome. Run checks and tests before submitting:\n\n```sh\nbun run devcheck\nbun run test\n```\n\n## License\n\nApache-2.0 — see [LICENSE](LICENSE) for details. Open Charge Map data carries its own license; see [Attribution and data license](#attribution-and-data-license).\n",
  "bytes": 19020,
  "sha": "8ea6134981c915b4eafc12ec7f6bf92dd332930bc672c5a9578f673d114dd32f",
  "repo_slug": "cyanheads/openchargemap-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_cyanheads_openchargemap_mcp_se_b54cb85c/readme"
}