DataMigrate Pro·AI and MCP
Connecting the DataMigrate Pro MCP to ChatGPT
This page shows how to use the DataMigrate Pro MCP server in ChatGPT and compares three routes: Secure MCP Tunnel, Responses API and a ChatGPT plugin.
This document describes how the DataMigrate Pro MCP server (DMP) can be used in ChatGPT. It complements the MCP Server Guide (local server, tools, security) and the Remote Access documentation (Azure gateway, Entra ID, listener relay).
As of: 07.11.2026, DMP 1.1.314.0. The ChatGPT side changes frequently; the authoritative sources are the OpenAI documents Add custom MCP server, Authentication, and Secure MCP Tunnel.
Summary
| Option | What ChatGPT connects to | Authentication | Status |
|---|---|---|---|
| A – Secure MCP Tunnel | local DMP.McpServer.exe (stdio) on the DMP machine, through the OpenAI tunnel |
none (trust through tunnel ID + workspace assignment) | recommended, usable immediately |
| B – Responses API / Playground | Azure gateway https://dmp-mcp-gateway.…azurecontainerapps.io/ |
Entra access token as bearer in the authorization field |
usable immediately (for scripts/agents, not for the ChatGPT interface) |
| C – ChatGPT plugin → Azure gateway (OAuth) | Azure gateway with the user's Entra sign-in | OAuth 2.1 (Authorization Code + PKCE), static Entra client | blocked – Entra discovery does not meet the ChatGPT requirements; gateway extension needed (see Option C) |
In all cases, the DMP protection mechanisms apply unchanged: Write and migration tools are active only with
--allow-write/--allow-migration or McpRelay.Allow*, and the preview hash and human approval remain
required. ChatGPT additionally respects the readOnlyHint annotation of the DMP tools: Tools without this annotation
are treated as write actions and must be confirmed in the chat.
Prerequisites on the ChatGPT side
- ChatGPT in the browser (chatgpt.com). Custom MCP servers are created under Plugins → "+" → Add custom MCP server. In Team/Enterprise workspaces, an admin must allow the addition of custom MCP servers.
- For Option A, additionally an OpenAI Platform account (API organization) with the permission Tunnels Read + Manage
(to create) or Read + Use (to use), plus an API key for the
tunnel-client. - For Option B, an OpenAI API key.
Option A – Secure MCP Tunnel to the local DMP.McpServer (recommended)
The tunnel-client runs on the DMP machine, opens an outbound HTTPS connection to api.openai.com, and
starts DMP.McpServer.exe as a stdio process. ChatGPT sends MCP calls to the tunnel endpoint hosted by OpenAI;
no inbound port is opened, and neither gateway nor listener is needed. The server runs in the context of the
Windows user who starts the tunnel-client (SQL with Integrated Security, DPAPI-protected settings.json).
A.1 Prerequisites on the DMP machine
C:\Migration\DataMigratePro\DMP.McpServer.exe(framework-dependent, .NET 8 runtime) next toDataMigratePro.exe, see MCP-Server-Guide §1. Start it manually once and check that… listening on stdio (profiles: …)appears on stderr.- Access to SQL Server and the DMP
settings.jsonof the desired profile. - Outbound HTTPS to
api.openai.com:443.
A.2 Create the tunnel
- In the Platform tunnel settings, create a tunnel
and note the
tunnel_id. - Assign the tunnel to the ChatGPT workspace in which the plugin is to be created (without the assignment, the tunnel does not appear in ChatGPT). For personal accounts, this is the personal Platform organization.
- Download the
tunnel-client(link in the tunnel settings or openai/tunnel-client).
A.3 Configure and start the tunnel-client
$env:CONTROL_PLANE_API_KEY = "<OpenAI-API-Key>" # nicht in Skripte oder das Repo schreiben
cd C:\Migration\DataMigratePro
.\tunnel-client.exe init `
--sample sample_mcp_stdio_local `
--profile dmp-nav6 `
--tunnel-id <tunnel_id> `
--mcp-command "C:\Migration\DataMigratePro\DMP.McpServer.exe --settings nav6-sandbox=C:\Migration\DataMigratePro\settings.json --profile nav6-sandbox --logs-dir C:\Migration\DataMigratePro\logs --data-dir C:\Migration\DataMigratePro\mcp\chatgpt"
.\tunnel-client.exe doctor --profile dmp-nav6 --explain
.\tunnel-client.exe run --profile dmp-nav6- Use a separate
--data-dirfor each ChatGPT connection (jobs, approvals, and audit log are stored there, separate from VS Code or the listener relay). - Specify additional profiles as additional
--settings name=pathpairs; enable write permissions only deliberately through--allow-writeand so on (see the switch table in the MCP Server Guide). For write actions with confirmation in the chat, also set--approval-mode chat(see the notes below). - The tunnel is reachable only while
tunnel-client runis running. For continuous operation, set it up as a scheduled task/service under the intended user account; the local admin interface of the client shows the status and connections. - DMP writes diagnostics to stderr and to
logs\DataMigratePro*.log; the audit trail is located in<data-dir>\audit.jsonl.
A.4 Create the plugin in ChatGPT
- chatgpt.com/plugins → + → Add custom MCP server.
- Enter a name (for example "DataMigratePro") and a description.
- Under Connection, choose Tunnel and select the tunnel or paste the
tunnel_id. - Authentication No authentication (the stdio server has no sign-in; access is limited through the tunnel ID,
workspace assignment, and the Windows account of the
tunnel-client). - Confirm the risk notice → Create as a plugin → check the tool list (40
dmp_*tools) → install the plugin.
A.5 Use
In the prompt, select @DataMigratePro or name the plugin explicitly. Examples:
Verwende das Plugin "DataMigratePro": Liste die DMP-Verbindungen (dmp_list_connections).Verwende "DataMigratePro": Zeige die Quellstruktur mit nameFilter "Customer" (dmp_get_source_schema)
und danach die Spalten der Tabelle Customer (dmp_get_source_columns). Keine anderen Tools verwenden.Verwende "DataMigratePro": Vergleiche Quelltabelle 18 mit dem BC-Ziel (dmp_compare_structures) und schlage
Mappings für die noch nicht zugeordneten Felder vor (dmp_propose_mapping). Nichts anwenden.Notes:
- Always narrow large results with
nameFilter,offset/limit, orminRows; the tunnel limits are 10 MiB per response and 120 s per call. Long operations (migration, reconciliation) continue in DMP as a job and are queried throughdmp_get_migration_status/dmp_get_reconcile. - After changes to tools or switches, run Refresh under the plugin in ChatGPT.
- Write actions ask for confirmation in ChatGPT; in addition, DMP requires the preview hash and an
approval according to
--approval-mode. ChatGPT reports elicitation capability but answers elicitation requests automatically with "declined" without displaying a form (audit:approval-elicitation accepted=false);elicitation/bothare therefore not usable in ChatGPT. Two variants work:--approval-mode chat(recommended for ChatGPT): DMP returns the token with the instruction to show the summary in the chat and to obtain the user's explicit confirmation; after the "yes", ChatGPT calls the tool again withapprovalTokenand the change is written. No file step. The confirmation is asserted by the agent (auditapproval-chat,assertedBy=agent), so use it only with a trusted client and a read-only default policy; the server warns at startup.--approval-mode file: DMP creates<data-dir>\approvals\<token>.request.json; the approval is given on the DMP machine by creating<token>.approvedwith exactly the contentAPPROVED(without a line break), for example[IO.File]::WriteAllText('<data-dir>\approvals\<token>.approved', 'APPROVED'). After that, ChatGPT calls the tool again withapprovalToken; the file is consumed. Stronger separation (a human on the DMP machine), but a media break for each write action. In both modes, tokens are valid for 30 minutes (--approval-ttl-minutes), are bound to the operation and preview hash, and can be used only once.
- In a conversation, OpenAI blocks repeated calls of the same tool annotated as destructive after
failed attempts ("blocked by the security checks", DMP receives no call). In this case, start a new
conversation and repeat the call there with
previewHashandapprovalToken; the approval file remains valid until the token expires. dmp_compare_structures,dmp_validate_mapping_sql, anddmp_apply_mappingrequire a source table registered inBC Migration Tables; register it first withdmp_apply_migration_table(preview → approval → apply).dmp_propose_mappingcan alternatively work withsourceTable(physical name) anddestinationTableNowithout registration.
Option B – OpenAI Responses API / Playground with the Azure gateway
For scripts, custom agents, or tests in the API Playground, the existing Azure gateway can be addressed directly. ChatGPT OAuth is not involved here; the caller supplies a valid Entra access token for the gateway scope.
# Token des angemeldeten Benutzers (Azure CLI ist am Gateway-Scope vorautorisiert; ~60–90 Minuten gültig)
$token = az account get-access-token --resource "api://<App-ID>" --query accessToken -o tsv{
"model": "gpt-5",
"tools": [
{
"type": "mcp",
"server_label": "dmp_gateway",
"server_url": "https://dmp-mcp-gateway.orangebeach-b7e7a55f.westeurope.azurecontainerapps.io/",
"authorization": "<Entra-Access-Token>",
"require_approval": "always"
}
],
"input": "Prüfe mit dmp_relay_list_listeners, welche DMP-Listener erreichbar sind, pinge den ersten (dmp_relay_ping) und liste dann über dmp_relay_call_tool mit toolName dmp_get_source_schema und nameFilter \"Customer\" die Quelltabellen."
}- In the Playground: Tools → Add → MCP Server, enter the URL, and store the bearer token under Authentication.
- The gateway provides only the relay tools (
dmp_relay_list_listeners,dmp_relay_ping,dmp_relay_list_tools,dmp_relay_call_tool,dmp_relay_job_status,dmp_relay_job_abort); DMP tools are run withconnectionIdandtoolNamethroughdmp_relay_call_tool. Responses are limited to 188 KB → filter/paginate. - The user or the client app needs an app role on the enterprise application DataMigrate Pro MCP Gateway
(
DMP.FleetAdminor a customer role according toDMP_GATEWAY_CONNECTIONS). For unattended agents, use a separate Entra app registration with client credentials and an Application app role instead of user tokens. - Never store the token in repos, prompts, or logs; it is full proof of access.
Option C – ChatGPT plugin with OAuth against the Azure gateway (currently blocked)
This would be the "clean" approach, analogous to VS Code: ChatGPT calls the gateway, receives 401 with a reference to
/.well-known/oauth-protected-resource, reads the Entra authority there, and runs Authorization Code + PKCE with the
user. The gateway already provides this metadata:
{"resource":"https://dmp-mcp-gateway.…/","authorization_servers":["https://login.microsoftonline.com/c4d0f475-…/v2.0"],
"scopes_supported":["api://<App-ID>/DMP.Tools"], …}Why it does not work at the moment
ChatGPT requires of the authorization server (according to the OpenAI Authentication documentation) that its discovery document
contain code_challenge_methods_supported with S256; if the field is missing, the MCP server is considered not supported.
The Entra discovery
https://login.microsoftonline.com/<tenant>/v2.0/.well-known/openid-configuration does not contain this field
(checked on 07.11.2026), and …/.well-known/oauth-authorization-server does not exist at Entra (404). In addition,
Entra offers neither Dynamic Client Registration nor client ID metadata documents; ChatGPT would therefore have to work with a
static client (client ID/secret), which ChatGPT does support but which does not
bypass the metadata check. Entra v2 now accepts the resource parameter (RFC 8707) at the authorize endpoint.
VS Code is not affected by this because it addresses Entra through its built-in Microsoft authentication provider and does not evaluate the discovery generically.
Required gateway extension (product development, open)
DMP.McpGateway would have to act as an OAuth facade in front of Entra:
- Have
authorization_serversin the protected resource metadata point to the gateway's own URL. - Serve
GET /.well-known/oauth-authorization-server(andopenid-configuration) withissuer= gateway URL,authorization_endpoint/token_endpointpointing to its own proxy endpoints,code_challenge_methods_supported: ["S256"],token_endpoint_auth_methods_supportedmatching the chosen client model, and optionallyregistration_endpoint(DCR, which maps internally to a fixed Entra app). - Forward
/authorizeto Entra (scopeapi://…/DMP.Tools, pass PKCE through, removeresource), proxy/tokento the Entra token endpoint, and return the Entra access token unchanged so that the existing JWT validation (audience, roles →connectionId) continues to apply. - Allow the ChatGPT redirect URIs in the Entra app registration of the facade
(stable:
https://chatgpt.com/connector_platform_oauth_redirect; otherwise the callback-specific URI shown on the ChatGPT plugin page). - Add tests in
DMP.McpRelay.Testsfor metadata, PKCE pass-through, and error cases.
Until then, use Option A for the ChatGPT interface and Option B for API use.
Entra preparation that makes sense regardless
- Create a separate app registration "DataMigratePro MCP – ChatGPT" (web platform, redirect URI from ChatGPT), with the client secret
in Key Vault and the API permission
DMP.Toolsof the gateway API; add it in the gateway API as an authorized client application (as already done for Azure CLI04b07795-…and VS Codeaebc6443-…, see Remote Access §6.3). - Assign users to the enterprise application DataMigrate Pro MCP Gateway (app role per customer or
DMP.FleetAdmin).
Security notes for all options
- Start with read-only only; activate
--allow-write,--allow-migration,--allow-source-profiling,--allow-source-queryor theMcpRelay.Allow*flags only after approval. - Prompt injection: Content from source/destination data can contain instructions. Do not blanket-select "remember for this conversation" for ChatGPT confirmations of write actions.
- Option A runs under the Windows account of the
tunnel-client; this account determines SQL permissions, file access (--allowed-path), and DPAPI decryption ofsettings.json. Do not use an admin account. - Do not put tokens, secrets, or tunnel API keys in repos, prompts, chat histories, or logs.
- For customer environments, use a separate tunnel ID or a separate Entra role/connection ID per customer.
Troubleshooting
| Symptom | Cause / Action |
|---|---|
| Tunnel does not appear in ChatGPT | Tunnel not assigned to the ChatGPT workspace, or creator without Tunnels Read + Use. |
| Plugin does not connect / no tools | tunnel-client run is not running or doctor reports errors; start DMP.McpServer.exe manually and check stderr (--settings path, .NET 8 runtime). |
Tool.ResultTooLarge (gateway) |
Result > 188 KB: set nameFilter, limit/offset, minRows. |
| Response aborts after 120 s (tunnel) | Start long-running operations as a DMP job and query the status tool; restrict preview/analysis to individual tables. |
Policy.*/"requires --allow-…" |
Tool is blocked by policy; enable it deliberately or use a read tool. |
| "Approval file must contain exactly APPROVED" | Approval file is empty or contains a line break; rewrite it with [IO.File]::WriteAllText(path, 'APPROVED'). |
| "Call blocked by OpenAI security checks" (no entry in the tunnel log) | ChatGPT-side block of repeated write calls; start a new conversation, reuse token/hash. |
Migration table 21 was not found during comparison/validation |
Source table not yet registered; apply dmp_apply_migration_table first. |
| OAuth sign-in in ChatGPT fails (Option C) | Expected – see Option C; use Option A or B. |