Repository navigation
Integration of MCP with Chatgpt #2035
Replies: 1 comment
|
You can connect OpenWA to ChatGPT, but not directly through the "Add custom MCP server" dialog on its own. OpenWA's MCP endpoint ( First, on the OpenWA side
Option 1: ChatGPT app through OpenAI's Secure MCP Tunnel OpenAI's
tunnel-client init --sample sample_mcp_remote_no_auth --profile openwa \
--tunnel-id tunnel_YOUR_ID --mcp-server-url http://127.0.0.1:2785/mcpUse OpenWA's real address if it's in another container or machine.
export CONTROL_PLANE_API_KEY="your OpenAI API key"
export OPENWA_API_KEY="your OpenWA key"
export MCP_EXTRA_HEADERS="X-API-Key: env:OPENWA_API_KEY"PowerShell: $env:CONTROL_PLANE_API_KEY = "your OpenAI API key"
$env:OPENWA_API_KEY = "your OpenWA key"
$env:MCP_EXTRA_HEADERS = "X-API-Key: env:OPENWA_API_KEY"
tunnel-client doctor --profile openwa --explain
tunnel-client run --profile openwa
I tested this route with a small MCP server that does the same key check as OpenWA (mcp-api-key-server, log and screenshot in the README). ChatGPT connected through the tunnel and every request arrived with the key. I haven't run it against OpenWA itself, so let me know if anything differs. The Secure MCP Tunnel guide has more on permissions and troubleshooting. Option 2: OpenAI Responses API (your own app) The Responses API lets you pass headers to an MCP server. Add this to your request's {
"type": "mcp",
"server_label": "openwa",
"server_url": "https://your-domain.com/mcp",
"headers": { "X-API-Key": "your_openwa_key" },
"require_approval": "always"
}OpenAI's servers make these requests, so a With Option 3: a local client that supports headers Claude Code and Cursor both let you set headers. Section 24.6 of the OpenWA doc has a ready One last thing if you turn on write tools: have the client ask before each write. Message text and group names come from other WhatsApp users, and OpenWA's docs warn that instructions hidden in them can steer the agent. |
Uh oh!
There was an error while loading. Please reload this page.
Hi Team, don't know how to connect OpenWA with chatgpt.
All reactions