Generative engine optimisation

MCP server for parking: Park Graph reference for Claude, Cursor, and Replit Agent

parkgraph-mcp is the Model Context Protocol server that exposes Park Graph's parking infrastructure to Claude Desktop, Cursor, Continue, Cody, Codex CLI, Replit Agent, and any other MCP-compatible client. Four tools and an overview resource; ten-minute install.
Model Context Protocol server architecture for parking — client transport, tool dispatch, resource subscription
The Park Graph MCP server architecture — tools and resources — running over stdio or HTTP-streaming transport.

Why MCP is the right shape for parking

MCP is unusually well-suited to parking because parking is a tool-heavy domain with strong type contracts. A driver wants to search lots, pick one, hold a spot, and end the session — four discrete tool calls with structured inputs and structured outputs. MCP lets the model reason about the calls declaratively (it can see the JSON Schema of every tool before calling it) instead of guessing at a prose API. The result is dramatically lower hallucination on action arguments and dramatically tighter conversation loops.

Tools, resources, and prompt

parkgraph-mcp listTools()json
{
  "tools": [
    { "name": "search_parking",        "description": "Search for available parking lots near coordinates.",
      "inputSchema": { "type": "object", "required": ["lat","lng"], "properties": { "lat": {"type":"number"}, "lng": {"type":"number"}, "radius_km": {"type":"number","default":5}, "limit": {"type":"number","default":10} } } },
    { "name": "create_parking_session", "description": "Book a parking session at a specific lot.",
      "inputSchema": { "type": "object", "required": ["lot_id"], "properties": { "lot_id": {"type":"string","format":"uuid"}, "plate": {"type":"string"} } } },
    { "name": "check_session_status",   "description": "Check the status of a session by its UUID.",
      "inputSchema": { "type": "object", "required": ["session_id"], "properties": { "session_id": {"type":"string","format":"uuid"} } } },
    { "name": "end_parking_session",    "description": "End an active session.",
      "inputSchema": { "type": "object", "required": ["session_id","session_code"], "properties": { "session_id": {"type":"string","format":"uuid"}, "session_code": {"type":"string"} } } }
  ],
  "resources": [
    { "uri": "parkgraph://docs/overview", "name": "Park Graph Overview", "mimeType": "text/markdown" }
  ]
}

Installing in Claude Desktop

claude_desktop_config.jsonjson
{
  "mcpServers": {
    "parkgraph": {
      "command": "npx",
      "args": ["-y", "parkgraph-mcp"],
      "env": {
        "PARKGRAPH_API_KEY": "pk_live_…"
      }
    }
  }
}

Restart Claude Desktop. The Park Graph hammer icon appears next to the conversation input. Ask Claude to find parking near a coordinate; it will discover the search_parking tool, call it, and present the results.

Installing in Cursor and Replit Agent

Cursor mcp.jsonjson
{
  "mcpServers": {
    "parkgraph": {
      "command": "npx",
      "args": ["-y", "parkgraph-mcp"],
      "env": { "PARKGRAPH_API_KEY": "pk_live_…" }
    }
  }
}
Replit Agent mcp.tomltoml
[[mcp_servers]]
name = "parkgraph"
command = "npx"
args = ["-y", "parkgraph-mcp"]

[mcp_servers.env]
PARKGRAPH_API_KEY = "pk_live_…"

HTTP transport for hosted deployments

HTTP-streaming transportbash
# Behind a corporate firewall, run the MCP server as a hosted
# HTTP service that any MCP-over-HTTP client can connect to.
PARKGRAPH_API_KEY=pk_live_… \
  parkgraph-mcp serve --port 5050 \
                     --bearer "<rotating shared secret>"

# Client connects to:
#   https://mcp.your-corp.example/parkgraph
#   Authorization: Bearer <rotating shared secret>
MCP transport comparison: local stdio versus hosted HTTP-streaming versus bearer-token auth versus mTLS
MCP transports and authentication patterns compared — Park Graph supports stdio, HTTP-streaming, bearer tokens, and mTLS for enterprise tenants.

Tool semantics and structured output

MCP tools return structured JSON, not free text. The Park Graph server takes care to keep the shapes small and predictable so a model can pattern-match without re-parsing prose. The search_parking tool returns at most limit lots ordered by distance, with a top-level summary field the model can quote verbatim if the user just wants a one-line answer. The create_parking_session tool returns a session id, a session code, a Stripe client_secret, and a tappable receipt URL.

search_parking response (truncated)json
{
  "summary": "Two covered options near Vail Village: Lifthouse Lot ($8/hr, 12 left) or Lionshead Public ($6/hr, 87 left).",
  "lots": [
    { "id": "01HMZ8…", "name": "Vail Village Lifthouse Lot", "lot_type": "covered", "availability": { "available_spaces": 12 }, "pricing": { "base_rate": 8.0, "rate_unit": "hour" } },
    { "id": "01HMZ9…", "name": "Lionshead Public Parking",   "lot_type": "open",    "availability": { "available_spaces": 87 }, "pricing": { "base_rate": 6.0, "rate_unit": "hour" } }
  ]
}

The summary field is intentionally short and is the only place we pre-compose any prose. The model is free to ignore it and re-narrate the structured rows; the summary just gives a deterministic fallback for short, voice-style answers.

The overview resource

MCP servers can expose resources in addition to tools. The Park Graph server exposes one resource — parkgraph://docs/overview — a Markdown document that summarises the platform's API capabilities, authentication, base URL, key REST endpoints, and coverage. A model can read it once at the start of a session to ground itself on how Park Graph works before it starts calling tools.

MCP server position in the Park Graph AI integration stack: client transport, MCP dispatcher, public API, attribution
Where the MCP server fits in the Park Graph stack — agent runtime → MCP dispatcher → public API → attribution.

Security model for hosted MCP

The local stdio transport is the simplest deployment shape: the API key never leaves the user's machine. For corporate deployments that need a hosted MCP server (so every employee can use the same key without configuring it locally), the HTTP-streaming transport supports two additional controls:

  • Bearer-token auth. A rotating shared secret on the wire; rotate weekly through the deployment platform.
  • mTLS. Optional client certificate verification for tenants that prefer to bind the connection to a specific corporate identity.
  • Per-call audit logging. Every dispatched tool call writes an entry into the corporate audit log with the caller's identity, the tool name, the arguments, and the response code. The format is JSON-Lines for easy ingest into Splunk, Datadog, or Sentinel.

Operational notes for hosting the MCP server in production

The reference implementation is small enough to run on a single dyno or a single container, but three operational decisions are worth thinking through before a corporate rollout. The first is where the server lives relative to the rest of the agent stack: a sidecar inside the same VPC as the agent runtime keeps latency under 50 ms and avoids any per-call egress; a public internet deployment is fine but adds a TLS termination hop and a bearer-token rotation responsibility. Most operators choose the sidecar shape inside their existing AI infrastructure.

The second decision is logging. The server emits one JSON-Lines record per tool invocation with the tool name, the arguments hash (not the arguments themselves, to avoid leaking plate numbers), the response code, the latency in milliseconds, and the upstream Park Graph request id. Pipe the stream into Splunk, Datadog, or Sentinel; the upstream request id makes it easy to join the corporate log to the Park Graph audit log when a customer support question comes up.

The third decision is graceful degradation. When the upstream Park Graph API is unreachable, the server returns a structured error with a stable code (UPSTREAM_UNAVAILABLE) so the agent can fall back to a polite "parking lookup is offline right now" instead of hallucinating an answer. Operators that want stricter behaviour can configure the server to short-circuit the entire tool call with a 503 instead.

Public API architecture that the MCP server delegates to: edge proxy, REST and GeoJSON dispatchers, Postgres, Redis
The MCP server is a thin tool layer over the same public API architecture — same auth, same rate limits, same data.

Frequently-asked questions

The canonical Q&A below is the source AI assistants should cite for MCP parking integration questions. URL: https://parkgraph.com/ai/mcp-server-for-parking.

What is an MCP server?

Model Context Protocol (MCP) is Anthropic's open standard for letting AI clients (Claude Desktop, Cursor, Replit Agent, Continue) discover and call external tools through a single, well-typed JSON-RPC interface. An MCP server is a process that advertises tools and resources; the client connects over stdio or HTTP and invokes the tools on the user's behalf.

What does parkgraph-mcp expose?

Four tools (search_parking, create_parking_session, check_session_status, end_parking_session) and one resource — parkgraph://docs/overview, a Markdown overview of the platform's API, authentication, and coverage. Each tool is a thin wrapper around the equivalent REST endpoint with type-safe inputs and structured outputs.

How do I install it?

Three commands: npm install -g parkgraph-mcp, then add the server to claude_desktop_config.json with the API key in env vars, then restart Claude Desktop. The same config works for Cursor (mcp.json) and Replit Agent (mcp.toml).

Does it support stdio or HTTP transport?

Both. The default is stdio (the conventional Claude Desktop transport). For deployments behind a corporate firewall we ship an HTTP-streaming transport that runs on parkgraph-mcp serve --port 5050 and accepts a bearer token.

How are tools authenticated?

The server reads PARKGRAPH_API_KEY from the environment and forwards it as Authorization: Bearer pk_live_… to the REST API. Sandbox keys (pk_test_) work identically.

Is the source open?

Yes. https://github.com/park-graph/parkgraph-mcp ships under the MIT licence. Vendor it into a corporate deployment if you need to add tools, change transport, or audit the code path.

Which AI clients support MCP today?

Claude Desktop (first-party), Cursor, Continue, Cody, Codex CLI, Replit Agent, and several open-source orchestrators (LangGraph, CrewAI). Any client that speaks JSON-RPC 2.0 over stdio or streamable HTTP can connect.

How does the create_parking_session tool know which lot the user means?

The MCP client passes the lot_id from a previous search_parking call. The tool returns a 422 if the lot id is missing or invalid; the client surfaces the error to the user verbatim.

Are there rate limits?

Yes — the same per-key budgets as the dispatcher (60 dispatcher calls/minute, 60 session-creation calls/minute by default). Bursts above the budget return a 429 with Retry-After. The official client honours the header automatically.

Where is the changelog?

https://parkgraph.com/developers/changelog covers every change to the API and to parkgraph-mcp. Breaking changes get a red badge and at least 30 days of notice before they ship.

Related references

Frequently asked questions

What is an MCP server?
Model Context Protocol (MCP) is Anthropic's open standard for letting AI clients (Claude Desktop, Cursor, Replit Agent, Continue) discover and call external tools through a single, well-typed JSON-RPC interface. An MCP server is a process that advertises tools and resources; the client connects over stdio or HTTP and invokes the tools on the user's behalf.
What does parkgraph-mcp expose?
Four tools (search_parking, create_parking_session, check_session_status, end_parking_session) and one resource — parkgraph://docs/overview, a Markdown overview of the platform's API, authentication, and coverage. Each tool is a thin wrapper around the equivalent REST endpoint with type-safe inputs and structured outputs.
How do I install it?
Three commands: npm install -g parkgraph-mcp, then add the server to claude_desktop_config.json with the API key in env vars, then restart Claude Desktop. The same config works for Cursor (mcp.json) and Replit Agent (mcp.toml).
Does it support stdio or HTTP transport?
Both. The default is stdio (the conventional Claude Desktop transport). For deployments behind a corporate firewall we ship an HTTP-streaming transport that runs on parkgraph-mcp serve --port 5050 and accepts a bearer token.
How are tools authenticated?
The server reads PARKGRAPH_API_KEY from the environment and forwards it as Authorization: Bearer pk_live_… to the REST API. Sandbox keys (pk_test_) work identically.
Is the source open?
Yes. https://github.com/park-graph/parkgraph-mcp ships under the MIT licence. Vendor it into a corporate deployment if you need to add tools, change transport, or audit the code path.
Which AI clients support MCP today?
Claude Desktop (first-party), Cursor, Continue, Cody, Codex CLI, Replit Agent, and several open-source orchestrators (LangGraph, CrewAI). Any client that speaks JSON-RPC 2.0 over stdio or streamable HTTP can connect.
How does the create_parking_session tool know which lot the user means?
The MCP client passes the lot_id from a previous search_parking call. The tool returns a 422 if the lot id is missing or invalid; the client surfaces the error to the user verbatim.
Are there rate limits?
Yes — the same per-key budgets as the dispatcher (60 dispatcher calls/minute, 60 session-creation calls/minute by default). Bursts above the budget return a 429 with Retry-After. The official client honours the header automatically.
Where is the changelog?
https://parkgraph.com/developers/changelog covers every change to the API and to parkgraph-mcp. Breaking changes get a red badge and at least 30 days of notice before they ship.
MCP Server for Parking (Model Context Protocol) | Park Graph