CLI & MCP
The Requestarium CLI runs saved requests and collections from a terminal or CI. It also includes an MCP (Model Context Protocol) server, so AI agents such as Claude Code, Cursor, VS Code Copilot Chat, or Claude Desktop can list, create, edit, and run your collections from plain-language prompts:
- "Run the Users API collection against Staging and tell me what failed."
- "Add a request that creates an order, with a test that the status is 201."
- "Why does Get user return 401?"
Requests are sent from your machine, so localhost, docker-compose, and VPN targets work.
Install
The CLI is published on npm as @requestarium/cli and installs one command, requestarium. It needs Node.js 20.10 or later:
npm install -g @requestarium/cli
requestarium --version
To try it without installing, prefix any command with npx: npx @requestarium/cli status. The CLI is free on every plan; the Free plan limits on collections and environments apply the same way as in the app, and running requests is never limited.
Sign in
Sign in through your browser:
requestarium login
requestarium status
login opens the Requestarium web app, where you approve the CLI. On a machine without a browser, create an API token in Settings → API tokens (see Account & security) and run requestarium login --token trt_…. The login is saved to ~/.config/requestarium/config.json (%APPDATA%\requestarium\config.json on Windows) with owner-only permissions. requestarium logout removes it.
In CI, use environment variables instead of login:
| Variable | Meaning |
|---|---|
REQUESTARIUM_TOKEN | API token (trt_…). |
REQUESTARIUM_PROFILE | Which saved login to use, when you keep several (requestarium profiles). |
REQUESTARIUM_API_URL | API URL. Default https://api.requestarium.com. |
REQUESTARIUM_WORKSPACE | Workspace name or id to use by default. |
REQUESTARIUM_ENVIRONMENT | Environment name or id. none runs without one. |
REQUESTARIUM_TIMEOUT_MS | Timeout when the request, folder, and collection don't set one. Default 30000. |
REQUESTARIUM_SCRIPTS | off skips pre-request and test scripts. |
Terminal and CI
requestarium collections
requestarium run "Get user" --env Staging --var userId=42
requestarium run-collection "Users API" --folder Smoke --env Staging --bail
requestarium run-collection "Users API" --iterations 3 --delay 500 --json > report.json
requestarium run-collection "Users API" --data users.csv --html report.html --save-run
requestarium runs "Users API"
run and run-collection exit with code 1 when a request fails, errors, or has a failed test, so they can gate a CI job. Add --junit results.xml for CI test views; inside GitHub Actions the results also appear in the job summary. Every command, option, the JSON format, and CI examples are in the CLI reference.
Connect an AI agent
Every client starts the same command, requestarium mcp, which speaks MCP over stdio.
Claude Code
claude mcp add requestarium -- requestarium mcp
Cursor, Claude Desktop, and other clients that use mcpServers:
{
"mcpServers": {
"requestarium": { "command": "requestarium", "args": ["mcp"] }
}
}
VS Code (.vscode/mcp.json, then Copilot Chat in Agent mode):
{
"servers": {
"requestarium": { "type": "stdio", "command": "requestarium", "args": ["mcp"] }
}
}
To check the connection, ask the agent: "Check that Requestarium is set up."
Over HTTP, for remote agents
Agents that can't start a process on your machine, such as cloud agents or a shared team box, can reach the same server over MCP's Streamable HTTP transport:
export REQUESTARIUM_MCP_TOKEN="$(openssl rand -base64 32)"
requestarium mcp --http --port 8765
The endpoint is http://127.0.0.1:8765/mcp. Every call needs the header Authorization: Bearer <token>, because the server uses your Requestarium login and sends requests from this machine. Without REQUESTARIUM_MCP_TOKEN the CLI makes a random token and prints it on start. Clients that take a URL connect like this:
{
"mcpServers": {
"requestarium": { "type": "http", "url": "http://127.0.0.1:8765/mcp", "headers": { "Authorization": "Bearer <token>" } }
}
}
| Option | Meaning |
|---|---|
--port N | Port to listen on. Default 8765; 0 picks a free one. |
--host ADDRESS | Address to listen on. Default 127.0.0.1, this machine only. Use 0.0.0.0 only behind HTTPS (a reverse proxy or a tunnel), since the server speaks plain HTTP. |
--allow-origin URL | Let a web page from this origin call the server (repeatable). Requests from any other browser origin are refused. |
Each client gets its own session with its own cookie jar (or the shared --cookie-jar file). Up to 32 sessions stay open; a session unused for 2 hours ends. Stop the server with Ctrl+C.
MCP tools
| Tool | What it does |
|---|---|
debug_info | Checks the token and API URL; lists workspaces, collections, and environments. |
list_collections | Collections as a tree of folders and requests. |
get_details | Full details of a collection, folder, or request. |
list_environments | Environments and their variable names. |
run_request | Sends one request and returns status, timing, headers, body, test results, and console output. |
run_collection | Runs a collection or folder and returns a per-request report. Can take data rows, save the run to the history, and report a failed run to Jira (jiraProject). |
list_runs | Saved runs of a collection or workspace: when, where from, branch, commit, and pass counts. |
create_collection, create_folder | Create a collection or folder. |
create_request, update_request | Save or change an HTTP or GraphQL request. |
delete_request | Permanently deletes a request. |
import_collection | Imports a Postman collection, an OpenAPI or Swagger document (JSON or YAML), a Requestarium export, or a curl command. |
export_collection | Returns a collection or folder as Requestarium JSON, OpenAPI 3, or Swagger 2. |
publish_to_confluence | Publishes a collection's docs to its Confluence page, the same page the app's Publish to Confluence uses. dryRun previews. |
generate_snippet | Code that sends a request, in curl, fetch, Python, Go, and eight more languages, with secrets masked. |
create_environment, set_environment_variable, delete_environment_variable | Create environments and change their variables. |
list_cookies, clear_cookies | Show the cookies responses have set while the server runs (values masked), or clear them to start a fresh session. |
Tools accept names as well as ids, and a request can be named by its path, such as Auth/Login.
Prompts
The server offers ready-made prompts, which most clients show as slash commands or in a prompt picker:
| Prompt | What it asks the agent to do |
|---|---|
test_collection | Run a collection, explain each failure, and suggest fixes. |
add_tests | Send each request once and write pm.test checks for status, timing, and the response body. |
import_api | Import a Postman collection, OpenAPI document, or curl command, then set up an environment for its variables. |
debug_request | Work out why one request fails, with a curl version if it helps. |
Privacy and safety
- Environment variable values are never sent to the agent. It sees variable names only. It can set values with
set_environment_variable; your MCP client asks you before each such call. - Secrets from AWS Secrets Manager, Azure Key Vault, and Google Cloud Secret Manager are fetched on your machine and masked like secret variables (see Secret managers).
- Credentials written directly in requests (bearer tokens, passwords, API keys,
AuthorizationandCookieheaders) are masked in tool results. - Response bodies are shown to the agent, cut at 50,000 characters. Don't run requests that return data you don't want the agent to see.
- Scripts run on your machine with your permissions. Only run collections you trust, or set
REQUESTARIUM_SCRIPTS=off. requestarium mcp --httpneeds a bearer token on every call and listens on this machine only unless you pass--host. Treat the token like a password: anyone with it can run your collections.
Limits
- HTTP and GraphQL requests only. Run gRPC and WebSocket requests in the app.
- Binary bodies and file uploads are not sent.
- Environment groups are managed in the app.