- MCP
- CLI
- Guides
Stophy CLI and MCP: two ways to give an agent web data
Set up the Stophy MCP server and the CLI: the server address, the MCP tools, the CLI command form, JSON output, paging, and when to use each.
An agent reads the web in one of two places. Inside a chat or a coding session, it calls tools. In a shell, it runs commands. Stophy has an MCP server for the first case and a CLI for the second. Both call the same endpoints, return the same data and use the same account.
The MCP server
The server address is https://mcp.stophy.dev/mcp. It uses OAuth, so you sign in with your browser and the setup has no API key. In Claude Code, add the server, then run /mcp, select stophy and select Authenticate.
In Codex, add the server and log in.
The agent gets these tools:
- stophy_search_endpoints finds endpoints from plain words, such as reddit posts or restaurant reviews. Each match has its id, its required inputs, its filters and its price.
- stophy_describe_endpoint returns the inputs and the output fields of an endpoint.
- stophy_call runs an endpoint by its id and returns the data with creditsUsed.
A question such as which mechanical keyboard people recommend becomes two calls. The agent calls stophy_search_endpoints and gets redditSearch. Then it calls stophy_call with these arguments:
fields keeps only the named keys of each result. A smaller response uses fewer tokens of the agent's context.
To use an API key, connect to https://api.stophy.dev/mcp and send the header Authorization: Bearer <key>. The same address works with no key for some endpoints, within a free daily limit.
The CLI
Install the CLI with npm, then log in with your browser. You need Node.js 20 or later. A standalone binary is at stophy.dev/cli.
A command has the form stophy <site> <command>. The filters of an endpoint are the options of its command.
- The output is markdown. Add --json to print the data as JSON. The CLI prints the credits used to stderr, so stdout holds only the data.
- Add -o <path> to write the output to a file.
- When more results exist, the output ends with a cursor. Run the same command with --cursor <cursor> to get the next page.
- stophy endpoints lists every command with its cost. stophy describe reddit.search shows the options of a command, its cost and an example.
With --json, the output is the data object of the API response. For a search, that object has a results list, so a script can read it with jq.
Which one to use
- Use MCP when the agent runs in an MCP client, such as Claude Code, Codex or Cursor, and selects the endpoint itself.
- Use the CLI in a script, a scheduled job or CI, and for an agent that has a shell but no MCP client.
- Use both on one machine. A call costs the same number of credits through either, and both use one balance.
Set up both with one command
stophy init logs you in, installs the agent skills and adds the MCP server to your agents. Add --all to run every step without a prompt.
The setup for each agent is at stophy.dev/mcp. The install steps for each system are at stophy.dev/cli.