This project is a Model Context Protocol (MCP) server implemented in TypeScript using the @modelcontextprotocol/sdk. It provides full CRUD tools for Requestly rules and groups, and can be run as a stdio MCP server.
- Create, read, update, and delete Requestly rules
- Create, read, update, and delete Requestly groups
- Attach rules to groups
- Run as a stdio MCP server for integration with VS Code or other MCP clients
delete_rule and delete_group ask you to approve every delete before anything is removed. The approval prompt comes from your MCP host (for example Claude Code or VS Code) through MCP elicitation, so the AI model can't approve a delete on your behalf.
- If you decline, cancel, or don't answer within 5 minutes, nothing is deleted.
- If your host doesn't support elicitation, these tools can't delete; delete the rule or group in the Requestly app instead.
- Deleting a group keeps the rules inside it; they stay in your workspace without a group.
Script, Request and Response rules carry code that runs in your browser: inline scripts, script URLs (and their tag attributes), and request or response bodies. When the AI creates such a rule, or changes its code, your MCP host asks you to accept the code before anything is saved. When it changes code, you see the old code and the new code.
- MCP hosts show only a few lines of a prompt (Claude Code shows 3). One short line of plain code (60 characters or fewer) is shown in the prompt itself. Anything else is written to a private file under
~/.requestly-mcp/review/, which opens in your default text editor and is named in the prompt. Read it there, and edit it if you like: what the file holds when you click Accept is what gets saved (keep its marker lines). The file is deleted afterwards. SetREQUESTLY_MCP_OPEN_REVIEW_FILE=0to stop it opening automatically. - If you decline, cancel, or don't answer within 5 minutes, nothing is saved.
- Turning a rule on or off, renaming it, or changing which URLs it matches does not ask: it never adds code you haven't seen.
- If your host doesn't support elicitation, rules with code can't be created or edited here; use the Requestly app. Other rules work as before.
- When updating a rule, any field you leave out keeps its saved value.
Anyone who can edit your workspace can write rule and group names, descriptions, URLs and code, so that text could carry instructions aimed at an AI model ("ignore your instructions and ..."). Every tool returns the Requestly API's data inside an <untrusted-data-...> block, with a new random tag on each call and a warning before and after it. The server's instructions tell the host to treat that block as data only.
- Inside the block is the API's JSON. Invisible characters (zero-width, bidi, Unicode tag characters) are written as
\uescapes, so hidden text shows up; the JSON still parses to the same data. - The tool output is no longer bare JSON. If a script parses it, read the JSON between the tags.
- This lowers the risk; it can't guarantee a model ignores planted text. Deletes and code in rules still need your approval (see above).
- Node.js 22.23.4+ or 24.22.1+. Older versions miss the October 2026 Node.js security fixes.
Configure your .vscode/mcp.json to use:
npx @requestly/mcpTo use this server, you'll need a Requestly API key. Request yours by filling out this short form. Our team will review your request and provide access shortly
- MCP SDK: https://github.com/modelcontextprotocol/create-python-server
- MCP Protocol: https://modelcontextprotocol.io/llms-full.txt
- Requestly API Docs: https://docs.requestly.com/public-apis/overview