Connect a client
An MCP client (Claude Code, Codex, claude.ai) connects to miDataworks' MCP server by itself. You approve it with one click in miDataworks, and you never copy or paste a secret. Each client gets its own credentials, so you can see each one and revoke any one without touching the others.
There is no account and no password. Whoever can open miDataworks can approve a client, exactly as they can approve any other request on the Approvals screen.
The steps, once per client
- Add the MCP address to the client:
https://mcp-dataworks.hitsai.net/mcp.- Claude Code:
claude mcp add --transport http midataworks https://mcp-dataworks.hitsai.net/mcp, then/mcp(orclaude mcp login midataworks). Remove anyAuthorizationheader you set for this server earlier: a client that sends the old token keeps using it. - Codex: add
[mcp_servers.midataworks]withurl = "https://mcp-dataworks.hitsai.net/mcp"to its configuration, then runcodex mcp login midataworks. Delete anybearer_token_env_varline and its environment variable. - claude.ai: add a custom connector with that address.
- Claude Code:
- The client opens a page in your browser: Waiting for approval. It names the client, its redirect address, the address it came from and your browser.
- Open miDataworks, Approvals. The request reads, for example, "Codex on 203.0.113.7 wants to use miDataworks's tools". Check that it is yours and click Approve.
- The waiting page continues by itself and returns you to the client, which is now connected.
Deny refuses it. A request nobody answers expires after 10 minutes. A denied client may ask again only after 10 minutes.
A warning badge says when the redirect address is not on the requesting machine. That is expected
for claude.ai (its address is https://claude.ai/api/mcp/auth_callback); for any other client,
approve only if you expect it.
Agents can never approve or deny a connection, and no MCP tool lists or decides one.
Connected clients
The Connected clients screen, beside Approvals, lists every client you approved: who approved it and when, and when and from where it was last used.
- Revoke ends that client at once: its next call is refused, and your other clients keep working. A revoked client can ask to connect again, which needs a new approval.
- A client is also revoked by itself when one of its one-time credentials is used twice (a sign-in code, or a renewal credential), because that means a copy exists somewhere else. The row says so.
The client renews its own access every hour. A client unused for 90 days must connect again.
A client that cannot connect itself
Add a client that cannot connect itself issues a key for one client. The key is shown once: copy it into the client then, because it cannot be shown again. The client sends it as its bearer token. The key is listed with the other clients and revoked the same way.
The old shared token
The single shared token that clients used before keeps working for a while, so nothing stops when
this changes. The MCP server's /health reports each use of it (legacy_mcp_token: whether it is
still in use, when it was last used, and from which address and client), so it is retired only once
no client uses it.
What is stored
Nothing a client could use is stored in a readable form: tokens, one-time codes and keys are kept only as their SHA-256 digest. Access lasts one hour, and each renewal replaces the renewal credential.