An API client your coding agent can use over MCP

Claude Code, Codex and Cursor can call Gostman through MCP in place of improvised curl commands. They use the collection you already have, so requests, variables and environments are the ones your team reviewed.

gostman mcp

How secrets are handled

  • Requests use {{name}} placeholders; values are filled in inside Gostman
  • In everything the agent reads, variable values and credentials are replaced with their names
  • Agents can reach localhost, hosts your collection already uses and hosts you allow explicitly
  • Responses are capped and can be narrowed to the fields that matter

Limits

This guards against accidental leaks. It does not protect against a server that echoes a secret back in a transformed form.

Questions about coding agents and secrets

How do I let Claude Code call my APIs without it seeing my API keys?

Keep the key in a Gostman environment and use {{API_TOKEN}} in the request, then register the server with claude mcp add gostman -- gostman mcp --workspace /path/to/workspace. The agent calls send_request and reads {{API_TOKEN}}, while Gostman fills in the real value only when it sends the request.

Which hosts can the agent reach?

Only localhost, the hosts your own saved requests use and the hosts you pass with --allow-host. Requests the agent saves or imports do not add their hosts to that list.

Does it work with Cursor and Codex?

Yes. Any MCP client takes the same gostman mcp command.

Can the agent change my collection?

It can save new requests and checks, which land as YAML files you review in git diff. A save is refused when the request changed since the agent read it.

Use Gostman from a coding agent