AI REST Client — API Testing Studio
A Postman-style API client for VS Code. Build, send, and test HTTP requests from a rich panel — without leaving your editor — or hand the job to an AI assistant through the built-in MCP server.
Requires VS Code 1.82 or newer.
Features
Request building
- Method selector (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS) with Postman-style color coding
- URL bar with two-way query-param sync (edit the URL or the Params table — they stay in sync)
- Editable key/value tables for Params and Headers (enable/disable rows, auto-add new row)
- Authorization tab: No Auth, Bearer Token, Basic Auth, API Key (header or query)
- Body tab: none, raw (JSON / Text / XML / HTML / JavaScript),
x-www-form-urlencoded, form-data
- Beautify button to pretty-print JSON bodies
- Multiple open requests in tabs, with a dirty indicator
Sending & response
- Real HTTP requests executed in the extension host (no browser CORS limits)
- Response panel shows status, time, and size
- Body view with JSON syntax highlighting + in-response search/highlight
- Headers and Cookies views
- Copy response or Save it to a file
Organize
- Collections — save requests into named folders (persisted across sessions)
- History — every sent request is recorded and re-openable
- Environments — define
{{variables}} and switch environments from the top bar; variables work in URL, params, headers, auth, and body
- Import cURL — paste a
curl command to turn it into a request
AI tools (MCP)
- Ships an MCP server so Claude Code, Claude Desktop, Cursor and friends can test APIs on your behalf
- They see your collections and environments, send requests, save new ones, and read the results
- Optional guards limit which hosts and methods an assistant may touch — see mcp/README.md
Shortcuts
Ctrl/Cmd + Enter — send the current request
Ctrl/Cmd + S — save the current request
Ctrl/Cmd + Alt + R — open a new request panel
Enter in the URL bar — send
Run it (development)
- Open this folder in VS Code.
- Press
F5 (Run → Start Debugging). This launches an Extension Development Host window.
- In the new window, open the REST Client icon in the Activity Bar, or run “REST Client: New Request” from the Command Palette (
Ctrl+Shift+P).
No build step and no npm install are required — it uses plain JavaScript and Node's built-in fetch.
Package as a .vsix (optional)
npm run package
That runs vsce package --no-dependencies (install it once with
npm install -g @vscode/vsce). The --no-dependencies flag matters: this
extension has no runtime dependencies and no node_modules, and without the
flag vsce collects an empty file list and fails with "Extension entrypoint(s)
missing".
Then Extensions → ··· → Install from VSIX… in VS Code.
Let an AI assistant use it (MCP)
The bundled MCP server lets AI tools drive the same request engine — useful for
"log in, then hit these three endpoints and tell me which one 500s".
Run REST Client: Copy MCP Server Config from the Command Palette to get the
config with the right path filled in, or add it directly:
claude mcp add restclient-studio -- node "<path to this folder>/mcp/server.js"
The assistant can then send ad-hoc requests, run and save requests in your
collections, set {{variables}}, and read history. Requests it sends show up in
the panel's history, and requests it saves appear in your collections.
Full tool list, safety guards (host allowlist, read-only mode) and details of
how state is shared: mcp/README.md.
Project structure
package.json Extension manifest (commands, views, keybindings)
extension.js Host: webview lifecycle, HTTP execution, state persistence
media/
style.css UI styling (themed with VS Code variables)
main.js Webview app: UI, request builder, response viewer
sidebar-icon.svg Activity-bar icon
icon.png Marketplace icon
mcp/
server.js MCP server (stdio) exposing the client to AI tools
lib/ Shared store, request builder/executor, cURL parser
README.md MCP setup, tools, and guards
Where your data lives
Collections, history, environments and open tabs are stored in VS Code
globalState. The shared slices — collections, environments, history — are also
mirrored to ~/.restclient-studio/store.json so the MCP server can read them.
Environment variables are stored in plain text, in both places. If you keep
API tokens or passwords in an environment, they sit unencrypted on disk. The
mirror file is created with owner-only permissions (0600) on macOS and Linux;
on Windows it inherits your user profile's permissions.
This is a deliberate trade-off: VS Code's SecretStorage is encrypted but
readable only from inside the extension host, which would make environment
variables invisible to the MCP server and break AI-driven testing. If you'd
rather not have secrets on disk at all, keep them out of environments and pass
tokens per request.
Notes & limits
- form-data file uploads aren't supported inside the webview; text fields in form-data are sent as url-encoded.
- Requests run from the extension host, so
localhost and private network endpoints work.
- Requires VS Code 1.82+ (the first release on Node 18, which provides the global
fetch the request engine uses).
Development
npm test
Runs the test suite in test/ — MCP protocol and tools end-to-end against a
local server, request-builder and guard unit tests, and the extension's
state-sync logic against a stubbed vscode module. No dependencies needed.
License
MIT