Skip to content
requestlyPublic

About

Model Context Protocol (MCP) server for Requestly

Resources

Stars

9 stars

Watchers

0 watching

Forks

Repository files navigation

Requestly MCP Server

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.

Features

  • 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

Deleting rules and groups

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.

Code in rules

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. Set REQUESTLY_MCP_OPEN_REVIEW_FILE=0 to 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.

What the AI model reads back

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 \u escapes, 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).

Requirements

  • Node.js 22.23.4+ or 24.22.1+. Older versions miss the October 2026 Node.js security fixes.

Usage

As an MCP server (for VS Code integration)

Configure your .vscode/mcp.json to use:

"Requestly Server": {
  "type": "stdio",
  "command": "npx",
  "args": ["@requestly/mcp"],
  "env": {
    "REQUESTLY_API_KEY": "<your-api-key>"
  }
}
npx @requestly/mcp

Get Your API Key

To 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

References

About

Model Context Protocol (MCP) server for Requestly

Resources

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages