PrecisionDocs

MCP & Connectors — Developer Docs

Remote and local MCP servers, and how MCP tools map to REST operations.

How do I connect over MCP?

One MCP endpoint wraps the whole API: https://api.precisiondocs.ai/mcp, Streamable HTTP with OAuth 2.1 (dynamic client registration, PKCE S256, refresh-token rotation). The client opens your browser, you approve on the PrecisionDocs consent page, and the client holds a token scoped to your user and organization. No pd_live_ key is involved; the endpoint rejects one.

ClientSetup
Claude Codeclaude mcp add --scope user --transport http precisiondocs https://api.precisiondocs.ai/mcp, then /mcp -> precisiondocs -> Authenticate
OpenAI Codexcodex mcp add precisiondocs --url https://api.precisiondocs.ai/mcp, then codex mcp login precisiondocs
Gemini CLIgemini mcp add --transport http precisiondocs https://api.precisiondocs.ai/mcp, then /mcp auth precisiondocs (the command writes {"url": "https://api.precisiondocs.ai/mcp", "type": "http"} under mcpServers.precisiondocs in settings.json)
Cursor{"mcpServers":{"precisiondocs":{"url":"https://api.precisiondocs.ai/mcp"}}} in mcp.json, then sign in when Cursor asks
Claude app (claude.ai, Claude Desktop)Settings -> Connectors -> Add custom connector -> paste the URL -> Connect
Any other MCP clientThe URL alone. A client that only runs local stdio servers: npx -y mcp-remote https://api.precisiondocs.ai/mcp (the standard mcp-remote bridge, same browser sign-in)

Discovery for a custom client: /.well-known/oauth-protected-resource/mcp names the authorization server, /.well-known/oauth-authorization-server lists authorization_endpoint, token_endpoint, registration_endpoint and revocation_endpoint. Disconnect a client any time from Account -> Integrations -> Connected apps; that revokes its token and refresh token immediately.

A long agent turn never times out. precisiondocs_ask_agent submits the turn asynchronously (wait: false): the API answers 202 with a job_id, the turn runs on a worker, and the tool polls GET /v1/projects/{id}/messages/{job_id} for up to 90 seconds before handing the model that handle to keep polling - always under the proxy read timeout, so no more opaque 524s. REST callers get the same contract by sending wait: false; wait: true still runs the turn synchronously in one request. If a transport error ever still says the turn may be running, do not re-ask (a second ask would charge a second turn): list the project messages and read the newest turn.

MCP tools and their REST equivalents:

MCP toolREST operation
precisiondocs_plan_checkPOST /v1/plan-check
precisiondocs_resolve_parcelsPOST /v1/parcels/resolve
precisiondocs_preview_parcelsPOST /v1/parcels/preview (returned to the client as an MCP image block)
precisiondocs_create_projectPOST /v1/projects
precisiondocs_add_sourcePOST /v1/projects/{id}/sources, or POST /v1/projects/{id}/gis-sources when scope is given
precisiondocs_list_projectsGET /v1/projects
precisiondocs_get_projectGET /v1/projects/{id}
precisiondocs_verify_zoningPATCH /v1/projects/{id}/parcels/{i}/zoning
precisiondocs_ask_agentPOST /v1/projects/{id}/messages
precisiondocs_get_messageGET /v1/projects/{id}/messages/{turn_id}
precisiondocs_list_messagesGET /v1/projects/{id}/messages
precisiondocs_get_site_knowledgeGET /v1/projects/{id}/site-knowledge
precisiondocs_export_gisPOST /v1/projects/{id}/gis-exports
precisiondocs_create_mapPOST /v1/projects/{id}/maps
precisiondocs_get_site_planGET /v1/projects/{id}/site-plan
precisiondocs_get_design_criteriaGET /v1/projects/{id}/design-criteria
precisiondocs_get_yield_scenarioGET /v1/projects/{id}/yield-scenario
precisiondocs_export_site_planPOST /v1/projects/{id}/site-plan-exports
precisiondocs_list_workflowsGET /v1/projects/{id}/interview/workflows
precisiondocs_get_interview_stepGET /v1/projects/{id}/interview/step
precisiondocs_answer_interviewPOST /v1/projects/{id}/interview/answers
precisiondocs_search_projectPOST /v1/projects/{id}/search
precisiondocs_generate_reportPOST /v1/projects/{id}/reports
precisiondocs_get_reportGET /v1/projects/{id}/reports/{job_id}
precisiondocs_list_artifactsGET /v1/projects/{id}/artifacts
precisiondocs_get_artifactGET /v1/projects/{id}/artifacts/{artifact_id}
precisiondocs_get_walletGET /v1/wallet

File uploads (POST /v1/uploads/initiate then POST /v1/uploads/{job_id}/finalize) are REST-only; the MCP tools cover URL sources.

For step-by-step setup with copyable configs, use the in-app Account -> Integrations wizard or the Help Center connector guides.

Other API topics