Skip to content

Connect an MCP client

DATAMIMIC exposes one project-scoped Streamable HTTP MCP endpoint:

1
https://<platform-base>/api/v2/mcp/projects/<project-id>

The URL identifies the project. The MCP client and FastMCP negotiate the protocol version. Do not configure a fixed MCP-Protocol-Version header.

First-party IDEs

The DATAMIMIC extension configures supported VS Code, Kiro, and Google Antigravity hosts. Do not add a second manual entry. The host-specific adapter owns only installation; all hosts receive the same DATAMIMIC instructions and project MCP contract.

Choose authentication

Use case Authentication
Interactive Codex or Claude Code Browser OAuth, recommended
CI, automation, or a client without OAuth Project access token

OAuth grants and project tokens are independent and can be revoked independently.

OAuth

Codex

Add the URL to ~/.codex/config.toml or a trusted project's .codex/config.toml:

1
2
[mcp_servers.datamimic]
url = "https://<platform-base>/api/v2/mcp/projects/<project-id>"

Then run codex mcp login datamimic and codex mcp list. Complete the browser login and project consent opened by Codex.

Claude Code

1
2
claude mcp add --transport http datamimic \
  https://<platform-base>/api/v2/mcp/projects/<project-id>

Use claude mcp get datamimic and /mcp to complete or inspect the browser OAuth flow.

Project access token

Create a token under Project Settings > Access Token. DATAMIMIC displays it once and shows ready-to-copy Codex, Claude Code, and generic HTTP configurations.

Store the token outside the client configuration:

1
DATAMIMIC_PROJECT_ACCESS_TOKEN=<one-time project token>

The generated configuration contains only this environment-variable reference and one stable, non-secret X-DATAMIMIC-Client-Binding. Use another binding for every runner, application, or client profile.

Codex with a project token

1
2
3
4
[mcp_servers.datamimic_project]
url = "https://<platform-base>/api/v2/mcp/projects/<project-id>"
bearer_token_env_var = "DATAMIMIC_PROJECT_ACCESS_TOKEN"
http_headers = { "X-DATAMIMIC-Client-Binding" = "<stable-client-uuid>" }

Claude Code with a project token

1
2
claude mcp add-json --scope local datamimic_project \
  '{"type":"http","url":"https://<platform-base>/api/v2/mcp/projects/<project-id>","headers":{"Authorization":"Bearer ${DATAMIMIC_PROJECT_ACCESS_TOKEN}","X-DATAMIMIC-Client-Binding":"<stable-client-uuid>"}}'

Never store the token in a repository, URL, log, screenshot, or shared configuration.

Inspect project data sources

When data-source capabilities are enabled:

  1. Call datamimic_list_environments.
  2. For DBMS, read metadata configuration first; scan only when metadata is absent.
  3. For MongoDB or object storage, browse first, scan one exact returned locator, poll the scan, then read the stored structural result.

DATAMIMIC exposes schemas, tables, columns, constraints, and nested field paths. These tools do not expose credentials or raw source values.

Rotate and verify

  1. Create a replacement token before deleting the current token.
  2. Update the client's secret source and reload the client.
  3. List the DATAMIMIC tools and make one non-mutating project call.
  4. Delete the old token only after the replacement works.

Deleting a local MCP entry does not revoke its server-side OAuth grant or project token.