Connect an MCP server to Claude, ChatGPT, Codex, Cursor and OpenCode (exact steps)
Every AI app has its own way to add an MCP server, and the docs for each live in a different place. This is the short version: the same remote server, five clients, the exact steps for each. The worked example is the SVG Lab MCP at https://svglab.app/mcp , which houses SVG Lab's Design Engine and lets the AI you connect design app screens, icons, illustrations and charts. The steps below come…
Connecting an MCP (Machine Control Protocol) server to various AI platforms like Claude, ChatGPT, Codex, Cursor, and OpenCode involves a series of steps tailored to each platform. The process is consistent across all except for minor differences in configuration and authentication methods.
For Claude, one must first navigate to its customization settings and then find the Connectors option. Here, a custom connector can be added by providing the server's URL, https://svglab.app/mcp. OAuth client ID and secret can be left empty during this initial setup. Upon successful addition and connection, signing in to SVG Lab and approving the connection within Claude will enable its use.
ChatGPT requires the user to be in Developer mode, which is accessible through the settings by selecting Security and enabling the Developer mode. After enabling, a developer mode app needs to be created within the ChatGPT platform itself, specifying the SVG Lab MCP server URL and OAuth authentication. Once created, signing in to the SVG Lab server and approving the connection within ChatGPT will complete the setup, allowing the user to interact with SVG Lab directly from ChatGPT.
Codex offers a straightforward command-line addition of the MCP server by using the command `codex mcp add svglab --url https://svglab.app/mcp`. This command is inserted into the `~/.codex/config.toml` configuration file, where the server details are specified under the `svglab` key. Authenticating and approving the connection in Codex will enable its use.
Cursor users need to create or edit their `~/.cursor/mcp.json` configuration file, specifying the server URL under the `svglab` key. Opening Cursor settings, locating the `svglab` entry in the MCP list, signing in, and approving the connection will finalize the setup, allowing Cursor to integrate with SVG Lab.
OpenCode requires a similar approach, where the server configuration is added within the `~/.config/opencode/opencode.json` file. The `svglab` server entry is specified with the `type` set to `remote` and the `url` set to the server's URL. Running `opencode mcp auth svglab` initiates the authentication process, which involves approving the connection in OpenCode. Once authenticated, the user can start using SVG Lab within OpenCode.
For those using an API key instead of OAuth, a bearer token is generated in the SVG Lab account menu under MCP settings, and this key is sent as a header in the request. This method is useful when OAuth authentication is not supported by the client.
In addition to these platforms, the guide also covers connecting an MCP server to VS Code with GitHub Copilot, Windsurf, and the Gemini CLI, as well as providing tips on common setup issues and a FAQ section for troubleshooting.
Each of these platforms requires a unique approach to integrating with the SVG Lab MCP server, but the core steps remain consistent, involving server URL specification, authentication setup, and approval of the connection within each respective AI platform.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.