PrecisionDocs

API & Connectors — Help Center

Connect Claude Code, Codex, Gemini CLI, Cursor, the Claude app or any MCP client with one URL and a browser sign-in. No API key.

How do I connect Claude Code, Codex, Gemini CLI, Cursor or the Claude app?

Use Account -> Integrations. Every app connects the same way: one URL, one browser sign-in, no API key.

  1. Open Account -> Integrations and pick your app: Claude Code, Codex, Gemini CLI, Cursor, Claude app, or Other MCP client.
  2. Copy what the page offers for that app and run or paste it. The next article has the exact command per app.
  3. Tell the app to sign in. Your browser opens the PrecisionDocs consent page.
  4. Approve once. The app is connected and the PrecisionDocs tools are listed.

The app then appears under Connected apps on the same page, where Disconnect signs it out immediately.

What you are copying

  • Copy command - the one-liner that registers PrecisionDocs in Claude Code, Codex or Gemini CLI, plus the sign-in command that follows it.
  • Copy MCP config / Add to Cursor - the mcpServers.precisiondocs block, or the one-click install link.
  • Copy remote MCP URL - https://api.precisiondocs.ai/mcp, for the Claude app or any other MCP client.
  • Copy setup + agent prompt - the setup steps plus PrecisionDocs operating behavior, for the app's agent or project instructions area.

None of these contain a key. The only copyables that involve one sit under Advanced: API key, and that path exists for ChatGPT Actions and the REST API.

What happens behind the scenes

  • Every client uses the hosted https://api.precisiondocs.ai/mcp connector with PrecisionDocs OAuth, so no key is stored anywhere - not in the app, not in a config file, not in the URL.
  • The token the app holds is scoped to you: it sees only the projects you own or are shared into, expires after an hour, and refreshes silently for 30 days while the app is in use.
  • PrecisionDocs runs the civil-engineering agent server-side; the connected app calls the managed public API through the connector.

The agent prompt tells the connected agent to walk project creation like the wizard, poll the project until it is ready, ask for site and ordinance analysis, recover a slow turn by listing messages rather than re-asking, and never invent regulatory facts.

The endpoint-level reference - every route, tool, error and rate limit - lives in the developer documentation.

What is the exact setup for my app?

Every app registers the same URL and signs in through your browser. Only the command differs.

AppWhat to copyHow to sign in
Claude CodeCopy command: claude mcp add --scope user --transport http precisiondocs https://api.precisiondocs.ai/mcpRun /mcp inside Claude Code, choose precisiondocs, pick Authenticate
CodexCopy command: codex mcp add precisiondocs --url https://api.precisiondocs.ai/mcpRun codex mcp login precisiondocs
Gemini CLICopy command: gemini mcp add --transport http precisiondocs https://api.precisiondocs.ai/mcpRun /mcp auth precisiondocs inside gemini
CursorAdd to Cursor for the one-click install, or Copy MCP config into Settings -> MCP (mcp.json)Cursor marks the server as needing login - click it
Claude app (claude.ai or Claude Desktop)Copy remote MCP URL into Settings -> Connectors -> Add custom connectorClick Connect
Other MCP clientCopy remote MCP URLWhatever that client uses to authorize a remote server

In every case your browser opens the PrecisionDocs consent page. Approve once, then confirm the PrecisionDocs tools are listed before using them for project work.

Four things worth knowing:

  • Keep --scope user in the Claude Code command. It registers PrecisionDocs for every project; without it Claude Code adds it to the current folder only, so /mcp lists nothing elsewhere.
  • On Claude Team or Enterprise, an Owner or Primary Owner adds the connector from Organization settings -> Connectors before members can enable it.
  • The same connector serves claude.ai, Claude Desktop and Claude Code. There is no separate desktop config file.
  • Gemini Gems cannot use third-party actions the way ChatGPT can. Use Gemini CLI instead.

ChatGPT Custom GPT Actions is the one path that still needs an API key - see the next article.

How do I set up ChatGPT Custom GPT Actions?

ChatGPT Custom GPT Actions is the one setup that still uses an API key, because a GPT Action cannot open a browser to sign in. It lives under Advanced: API key on Account -> Integrations.

  1. Create a key on Account -> API keys and copy it while it is visible.
  2. In ChatGPT, create or edit a Custom GPT. You can paste Copy GPT setup prompt into the ChatGPT Create tab first and let the builder scaffold the GPT.
  3. Go to Configure -> Actions -> Create new action, click Import from URL, and paste https://api.precisiondocs.ai/v1/openapi.json (use Copy OpenAPI URL). Do not paste it into the large Schema editor.
  4. Set Authentication -> API Key -> Bearer and paste the key in that authentication field only.
  5. Paste https://precisiondocs.ai/privacy into the GPT Privacy policy field.
  6. Use Copy GPT instructions and paste the text into the GPT Instructions field. Do not paste the key into Instructions or into chat.

OpenAI documents GPT Actions, OpenAPI schemas, and API key bearer authentication here: https://help.openai.com/en/articles/9442513-configuring-actions-in-gpts.

How should I handle PrecisionDocs API keys and connected apps safely?

MCP clients - Claude Code, Codex, Gemini CLI, Cursor, the Claude app - never use a key. They sign in with your account and hold a token scoped to you. Account -> Integrations -> Connected apps lists them, and Disconnect revokes one immediately.

A key exists only for the REST API and ChatGPT Actions. Any active member of the workspace can create a key and revoke their own; owners see and can revoke every key in the workspace. A key is shown once when created or rotated; PrecisionDocs stores only a hash, so an existing key cannot be copied later.

Rules

  • Send a key only as the Authorization: Bearer header. Never put one in a URL, an MCP config, a chat message, Slack, email, a support ticket, a screenshot, a shared doc, or GPT Instructions.
  • In ChatGPT, paste the key only in Configure -> Actions -> Authentication.
  • Use Rotate if you lost the key or need a fresh copy, and Revoke immediately if a key is exposed.
  • The visible prefix, such as pd_live_abc..., is an identifier only. It is not enough to authenticate.

Limiting what one key can spend

A key can carry a daily and monthly credit cap, so a single integration cannot consume the whole wallet. The cap is enforced whenever the key is used: a key that hits it returns a cap-exceeded error while the rest of the workspace keeps working. There is no self-serve way to set a cap today - neither Account -> API keys nor the public API accepts one - so contact info@precisiondocs.ai to have a cap placed on a key.

What the API enforces regardless

  • Cross-organization project IDs return 404, not another tenant's data.
  • Every project path checks project access for the key's organization.
  • API activity is charged to the same workspace credit wallet as in-app work, and is labelled API or MCP in usage views.

Can I do everything through the API that I can in the app?

Yes, for the work that matters: all three surfaces - the browser wizard, Email my agent, and the API or an MCP connector - run the same project-prep checks before a project is created, and build the same project knowledge base after it.

What differs is the experience, not the rules:

  • Wizard is still the best surface for parcel selection, map review, file upload, and visual confirmation.
  • Email is asynchronous. It can create a project, and it asks follow-up questions in-thread when it needs a parcel choice, an ordinance decision, a GIS confirmation, or a duplicate-parcel approval.
  • API and connectors are programmable. Project creation returns the same confirmation prompts as the wizard, so a connected agent can put the decision to you instead of skipping it.

A connector that skips a confirmation is not taking a shortcut the wizard offers - the API returns the same prompt and expects the same answer.

What is the normal API workflow?

The API is built around a project knowledge base plus managed agent turns:

create project -> poll readiness -> ask the agent -> download artifacts
  1. Create or preview a site. Project creation runs the same parcel resolution, ordinance discovery and source confirmations as the wizard, and can return a preview and a credit estimate before it commits.
  2. Poll readiness. Building the knowledge base takes minutes on a new site. Poll the project until it reports that chat is ready rather than asking early.
  3. Ask the agent. Answers come back grounded, with citations, the tools used, and any artifacts the turn produced. A long turn can run in the background and be collected by its job handle instead of holding the request open.
  4. Download artifacts. Reports, maps, exhibits and exports come back as artifacts with short-lived signed links you can refresh.

For a brand-new site, the first useful question waits on the knowledge base. Later questions reuse it and are much faster.

Every endpoint, MCP tool, request field, error code and rate limit is documented in the developer documentation, and the machine-readable schema is at https://api.precisiondocs.ai/v1/openapi.json.

How do I connect a client that is not on the list?

The Integrations page covers the first-class clients. Use these details when you are wiring up something else.

  • Remote MCP endpoint: https://api.precisiondocs.ai/mcp, Streamable HTTP with OAuth 2.1 - dynamic client registration, PKCE S256, refresh-token rotation. Discovery lives at /.well-known/oauth-protected-resource/mcp and /.well-known/oauth-authorization-server.
  • A client that only runs local servers bridges with npx -y mcp-remote https://api.precisiondocs.ai/mcp. The bridge runs the same browser sign-in.
  • OpenAPI schema: https://api.precisiondocs.ai/v1/openapi.json.
  • REST authentication: Authorization: Bearer with a key from Account -> API keys. The MCP endpoint rejects a key - it authenticates with OAuth only.

Use MCP when the client prefers tool calls. Use OpenAPI when the client has native action, connector, or function import.

The tool roster, every REST route, and the error and rate-limit reference are in the developer documentation.

Continue reading

Other help topics