Connect Codex to Docket
Docket verified the Codex CLI OAuth connection end to end on November 29, 2026. Use a current release and the full remote MCP endpoint; no directory installation is needed.
- In a terminal run
codex mcp add docket --url https://docketcrypto.com/mcp. If sign-in does not open automatically, runcodex mcp login docket. - Sign in to Docket and review the requested permissions. Start with read-only access; authorize case actions only if you want Codex to perform them.
- Launch Codex and ask it to list your existing Docket tax cases to check the connection.
In the Codex app, open Settings → MCP servers → Add server, select Streamable HTTP, name the server Docket and enter the same URL. Follow the OAuth sign-in prompts. The app and CLI share local MCP configuration; see the MCP instructions. Codex is available across ChatGPT plans subject to usage limits, and managed workspaces may restrict MCP servers.
For a bearer connection, create a scoped key in Docket Settings → Connected agents and configure Codex's MCP server to use the key through a secure environment variable or credential store. The bearer_token_env_var setting names the environment variable containing the token, not the token itself. Do not put the key in a prompt, command history, URL or Git.
A worked tax session
Say you have wallet addresses, a folder of exchange CSVs and no reliable basis for several older positions. You can work from the terminal without having Codex rewrite those files into a tax ledger. A session looks like this, using illustrative prompts rather than actual customer data.
- Check for an existing case. Ask 'Find my Docket tax cases, especially any case for 2026.' Codex uses
list_casesandget_case, and in a firm workspace callslist_clientsfirst to identify the client. - Supply the inputs. Ask 'Check coverage for these wallet networks and stage these exchange exports for Docket.' Codex calls
list_networks; if it can make authenticated HTTP uploads, use the records endpoint described below. With the case-actions grant, ask it to callstart_tax_casewith the wallet inputs and returned record batch, orattach_case_recordsfor an existing case. Usestart_investigation_caseinstead when the job is tracing funds or finding a missing transfer. - Provide the missing facts. Ask 'List the unanswered Docket questions and show which records are still needed.' Codex uses
list_questionsandget_case. Review each question and give the facts; it can useanswer_questionto submit an answer you authorize, or attach the additional records. - Approve in the browser. Ask 'Read my assessment and tell me when the quote is ready.' Codex reads
get_assessmentand pollsget_case. Docket gives you a free assessment and one fixed price. Sign in to Docket yourself to review, approve and pay before paid work begins. - Work through the published package. Ask 'Retrieve my completed tax workpaper and identify the source transactions for the entries I want to review.' Codex uses
get_packageanddownload_filewhere the generated files allow agent download. The Tax package contains a Form 8949 statement and an Excel workpaper tied to sources.get_findings,get_holdingsandget_activityread the case's findings, holdings and activity (transfers for Investigations). For problems, requestflag_case_problemwith permission to act instead of asking Codex to patch the ledger.
What the case status means
Ask the assistant to check get_case when you return to the conversation. The case.next_action field identifies who needs to act next; Docket does not push notifications to the assistant.
| Next action | What happens |
|---|---|
your_answers | Read the open questions and supply the missing context. |
your_records | Provide the requested records in Docket or attach them through the authorized connection. |
your_approval | Review the fixed quote in Docket's signed-in browser; only a person can approve and pay. |
wait | Docket is working; poll get_case for status. |
docket_review | Docket is reviewing the case; read stop_reason and poll get_case. |
complete | Read the published report and open the package files. |
unsupported, closed, needs_help | Read stop_reason and follow the case instructions instead of starting another job. |
Records and permissions
The connection defaults to read-only. Starting a Tax or Investigation assessment, answering questions, attaching records and sending feedback need explicit permission to act; the expanded case actions require case-actions-v1. An older connection that only authorizes answers needs a new grant for the expanded actions.
Upload exchange statements and other records in Docket on the web, or from a client that supports authenticated HTTP uploads, send a multipart POST to https://docketcrypto.com/mcp/records with the case-actions-authorized bearer credential and repeated files fields. The combined request limit is 1 GB including multipart overhead. Within one hour pass the returned id and digest as record_batch to the intake or attachment tool on the same connection; the files are not attached until the tool accepts them.
download_file can fetch generated package files marked for agent download, up to 20 MiB. Evidence archives and full packages containing original records, as well as larger files, open only through the signed-in browser link.
Who does the tax math?
Even a script that adds up an exchange export correctly can miss contract-level events, transfers and the acquisition lots that precede a disposal. A general model writing or revising that script has no decoded history or stable lot state of its own; changing its reconstruction can silently change the totals. Docket's chain engines reconstruct activity and build lots with transaction-level sources before the agent reviews them, as explained in should you let AI edit your crypto tax ledger?.
Cursor
For Cursor, add a Docket entry under mcpServers in your personal ~/.cursor/mcp.json with the URL https://docketcrypto.com/mcp, then sign in from Customize → MCPs. If asked for an OAuth client ID, use https://cursor.com/oauth/mcp-client.json; secure bearer headers with environment-variable interpolation are another documented option. Follow the MCP configuration instructions (the Cursor docs redirect there), and use the same assessment and review prompts above. Managed teams can restrict MCP servers.
Grok
Open Grok Connectors, choose New Connector → Custom, enter Docket's full MCP URL and follow the OAuth prompts. Business and Enterprise administrators must provision a custom connector before users can connect. See Grok's custom connector instructions. Cursor and Grok setup paths describe the vendors' documented custom connections, rather than verified Docket sessions.
Questions
The default OAuth connection is read-only, and API keys are scoped. The agent has only the access of the signed-in person and can never edit the ledger or pay for work. Revoke a connection or key in Docket Settings → Connected agents when you no longer need it.
Docket uses Ethereum archive data and reconstructs history across 26+ EVM networks, Solana, Bitcoin, TRON, Cosmos, NEAR and XRPL. Ask the assistant to call list_networks before starting a case if you need to check a specific network.
You do not need a Docket subscription. The connection and initial assessment are free; Docket quotes one fixed price for a case before you approve and pay in the browser. Your AI client's own plan and usage limits are separate.
Yes. Firm connections are off until an owner or partner enables them in Settings. Each connected agent works with its staff member's role and accessible clients. Use list_clients to find the client and pass their client_id when starting a case. Owners and partners can see and revoke staff connections.
Yes. Store it securely and reference an environment variable in the local MCP server configuration, or use OAuth instead. Never commit a key to a repository or ask Codex to print it.