Connect Codex CLI to an MCP server over HTTP
On this page
To connect Codex CLI to the forge-mcp server, register one entry that points at its HTTP endpoint, https://forgegui.net/mcp. The keyword as written is missing the colon after https, so the URL will not parse until you correct it. Check the flags on your installed Codex CLI version before you rely on the command.
Correct the URL before you run anything
The keyword reads https followed by a space instead of https and a colon. Write the endpoint as https://forgegui.net/mcp. A URL without the scheme separator fails to parse, so the command either errors or leaves an entry that never connects.
Use the corrected form everywhere the endpoint appears, including the configuration file described below. A single wrong character in the URL produces the same symptom as a down server, so fix the string first.
Add the server from the command line
Run the add command with a name and the endpoint. The name forge-mcp becomes the label that Codex CLI uses for the server and its tools.
codex mcp add forge-mcp --url https://forgegui.net/mcpCommand flags change between releases. Run codex mcp add --help on your machine first. If your version does not accept --url for remote servers, use the configuration file method in the next section.
Write the configuration entry by hand
Codex CLI reads MCP server entries from its TOML configuration file. Add a table named after the server, then set the url key to the endpoint. We did not confirm public documentation for the configuration path, so check the path against the help output on your install.
[mcp_servers.forge-mcp]
url = 'https://forgegui.net/mcp'Save the file and start a new Codex CLI session. The new session reads the updated server list, and a session that was already running keeps the old list.
Name the server so tool calls read clearly
The table key becomes part of how the agent identifies the server. Pick a short name that describes the source, such as forge-mcp, and keep it stable. Renaming the key later changes the server identity in every session that loads the file.
Use lowercase letters and hyphens. The name appears in logs and in the tool list, so a readable name saves time when a call fails.
Confirm the connection works
List the registered servers first. Run codex mcp list if your version supports it. The forge-mcp entry should appear with the corrected https URL.
Then start a session and ask the agent to list the tools it can call from forge-mcp. Three checks confirm the setup:
- The entry shows the corrected https URL.
- A session lists at least one tool from the server.
- A sample tool call returns a result.
An empty tool list points to a discovery problem. An error on the first call points to network access or authentication.
Test the endpoint from the shell
Send a request to the endpoint before you involve the agent. A plain curl call separates network problems from configuration problems.
curl -sS -o /dev/null -w '%{http_code}' 'https://forgegui.net/mcp'A response code, even an error code such as 401 or 405, shows that the host answers on that path. A connection error or a DNS failure means the host did not answer. Fix the problem in your network or in the URL itself.
Troubleshoot common failures
Match the symptom to the cause before you change anything else.
- Parse error or no connection: check the https colon and the /mcp path.
- Connection refused or timeout: run the curl test above from the same machine.
- Unauthorized response: the server expects credentials. We found no public authentication details for forge-mcp on this page. Read the server's own documentation before you add headers or tokens.
- Entry present but no tools: restart the session and confirm that the table key matches the name you expect.
Trust a remote MCP server before you connect it
A remote MCP server runs its code on its own host. The agent sends the server prompts and tool arguments. That data leaves your machine when a tool runs.
Read the tool descriptions before you let an agent call them. Limit tool permissions where Codex CLI allows it. Start with read-only tools when you cannot confirm what a tool writes.
Keep tokens out of the URL and out of shared shell history. A token in a URL appears in logs, proxy records, and the command history of every user on the machine.
Live pricing — developer
Data source: live tool catalog snapshot, fetched 2026-11-23.
Chart data as a table
| Tool | Price per call | Cache-hit price |
|---|---|---|
| Usage Time Series | $0.0 | $0.0 |
| Per-Tool Usage Breakdown | $0.0 | $0.0 |
| Usage Summary | $0.0 | $0.0 |
| Discover Tools | $0.0 | $0.0 |
| Batch Tool Calls | $0.0 | $0.0 |
| Tool Quality Metrics | $0.0 | $0.0 |
| Tool Quality Rankings | $0.0 | $0.0 |
| List Programming Languages | $0.001 | $0.0001 |
| Check CVE ID Reservation Status | $0.001 | $0.0001 |
| Security Advisories (deps.dev) | $0.001 | $0.0001 |
| Dependency Tree (deps.dev) | $0.001 | $0.0001 |
| Package Info (deps.dev) | $0.001 | $0.0001 |
| Tool | Provider | Price/call | Cache-hit |
|---|---|---|---|
| Usage Time Series | account | $0 | $0 |
| Per-Tool Usage Breakdown | account | $0 | $0 |
| Usage Summary | account | $0 | $0 |
| Discover Tools | apibase | $0 | $0 |
| Batch Tool Calls | platform | $0 | $0 |
| Tool Quality Metrics | platform | $0 | $0 |
| Tool Quality Rankings | platform | $0 | $0 |
| List Programming Languages | judge0 | $0.001 | $0.0001 |
| Check CVE ID Reservation Status | cve-mitre | $0.001 | $0.0001 |
| Security Advisories (deps.dev) | depsdev | $0.001 | $0.0001 |
| Dependency Tree (deps.dev) | depsdev | $0.001 | $0.0001 |
| Package Info (deps.dev) | depsdev | $0.001 | $0.0001 |
Connect via MCP
Data source: gateway design, no measured values.
$ curl -X POST https://apibase.pro/api/v1/tools/account.timeseries/call \
-H "Content-Type: application/json" -d '{"params": {}}'FAQ
What does codex mcp add forge-mcp do?
Running the command registers a server named forge-mcp in the Codex CLI configuration, pointed at the endpoint you supply. Codex CLI discovers the tools that the server exposes in a later session.
Why does the keyword command fail?
Use https://forgegui.net/mcp instead. The keyword as written has https followed by a space, but the scheme needs https, a colon, and two slashes.
Does forge-mcp need an API key?
An unauthorized response from the endpoint means the server expects credentials. We found no public authentication details for forge-mcp on this page. Check the server's own documentation.
How do I remove the server?
Delete its table from the configuration file, or use a remove subcommand if your version provides one. Then confirm the removal with the list command.
Is forge-mcp part of the APIbase catalog?
This page does not confirm that. The keyword names the endpoint. We did not verify ownership or listing details here.
Recommended next step
- STEP 1/2 Connect your MCP client
- STEP 2/2 Browse the full catalog
Related guides
- effective context engineering for ai agents
- free api for testing
- google custom search api
- ai agents examples
Written with AI assistance from APIbase's published documentation and public data; checked automatically against them. Corrections: https://apibase.pro/
Published: 2026-11-23Source: live apibase.pro catalog snapshot