MsgVisor is a VS Code extension for sending to APIs and message brokers and seeing the results, right inside VS Code. It is built around what you send (test data), so you work the same way whether you make a single send with HTTP, GraphQL, gRPC, or JSON-RPC, or send and receive over an open MQTT or WebSocket connection. This guide is for people who are new to MsgVisor. It walks you through setup, everyday tasks, and what to do when something goes wrong.

  • This guide is for MsgVisor 0.13. The supported protocols are HTTP (including Server-Sent Events), MQTT, WebSocket, GraphQL (Query, Mutation, Subscription), gRPC (Unary and streaming), and JSON-RPC 2.0 (over HTTP and WebSocket).
  • Every field of the collection file is described in File format.

#Contents

#1. Introduction

#1.1 What you can do with MsgVisor

  • Keep definitions in files: Each collection (environments, folders, and request and connection definitions) is saved as one YAML file. For each collection, you choose where to save it: "Only me" (this PC user's storage; you can use it from any window) or "Share with the team" (.vscode/msgvisor/ in the workspace; manage it with Git, review it, and share it with your team). You create, rename, and delete collections and change where they are saved from the tree, so you don't need to deal with the files. Changes you make on screen are written only to the affected part of the file, and comments and formatting are kept.
  • Switch test data and send: Give one request several sets of test data (valid cases, invalid cases, and so on) as cards, and choose one to send. Drag a response or a received message to turn it into test data as is.
  • Generate test data: Build valid cards in bulk from the shape of the body (such as an OpenAPI schema) and rules for each field. You can also choose to add invalid and boundary cards, such as a missing required field, a value out of range, or a wrong format. Write the result you expect on a card (201, 4xx, and so on), and what you send gets a pass or fail (6.5, 6.6).
  • Send all at once: Send several cards, or the rows of a data file such as a CSV file, one after another, and check pass or fail with colored bars and a table (6.7).
  • Switch environments: Keep variable values for each environment, such as dev, stg, and prod, and switch between them when you send. Passwords and tokens are kept in VS Code's SecretStorage, not written to files. Write common headers and authentication once for a whole collection or folder.
  • Work quickly from the tree: Send or connect from a row in the collection tree, and see the last result on the row (GET · 200 · 118 ms; failures in red text with "!"). Copy, paste, duplicate, rename, and more from the keyboard too. Use "Go to Request" to find a request by name or URL.
  • See your send history: What you send is kept for each workspace. From the Side Bar, look at the response from that time again, or send again with the same test data.
  • Make use of OpenAPI: Create requests, test data, and environments in one go from an OpenAPI (Swagger) document. Responses to imported requests are checked against the schema in the document, and any mismatches are shown.
  • Work with curl: Create a request from a curl command, and copy a request as a curl command.
  • Move from other tools: Import collections and environments from Postman, Insomnia, and Bruno (5.7).
  • GraphQL and gRPC: Send GraphQL queries with variables, and gRPC methods and messages loaded from .proto files or server reflection, with completion and validation based on the schema (definitions).
  • JSON-RPC: Write only the params in your test data; MsgVisor builds the outer {"jsonrpc": "2.0", "method": …, "id": …}. Send over HTTP or WebSocket. Over WebSocket, each response is paired with its request by id. With an OpenRPC document (a file or rpc.discover), you can choose methods, get completion and validation for params, and check results (13).
  • See results graphically: For HTTP, GraphQL, gRPC, and JSON-RPC, see a colored status badge (result / error for JSON-RPC), a time breakdown bar, and a bar chart of past sends. For MQTT, WebSocket, gRPC streaming, and JSON-RPC over WebSocket, see a timeline that shows sent and received messages as arrows (for MQTT, also a chart of values over time and a tree of received topics).
  • Use with AI agents: AI agents such as the chat in VS Code, Claude Code, and Codex can look up your saved requests, send them and check the responses, open connections and read messages, and add drafts of test data. MsgVisor adds the authentication, so your passwords and tokens are never passed to agents. Requests that change data are sent only in environments you allow, and you confirm each one before it is sent (14).
  • Prevent mistakes: In production environments, MsgVisor shows a red band and asks you to confirm before sending.
  • Japanese / English display

#1.2 Requirements

  • VS Code 1.134 or later
  • HTTP: HTTP/1.1 servers (http / https)
  • MQTT: MQTT 3.1.1 or 5.0 brokers (mqtt / mqtts / ws / wss)
  • WebSocket: WebSocket servers (ws / wss)
  • GraphQL: GraphQL servers over HTTP (Subscription over graphql-ws or SSE)
  • gRPC: gRPC servers (grpc / grpcs). Definitions are read from .proto files or with server reflection
  • JSON-RPC: JSON-RPC 2.0 servers (http / https / ws / wss). Method definitions are read from an OpenRPC document (a file or rpc.discover)

#1.3 Terms

Term Meaning
Collection A set of environments, folders, and requests and connections. The requests and connections in it share the environments and variables. Saved as one file
Save location Where a collection is kept: "Only me" (this PC user's storage) or "Share with the team" (.vscode/msgvisor/ in the workspace) (5.1)
Request / connection A single definition. There are "requests" that you send and get a response to (HTTP, GraphQL, gRPC, JSON-RPC), and "connections" that send and receive while they are open (MQTT, WebSocket). You open them from the tree in the MsgVisor editor
Folder A container that groups requests and connections (a container inside a collection, not a folder on disk)
Test data The body you send. One request or connection can have several. They are shown as cards on screen
Environment A set of variable values (dev, prod, and so on). You choose one for each collection
Environment tag The kind of environment (dev, stg, prod). Tag each environment to tell them apart by color, to confirm before sending in production environments, and to set the default for what AI agents are allowed to do (7.1)
Secret variable A variable whose value is kept in SecretStorage instead of the file (passwords, tokens, and so on)
Timeline The events (sent, received, connected, subscribed, and so on) during an MQTT or WebSocket connection or a gRPC streaming call, in time order
Last result The status and time taken the last time a request was sent. Shown on its row in the tree
Expected result The result that a test data card should get when you send it (such as an HTTP status), written on the card. MsgVisor compares it with the actual result and shows "As expected" or "Not as expected" (6.6)
Data file A file with one send's worth of values per row, used when sending all at once (CSV, JSON, JSON Lines). The column names become variables (6.7)
params The arguments passed to a JSON-RPC method. Written as an array ([1, "cat"]; passed by position) or an object ({ "limit": 1 }; passed by name) (13)
OpenRPC A format for JSON-RPC API documents (the JSON-RPC counterpart of OpenAPI). It describes methods, the shapes of params and results, errors, and examples. Servers may also return it from rpc.discover
Badge A small label that shows a state or kind with color and text (response status, method, result of the check against the API document, and so on). Some badges open details when you click them

#2. Installing and updating

#2.1 Install

Install the VSIX file you were given (msgvisor-<version>.vsix).

  • In VS Code, open the "..." menu of the Extensions view, choose "Install from VSIX...", and select the file.
  • Or run code --install-extension msgvisor-<version>.vsix on the command line.

After installation, the MsgVisor icon (a magnifying glass and a speech bubble) appears in the Activity Bar.

#2.2 Update to a new version

Install the new VSIX the same way. Your collections, secret variable values, and send history carry over. After installing, reload the VS Code window.

Upgrading from 0.9 or earlier to 0.10: Collections shared with the team moved from .msgvisor/ in the workspace to .vscode/msgvisor/. Version 0.10 does not read .msgvisor/, so move them as follows.

  1. Move .msgvisor/<name>.yaml to .vscode/msgvisor/<name>.yaml (and .msgvisor/.gitignore to .vscode/msgvisor/.gitignore). Move local values (.msgvisor/local/) to .vscode/msgvisor/local/.
  2. Collections you used only by yourself can then be moved with "Keep Only for Me…" in the tree's context menu (5.1).
  3. Secret variable values are remembered for each collection file location, so enter them again ("Manage Secret Values…"; 7.4).

#2.3 Display language

MsgVisor is shown in Japanese or English, following VS Code's display language. You can change the display language with "Configure Display Language" in the Command Palette.

#2.4 Workspace Trust

In an untrusted workspace (Restricted Mode), you can view and edit requests and connections, but MsgVisor does not send or connect. This keeps files you received from others from sending to destinations you didn't intend. To send, trust the workspace with VS Code's "Manage Workspace Trust". When importing from OpenAPI, MsgVisor also does not read documents from URLs, $refs on the network, or OpenID Connect discovery documents (5.6).

#3. The screen layout

#3.1 Overview

The MsgVisor screen. See the table below for the letters A to F

Letter Name Description
A MsgVisor icon In the Activity Bar. Select it to show the "Collections" and "Send History" views in the Side Bar
B Collections view A tree of collections, folders, and requests / connections. Open, send, organize, and find items here (3.2)
C Send History view A list of what you have sent (5.4)
D Editor (target and test data) When you open a request or connection from the tree, it opens in the MsgVisor editor. The target row is at the top, with the test data cards and the body below it (3.3)
E Response The result of sending. On the screen of a connection (MQTT, WebSocket), the timeline appears here
F Status Bar The environment of the collection of the active request or connection (3.4)
  • The tab shows the request name, and the tab icon shows the protocol (HTTP: a blue globe, GraphQL: a pink branch, gRPC: a green server, MQTT: a purple radio tower, WebSocket: teal swapping arrows). If the last send of a request returned 4xx or failed, its tab name also gets the same color and "!" as in the tree.
  • The breadcrumbs above the editor (below the tab) show "Collection › Folder › Name", the same as the tree (they follow when you change the name or folder).

#3.2 The Collections view

The Collections view. The last result appears to the right of each row: 4xx in yellow, failures in red text with "!". The connected MQTT connection is green

  • To the right of each collection, the name of the selected environment and the save location ("Only me" or "Share with the team") appear. The icon's shape shows the save location (a person for Only me, a group of people for Share with the team), and its color shows the environment tag (dev green, stg yellow, prod red). Collections shared with the team are listed first, then those only for you.

  • The buttons at the top of the tree act on the list of collections. "New Collection" creates a collection (it asks for a name and save location), and "New Request / Connection" opens the creation screen (you choose where to put the new item on that screen). Create folders from a collection or folder row.

  • Folders and requests / connections are listed in the order they are written in the collection (drag to change the order; 5.3). The method is shown by an icon with a color and shape (GET: a down arrow, POST: +, PUT: swapping arrows, PATCH: a pencil, DELETE: a trash can) and by the text to the right.

  • GraphQL requests have a branch icon (pink), and gRPC requests have a server icon with a gear (green). MQTT connections have a radio tower icon, and WebSocket connections have a swapping arrows icon (teal). While connected, the icon turns green and the row shows "MQTT · Connected" or "WebSocket · Connected".

  • A collapsed folder shows the number of requests in it on the right.

  • HTTP, GraphQL, and gRPC requests that you have sent show the last result to the right of the method (GET · 200 · 118 ms). 4xx is shown in yellow, and 5xx and failures to connect in red text with a "!" mark (successes are not colored). While a request is being sent, its icon spins and the row shows "Sending…".

  • Hover over a row to see the destination (GET https://…), the number of test data cards, and the result and time of the last send (for a folder, the number of requests in it and whether it has defaults; for a collection, the environment and the numbers of requests and folders).

    Hovering over a row. It shows the destination and the result and time of the last send

  • When you hover over (or select) a row, icons for frequent actions appear on the right. Collections have "New Request", "New Folder", and "Select Environment"; folders have "New Request", "New Folder", "Rename", and "Delete"; requests (HTTP, GraphQL, gRPC) have "Send", "Duplicate", "Rename", and "Delete"; MQTT and WebSocket connections have "Connect" ("Disconnect" while connected), "Duplicate", "Rename", and "Delete".

  • Click a row to open it in the editor (in a preview tab; 5.3). The open request or connection is selected in the tree.

  • You can also use the keyboard (Enter to open, Ctrl+Enter to send, F2 to rename, and so on; 16.3). The context menu shows the key for each action.

  • If a collection cannot be read as YAML, a red row appears (click it to open the file as text).

#3.3 The editor

The HTTP, GraphQL, and gRPC screens (the request layout) show the test data on the left and the response on the right.

The HTTP editor. The test data cards and body on the left, the response on the right, and "Sent so far" at the bottom

The MQTT and WebSocket screens (the connection layout) show, from left to right, the subscriptions and received topics, the timeline, and the selected message and the sending area.

The MQTT editor. The subscriptions and received topics on the left, the timeline in the center, and the selected message and Publish on the right

In both layouts, the parts are arranged from top to bottom: "protocol badge and name", "production band (only in a prod environment)", "target row", and "main area". You can change the name here. The collection and folder hierarchy appears in the breadcrumbs above it (shown by VS Code). If you have turned off breadcrumbs in VS Code's settings, the hierarchy appears to the right of the protocol badge. In the HTTP editor, you can drag the border between the left and right panes, and when the editor is narrow, the two panes are stacked vertically.

#3.4 The Status Bar

Shows the selected environment of the collection that the active request or connection belongs to. A prod environment has a red background, and a stg environment a yellow one. Click it to choose an environment.

#4. Getting started

#4.1 Try the sample collection

  1. In VS Code, click the MsgVisor icon in the Activity Bar (you can try it even without opening a folder).
  2. If you have no collections yet, the tree shows a welcome message. Click "Create Sample Collection".
  3. A collection named "MsgVisor sample" is created in your "Only me" storage (no files are added to the workspace), and the editor for "Send JSON" opens. The tree shows the following folders and requests / connections.
    • HTTP › "Send JSON": POSTs JSON to httpbin.org (it returns what you sent as is)
    • HTTP › "Get a status code": returns the status code in the URL (change 418, and the colors in "Sent so far" change)
    • HTTP › "Wikipedia edits (SSE)": keeps receiving Server-Sent Events (click "Stop" to end)
    • MQTT › "Sensor": connects to the public test broker test.mosquitto.org (anyone can see this topic)
    • WebSocket › "Echo": connects to a public server that returns what you send as is
    • GraphQL › "Look up a country": looks up countries on a public GraphQL demo (each card has different variables; click "Fetch schema" to get completion)
    • gRPC › "Say hello (Unary)", "Many replies (server streaming)", and "Chat (bidirectional streaming)": call the public gRPC test server grpcb.in over TLS (click "Fetch services" to use the method list and completion; the bidirectional call then shows a screen with "Start")
    • JSON-RPC › "Get a balance (HTTP)" and "Block number (WebSocket)": call a public Ethereum node with JSON-RPC (the cards contain only params; the second card expects the error -32602; for WebSocket, click "Connect" before sending)
  4. Click "Send" (Ctrl+Enter), and the response appears on the right. The tree row also shows the result (POST · 200 · 320 ms).
  5. To try other requests, click a row in the tree to open it, or click the send icon on the row to send it right away.

The sample sends to the internet only when you click "Send", "Connect", "Start", or "Fetch services".

#4.2 Create and send an HTTP request

  1. Click "New Request / Connection" at the top of the tree (or run "MsgVisor: New Request / Connection…" from the Command Palette).

  2. On the creation screen, choose the "HTTP (REST)" card and click "Next" (you can also double-click the card).

    Step 1 of the creation screen. Choose the type with a card

  3. Choose a name, where to save it (collection and folder), and a template (Empty GET, POST JSON, GET with authentication). The right side shows what will be added to the collection.

    Step 2 of the creation screen. Choose a name, location, and template. The right side shows what will be added

  4. Click "Create and open" (Ctrl+Enter).

  5. In the editor, enter the URL, choose a test data card, and click "Send".

  6. From then on, you can also send with the send icon on the tree row (or by selecting the row and pressing Ctrl+Enter).

#4.3 Connect to an MQTT broker and send and receive messages

  1. On the creation screen, choose "MQTT", choose a template (Empty connection, Sensor example), and create it.
  2. In the editor, enter the broker URL (for example, mqtt://localhost:1883) and click "Connect" (next time, you can also connect with the "Connect" icon on the tree row).
  3. In "Subscriptions" on the left, enter a topic filter (for example, factory/#) and click "Subscribe".
  4. In "Publish" on the right, choose a card, check the topic and body, and click "Publish" (Ctrl+Enter).
  5. Sent (→) and received (←) messages appear on the timeline in the center. Click a row to see its details on the right.

#4.4 The Get Started walkthrough

Choose "Get Started" from the "..." menu of the tree (or the link in the welcome message of the empty tree, or the command "MsgVisor: Get Started") to open a walkthrough with four steps (Choose the target, Make test data, Send and see the result, Let AI agents use your requests) on VS Code's Welcome page. Use the button in each step to start that task.

#5. Collections and files

#5.1 Create collections and choose where to save them

  • Create a collection with "New Collection" at the top of the tree. It asks for a name and save location. To rename a collection, use "Rename…" in the context menu (or F2); to delete it, use "Delete" in the context menu (or Delete). Right after deleting, you can bring it back with "Undo" in the notification (if you don't, the collection's secret variable values are deleted too).
  • Each collection is saved as one YAML file. Its environments, defaults, folders, and requests / connections are all written in this file. You choose the save location for each collection (the same as the save location of DBVisor connections).
Save location Where it is saved Use
Only me This PC user's storage (VS Code's storage for extensions) Collections only you use. You can use them from any window (even without a folder open), and they are not added to Git
Share with the team .vscode/msgvisor/<name>.yaml in the workspace folder Collections you share with your team. Manage and review them with Git. Local values (.vscode/msgvisor/local/) are not added to Git (7.5)

Choosing "New collection" on the creation screen. The "Only me" and "Share with the team" cards for the save location appear

  • When you choose "New collection" on the creation screen or the OpenAPI import screen, the "Only me" and "Share with the team" cards appear. "New Collection" in the tree asks with a list after the name. At first, "Only me" is selected if no folder is open, "Share with the team" if the workspace already has a collection shared with the team, and "Only me" otherwise. The sample collection is always created in "Only me".
  • When the workspace has several folders open, choose a folder below the "Share with the team" card (from a list when you use the tree). MsgVisor reads .vscode/msgvisor/ in each folder.
  • Change the save location: Use "Share with the Team…" or "Keep Only for Me…" in the context menu of a collection in the tree, or the "Save to" cards on the collection settings screen ("Edit Environments…"). MsgVisor asks you to confirm before moving, and you can undo the move with "Undo" in the notification right after. Secret variable values, the selected environment, and the send history carry over to the new location (open editors are reopened, and connections are closed). When you move a collection from Share with the team to Only me, its local values are written into the collection's environment values. When you stop sharing a collection with the team, it also disappears from your teammates' trees once you commit.
  • When it is excluded from Git: In a repository whose .gitignore excludes .vscode/ from Git, the file is not added to Git even if you choose Share with the team. In that case, a warning and an "Add to .gitignore" button appear below the card (or in a notification when you create or move a collection from the tree). Click it to add a line to the end of .gitignore in the workspace folder that brings .vscode/msgvisor/ back into Git (other .vscode/ files stay excluded). MsgVisor checks this only in trusted workspaces where Git is available.
  • The Only me storage is on the machine where the extension runs. In windows opened in WSL, over SSH, or in a container, it is inside that environment (separate from windows opened on Windows). Settings Sync does not carry it.
  • Folders are containers inside a collection. No folders are created on disk.
  • Open requests and connections from the tree. When you edit one in the editor and save, only that part of the collection file is rewritten. Other requests and comments do not change. The unsaved mark, undo, and save work as usual in VS Code.
  • Screen state (such as the selected environment) is not written to the file, to avoid adding to Git diffs.
  • For advanced users, "Show YAML" in the context menu opens the collection file as text (File format). While the text editor has unsaved changes, MsgVisor refuses to save requests and to perform tree operations (so as not to overwrite those changes). Save or undo them first.

#5.2 Create a new request or connection

Open the creation screen with "New Request / Connection" at the top of the tree, the button on a collection or folder row or "New Request…" in its context menu, or the command "MsgVisor: New Request / Connection…".

  1. Choose the type: Choose a card: HTTP (REST), MQTT, WebSocket, GraphQL, gRPC, JSON-RPC, Import (create from a curl command), OpenAPI, or Other tools (Postman, Insomnia, Bruno, OpenRPC; 5.7). For OpenAPI and Other tools, "Next" opens the import screen.
  2. Name and location:
    • Name: The display name shown in the tree and on the tab.
    • Location: Choose from the "Collection › Folder" buttons. If you choose the last button, "New collection", the save location cards ("Only me", "Share with the team") appear below it, and a collection is also created in the save location you choose (5.1). You can also create a folder with "New folder…". When you open the screen from a folder in the tree, that folder is selected. When you open it from the top of the tree and there is only one collection, its top level is selected (if there are several, choose one before creating).
    • Template: HTTP has "Empty GET", "POST JSON" (with valid and invalid cards), and "GET with authentication" (with a Bearer token in a secret variable); MQTT has "Empty connection" and "Sensor example" (with a subscription and a Publish card); WebSocket has "Empty connection" and "Echo example" (connects to a public server that returns what you send); GraphQL has "Empty query" and "Countries example" (11.1); gRPC has "Empty call" and "Health check" (12.1); JSON-RPC has "Empty request" and "Ethereum example" (13.1). If the collection you save to has a baseUrl or broker variable, the URL is written with that variable.
    • The right side shows what will be added to the collection.
  3. "Create and open" (Ctrl+Enter) adds it at the end of the chosen location and opens it in the editor.

Create from a curl command: When you choose the "Import" card, step 2 shows a "curl command" box instead of the templates. Paste a command copied with "Copy as cURL" in the browser's developer tools (either bash or cmd) or one you wrote by hand, and the contents of the request to be created appear on the right.

After pasting a curl command. The right side shows the contents of the request to be created

  • MsgVisor reads the method, URL (the query is split into a list), headers, body (-d, --data-raw, --json, -F, @file), authentication (-u, Authorization: Bearer), -k, certificates, and -m. Options that were not read are listed below the box.
  • If you haven't changed the name, the last segment of the URL becomes the name.
  • Credentials in the command (such as tokens) are written to the collection file as they are. After creating the request, replace them with secret variables (7.4).
  • If the body is a JSON-RPC request ({"jsonrpc": "2.0", "method": …}), a "Create a JSON-RPC request (method …)" checkbox appears below the box (checked). If you leave it checked, MsgVisor creates a JSON-RPC request with the method on the request and the params in a test data card (13). Uncheck it to keep an HTTP request.

#5.3 Organize items in the tree

Action How
Open Click a row (with the keyboard, move with the arrow keys and press Enter), or "Open" in the context menu. Focus stays in the tree after opening, so you can keep using the tree's keys. Tabs opened from the tree are previews (the name is in italics) and are replaced by the next item you open. Edit the item or double-click the tab to keep it
Send The send icon on an HTTP, GraphQL, gRPC, or JSON-RPC row, "Send" in the context menu, or Ctrl+Enter. Opens the editor and does the same as "Send" in the editor (with the first card if the editor was not open, or with the card selected there if it was)
Connect The "Connect" (plug) icon on an MQTT, WebSocket, or JSON-RPC over WebSocket row (the URL starts with ws:// or wss://, and the row description shows "WebSocket"), "Connect" in the context menu, or Ctrl+Enter. Opens the editor and connects. While connected, a "Disconnect" icon appears in the same place
Go to Request The magnifying glass button at the top of the tree, or the command "MsgVisor: Go to Request…". Filter the requests and connections of all collections by name, folder, and URL, and open one. Requests that you send can be sent right away with the send button in the list
New request The icon on a collection or folder row, "New Request…" in the context menu, or Ctrl+N (created in the location of the focused row)
New collection The button at the top of the tree, or the command "MsgVisor: New Collection…". Asks for a name and save location (Only me / Share with the team)
Change the save location "Share with the Team…" or "Keep Only for Me…" in the context menu of a collection (5.1)
Move and reorder Drag requests and folders. Drop on a request to put the item before it; drop on a folder or collection to put it at the end. Within the same collection, open editors and connections stay as they are. When moving to another collection, save unsaved editors first (connections are closed, and editors are reopened). Select several items (holding Ctrl / Shift) to move them together
Open in the editor Drag a row to the editor area
New folder The icon on a collection or folder row, "New Folder…" in the context menu, or Ctrl+Shift+N
Duplicate The duplicate icon on a row, "Duplicate" in the context menu, or Ctrl+D. Creates a copy right below it with " (copy)" added to the name (a request is opened; a folder is copied with its contents)
Copy, cut, and paste "Copy", "Cut", and "Paste" in the context menu, or Ctrl+C / Ctrl+X / Ctrl+V. Pasted items go at the end of a collection or folder, or right after a request or connection. Cut items are moved (the same as dragging), and copied items are added with a new id (" (copy)" is added if the same name already exists in the same place). The copied content is YAML in the same form as the collection file, so you can paste it into a text editor or a chat, and also into the tree of another workspace
Convert to JSON-RPC "Convert to JSON-RPC..." in the context menu of an HTTP request whose body is a JSON-RPC request (13.6)
Rename The pencil icon on a row, "Rename…" in the context menu, or F2. Change the name in the input box that appears at the top of the screen (collections, folders, requests / connections). For a request that is open, the name is changed through the editor's content (unsaved edits are kept)
Delete The trash can icon on a row, "Delete" in the context menu, or Delete (Cmd+Backspace on macOS). MsgVisor asks you to confirm and then removes it. Use "Undo" in the notification that appears right after to bring it back. You can also select several folders and requests / connections and delete them together. Deleting a collection also deletes the folders, requests / connections, and environments in it
Select environment The button on a collection row, or "Select Environment…" in the context menu
Edit environments "Edit Environments…" in the context menu of a collection. Opens the environment table screen (7.1)
Edit defaults "Edit Defaults…" in the context menu of a collection or folder. Opens the defaults screen (7.6)
Local values "Edit Local Values…" in the context menu of a collection shared with the team (7.5)
Secret variable values "Manage Secret Values…" in the context menu of a collection (7.4)
Disconnect The button on a connected MQTT or WebSocket row, or "Disconnect" in the context menu
Filter Focus the tree and type (VS Code's tree find)
Show YAML "Show YAML" in the context menu. Opens the collection file as text and shows the line of that item (for advanced users)

The context menu of a request. Actions with a key binding show the key on the right

Typing "pet" in "Go to Request". Each item shows its name, last result, location, and URL

If you edit the collection file directly as text, the tree and editor reflect the changes when you save. If an item you added as text has no id, MsgVisor adds one when you open it or work with it in the tree.

The tree's keys act on the focused row (the row with an outline, where you moved with the arrow keys). Moving with the arrow keys alone does not change the selected rows (the rows with a colored background), but the keys act on the row you moved to. Hold Ctrl or Shift to select several rows. If the focused row is among the selected rows, copy, cut, and delete apply to all selected rows (if it is outside them, they apply only to the focused row, the same as in the Explorer). On macOS, use Cmd instead of Ctrl.

While items are being moved or deleted, a moving bar appears at the top of the Collections view, and a spinner and "MsgVisor: moving N item(s)…" appear in the Status Bar. If you drag again before an operation finishes, the operations run in order, each after the previous one finishes.

#5.4 Send History

"Send History" in the Side Bar (below the Collections view; if it is collapsed, click its header to open it) keeps what you have sent, newest first.

Send History. Hovering over a row shows "Open", "Send Again", and "Delete from History" on the right

  • What is kept: HTTP and GraphQL sends, gRPC calls (Unary and server streaming; what you sent and the response), MQTT publishes, and WebSocket sends. Received messages and the sends of gRPC client streaming and bidirectional calls are not kept (use the timeline export).
  • Entries are grouped by day (Today, Yesterday, then dates). Each row shows an icon in the shape of the method (colored by the status), the name, and a description such as POST · 201 · 118 ms · 10:24:31. Hover over a row to see the URL, environment, test data, and location (Collection › Folder).
  • When you hover over (or select) a row, the "Open", "Send Again" (HTTP, GraphQL, gRPC), and "Delete from History" icons appear on the right. "Send Again" (Ctrl+Enter) sends that request with the test data used at that time, using the current definition and environment.
  • Click a row to open the request or connection in the editor; for HTTP, the response from that time is shown. Even if you rename the request or move it in the tree, the history still belongs to the same request. If the request has been deleted, use "Open as JSON" to see the content of the record.
  • Delete an entry with "Delete from History" (Delete) in the context menu. Use the button at the top of the view to delete all entries.
  • The history is kept for each workspace in VS Code's storage (not among the workspace's files). Secret variable values are masked. Each body is kept up to 256 KB.
  • The "Sent so far" bars in the editor are also restored from the history after you reopen VS Code.
  • A "Send all" run is kept as one entry (its content is the first send, and the row description reads "Sent all: 12 · passed 10 · not as expected 2 · no response 0"; 6.7).
  • You can turn off the history with the setting msgvisor.history.enabled, and change the maximum number of entries with msgvisor.history.maxEntries (default 1,000).

#5.5 Edit as text and share with Git

  • Choose "Reopen Editor With..." from the "..." at the top right of the editor to open the YAML of that request or connection (its part of the collection file) in the text editor. Changes on the screen and in the text are reflected in each other right away. To open the whole file, use "Show YAML" in the tree's context menu.
  • Changes on the screen work like ordinary file changes: they get the unsaved mark, you save them with Ctrl+S, and you undo them with Ctrl+Z (even while an input box has focus, this undoes the change to the file).
  • If the content cannot be read as YAML, MsgVisor shows the line and column of the error and an "Open as Text" button. Where an item is written incorrectly, "Problems" at the top of the editor shows the position and the problem. You can still edit the parts that can be read on the screen.

#5.6 Import from OpenAPI

Create requests and test data from OpenAPI (3.0, 3.1) and Swagger 2.0 documents (YAML, JSON). Open the import screen in any of these ways:

  • The command "MsgVisor: Import from OpenAPI…", or the "..." menu of the Collections view
  • "Import from OpenAPI…" in the context menu of a collection or folder (it is set as the place to import into)
  • The "OpenAPI" card on the creation screen, or the welcome message of the empty tree
  1. Choose the document: The documents in the workspace (files that begin with openapi: or swagger:) are listed. For other files, use "Choose a file…"; for a document on the network, enter its URL and click "Load" (for example, https://petstore3.swagger.io/api/v3/openapi.json). In untrusted workspaces, documents cannot be loaded from URLs.
  2. Choose the operations and location:
    • The band at the top shows the API name and version, the OpenAPI version, and the numbers of operations and servers.
    • Operations are listed in groups by tag (method badge, path, summary; deprecated ones have a strikethrough and a badge). Use the checkboxes to choose what to import. A group's checkbox selects all the operations with that tag.
    • An operation with several tags appears in the group of each tag (with an "Also in …" badge). Its checkbox is shared across the groups.
    • Where to import ("Location"): "New collection" (creates a collection named after the API; choose "Only me" or "Share with the team" with the save location cards), or an existing collection or folder (a folder named after the API is added).
    • If the document has an OAuth 2.0 / OpenID Connect scheme with more than one way to get a token, "OAuth 2.0 grant" appears. For each scheme, choose a grant button (Password, Client credentials, Browser login). At first, the first of Password, Client credentials, and Browser login (in that order) that the document has is selected.
    • The right side shows what will be added (requests, folders, environments, variables, secret variables, and warnings about what cannot be imported), the authentication in the defaults (when OAuth 2.0 or the like is written on the container), and a preview of the first request. If it doesn't fit in the right pane, scroll within the pane.
  3. "Import N" (Ctrl+Enter) imports them and selects the place in the tree.

Step 2 of the OpenAPI import screen. Choose operations on the left, and check where to import and what will be added on the right

The contents of the document are imported as follows.

API document MsgVisor
Tags Folders. An operation with several tags is put in the folder of each tag (in the same order as Swagger UI). This creates several requests for the same operation, so changes to one are not reflected in the others
Operations HTTP requests (named after the summary)
Path parameters (/pets/{petId}) Variables ({{petId}}). The example values go into the environments
Query and header parameters The query and header lists (optional ones are turned off)
Object-type query parameters One query row per property (name[property] for style: deepObject). Parameters with arbitrary keys (only additionalProperties) are not imported (a warning appears)
Body examples (examples) Test data cards. If there are no examples, one card with an example built from the schema
servers Environments (for a new collection; one environment per server, with the URL in baseUrl)
servers of a path or operation For each server list, a separate variable for the start of the URL (baseUrl2, baseUrl3, … in order of appearance). Each environment gets the URL of the server at the same position as that environment (or the first server, if the list has fewer servers)
Authentication (Bearer, Basic, API key) Authentication settings. The values are secret variables (such as {{token}}), and you are asked for them when sending
Authentication (OAuth 2.0, OpenID Connect) OAuth 2.0 authentication (7.7). MsgVisor gets the token when sending (see below)
  • When you import into an existing collection, the environments are not changed; only missing variables are added. If another API's baseUrl already exists, a variable with a different name, such as petStoreBaseUrl, is used (petStoreBaseUrl2 and so on for the servers of paths and operations).
  • Where authentication goes: The first scheme of the document's top-level security is written to the defaults of the container you import into (the new collection, or the added folder). If there is no top-level security, or its first entry is {} (no authentication is also allowed), and some requests use an OAuth 2.0 scheme, the scheme that the most requests use is written to the defaults.
  • A request's authentication is decided by the first candidate in its security. If it is the same scheme as the defaults, it is inherited (not written on the request). No authentication (security: [], or {} first) is written as auth: { type: none }, and the token in the defaults is not sent. Other schemes are written on the request.
  • Cookie parameters are not imported (the import screen and the notification afterwards tell you so).
  • Imported requests record the document location and the operation (used for the check in 8.6 and for re-importing).

OAuth 2.0 and OpenID Connect:

API document (flows) Grant What is written
password Password Token URL, client ID, client secret ({{clientSecret}}), username ({{username}}), password ({{password}}), scopes
clientCredentials Client credentials Token URL, client ID, client secret, scopes
authorizationCode Browser login (PKCE) Authorization URL (authorizationUrl), token URL, client ID, scopes (no secret)
  • For the token URL and authorization URL, the part up to the host (such as http://localhost:8080) goes into the variable authBaseUrl, and the URL is written like {{authBaseUrl}}/realms/petshop/protocol/openid-connect/token. authBaseUrl is created with the same value in every environment, so if the authorization server differs by environment, change it on the environments screen. URLs with other hosts use authBaseUrl2, authBaseUrl3, and so on.
  • The client ID comes from x-client-id in the document (see "MsgVisor fields you can write in the API document" below). If it is missing, the variable {{clientId}} is used and a warning appears, so enter the value on the environments screen.
  • The client secret and password are secret variables, and you are asked for them the first time you send. For a public client (a client without a secret), leave the client secret empty and confirm. The username is created as an ordinary variable (with an empty value).
  • The scopes are those that the imported requests require for that scheme, listed in order of appearance without duplicates. If there are none, no scopes are written.
  • A scheme with only the implicit flow is imported as Bearer ({{token}}) as before, with a warning, because MsgVisor cannot get tokens for it.
  • For OpenID Connect (type: openIdConnect), MsgVisor reads the discovery document at openIdConnectUrl (/.well-known/openid-configuration) when it reads the API document, finds the token URL, the authorization URL, and the supported grants (grant_types_supported), and then imports the scheme in the same way as OAuth 2.0. The discovery document is read with MsgVisor's HTTP sending, and is not read in untrusted workspaces. If it cannot be read, the scheme is imported as Bearer, and the reason is shown in a warning.

#MsgVisor fields you can write in the API document

With OpenAPI extension fields (fields that start with x-), you can tell MsgVisor things that the document alone does not settle. Other tools skip x- fields they don't know.

Field Where to write it Meaning
x-msgvisor-variable Server Object (an element of servers: top level, path, operation) The name of the variable that holds the URLs of that list. Write it on the first server of the list. If omitted, baseUrl for the top level, and baseUrl2, baseUrl3, … for paths and operations
x-client-id An OAuth 2.0 flow (such as flows.password) or a security scheme (OpenID Connect too) The client ID used to get a token. The one written on the flow takes precedence
servers:
  - url: http://localhost:3000
    description: API server (development)
    x-msgvisor-variable: apiBaseUrl
paths:
  /inventory:
    servers:
      - url: http://localhost:3001/admin/v1
        description: Admin server (development)
        x-msgvisor-variable: adminBaseUrl
    get:
      security:
        - shopAuth: [openid]
components:
  securitySchemes:
    shopAuth:
      type: oauth2
      flows:
        password:
          tokenUrl: http://localhost:8080/realms/petshop/protocol/openid-connect/token
          x-client-id: my-web
          scopes: { openid: OpenID Connect }
        authorizationCode:
          authorizationUrl: http://localhost:8080/realms/petshop/protocol/openid-connect/auth
          tokenUrl: http://localhost:8080/realms/petshop/protocol/openid-connect/token
          x-client-id: my-app
          scopes: { openid: OpenID Connect }

When you import this document, the URL of the /inventory request becomes {{adminBaseUrl}}/inventory, and the authentication in the defaults becomes OAuth 2.0 with Password (my-web) (you can switch to Browser login (my-app) on the import screen).

#Re-import from the API document

When the document changes, use "Re-import from the OpenAPI Document…" in the context menu of the imported collection or folder to choose the differences and apply them (it appears only on the rows of imported items).

  • MsgVisor reads the source document again, compares it with the current requests operation by operation, and lists the results in three groups.
    • New operations (selected at first): added to the folder of their tag.
    • Changed operations (selected at first): badges show what changed (method, URL, parameters, headers, authentication, examples).
    • Removed from the document (not selected at first): only the operations you select are deleted.
  • For changed operations, the method, URL, and authentication follow the document, and missing parameters, headers, and examples are added. Your test data cards and the values you wrote are kept. Parameters and headers that were removed from the document are kept, because MsgVisor cannot tell them apart from ones you added yourself (delete them if you don't need them).
  • For the variable at the start of the URL, the one used at import time (baseUrl, petStoreBaseUrl, baseUrl2, and so on) is used for each server list. Among requests imported with 0.8 or earlier, operations that use the servers of a path or operation are listed as having a changed URL (applying the change switches them to a separate variable).
  • The authentication in the defaults is not changed. A request's authentication is written to fit what its container currently inherits. For example, in a collection where OAuth 2.0 was imported as Bearer with 0.8 or earlier, OAuth 2.0 authentication is written on the request (to switch the defaults to OAuth 2.0, change them on the defaults screen). Two OAuth 2.0 settings are not treated as different, so if you changed the grant or the client ID, they are not changed back.
  • Only missing variables are added to the environments (existing values are not changed).
  • "Apply N" writes the changes. To undo them, restore the collection file with Git or the like.

#5.7 Import from other tools

Import collections made with Postman, Insomnia, or Bruno, or OpenRPC documents (API documents for JSON-RPC), as MsgVisor collections. Only the files and folders you choose are read; nothing is fetched from the network. Open the import screen in any of these ways:

  • The command "MsgVisor: Import from Other Tools (Postman, Insomnia, Bruno)...", or the "..." menu of the Collections view
  • The context menu of a collection or folder (it is set as the place to import into)
  • The "Other tools" card on the creation screen, or the welcome message of the empty tree

What can be read:

Tool What to choose
Postman A collection export (Collection v2.1 / v2.0 JSON). You can also choose environment exports (JSON) with it (select several files in the file dialog, or use "Add environment files..." in step 2)
Insomnia An exported file (v5 YAML, v4 JSON)
Bruno A collection folder (a folder with bruno.json or opencollection.yml) or an exported JSON file
OpenRPC An OpenRPC document (JSON or YAML). A JSON-RPC request is created for each method (see "OpenRPC documents" below)
  1. Choose what to import: Click "Select file..." or "Select Bruno folder...".
  2. Check and choose:
    • The band at the top shows the tool (a colored badge), the collection name, the format, the file, and the number of requests for each protocol.
    • The left side shows a tree of folders and requests (with method badges; GraphQL, gRPC, and WebSocket have their own badges). Use the checkboxes to choose what to import. A folder's checkbox selects everything in it.
    • The right side shows the environments to import, what was not imported ("Not imported": the count for each kind; expand it to see a list of locations), where to import ("Import to"; save location cards for "New collection"), and what will be added (requests, folders, environments, secret variables, and variables that are used but are not in any environment).
  3. "Import collection" (Ctrl+Enter) imports them and selects the place in the tree.

Step 2 of the screen for importing from other tools, after reading a Postman collection and environment

How items are imported:

Original tool MsgVisor
Folders Folders (nesting and order are kept)
HTTP requests HTTP requests (disabled query parameters and headers stay disabled)
GraphQL requests GraphQL requests. The variables become test data cards
gRPC and WebSocket requests (Insomnia, Bruno) gRPC requests and WebSocket connections. .proto files included in an Insomnia v4 export are written to protos/ (existing files are not overwritten; a number is added to the name instead). If no .proto is included, the definitions are read with server reflection
Bodies Test data cards (JSON, XML, text, form, multipart, file)
Saved examples (Postman, Bruno) A test data card for each example, with the status of the example response as the expected result (6.6)
Authentication Basic, Bearer, API key, and OAuth 2.0 (password, client credentials, authorization code). Authentication inherited from the parent stays inherited
Authentication and headers of folders and collections The defaults of that container (7.6)
Environments and variables Environments and variables. Nested values (Insomnia) become variables named parent.child
Variable syntax {{name}} stays as is. Insomnia's {{ _.name }} becomes {{name}}, and dynamic variables with the same meaning (such as {{$guid}}) are converted to MsgVisor's syntax (such as {{$uuid}}). Path variables like /users/:id become {{id}}, and their values are added to the environments
  • Secret values: Secret variables (Postman secrets, Insomnia secret fields, Bruno secret variables) and passwords, tokens, and API keys written directly in authentication fields become secret variables, and their values go into SecretStorage. They are not written to the collection file. For secret variables without values (Bruno has only their names), you are asked when sending.
  • What is not read: Scripts (pre-request and post-response), tests, Insomnia template tags (such as {% faker %}), and authentication types that MsgVisor cannot express (Digest, AWS, and so on) are not read. What was where is listed in "Not imported" on the import screen and in a comment before each item (you can see it with "Show YAML").
  • Importing into an existing collection: A folder named after the collection is added, and only missing variables are added to each environment (existing values are not changed). If there are no environments, the imported environments are created.
  • The file paths of file bodies and multipart files may be local paths from the original tool. Check them before sending.
  • Requests whose body is a JSON-RPC request: If there are JSON-RPC requests created as HTTP POSTs in Postman or a similar tool, a "Make N request(s) with JSON-RPC bodies into JSON-RPC requests" checkbox appears on the right in step 2 (checked). If you leave it checked, they are imported as JSON-RPC requests with the method on the request and the params in test data cards (the badges in the tree on the left and the counts at the top also change to JSON-RPC). Uncheck it to keep them as HTTP requests.

OpenRPC documents:

  • A JSON-RPC request is created for each method. The requests are grouped into folders by their first tag (methods without tags are listed at the top). Methods that start with rpc. are not created.
  • Each example in the document becomes a test data card. For examples with a result, the expected result is set to "result". A method without examples gets one empty card built from its required arguments.
  • The servers become environments, and the URL goes into the variable rpcUrl (variables such as {port} are filled in with their default values). The request URL is {{rpcUrl}}. If there are no servers, only the variable rpcUrl is created.
  • If the document file is in the same workspace folder as the place you import into, the document file (openrpc) is written in the request settings. Then you can choose methods and get completion even if the server has no rpc.discover (13.3).

#6. Test data

#6.1 Work with cards

Test data appears as a row of cards in the editor. Each card shows a color mark, a name, a tag (such as valid or invalid), and the beginning of the body.

Action How
Select Click a card (for HTTP, the next send uses the body of that card)
Send right away Double-click a card (HTTP)
Add The "+ Add" card
Duplicate, color, delete Right-click a card (colors: green, orange, blue, purple, pink, teal, gray, and "No color")
Reorder Drag a card
Send without a body Select the "No body" card (HTTP)
Create from a response or received message Click "Use as test data" in the response, or drag a row of the response or the timeline to the row of cards (6.4)

Below the selected card, you see the body format and the body input (or the file path). You can change the name and the tag in the fields below the cards.

The right-click menu of a test data card (Send, Duplicate, colors, Remove)

#6.2 Body formats

Format How to write it Content-Type (HTTP default)
JSON Write it as is. "Format" tidies the indentation application/json
XML Write it as is application/xml
Text Write it as is text/plain
Form One name=value per line (MsgVisor encodes the values; empty lines and lines starting with # are skipped) application/x-www-form-urlencoded
Multipart Same as Form. name=@path attaches a file (same as -F in curl) multipart/form-data
Hex 0-9, a-f, and spaces (an even number of digits) application/octet-stream
Base64 Base64 characters application/octet-stream
Binary Set the path with "File" application/octet-stream

You can write {{variables}} in the body (7.3). The input field shows variables in color.

#6.3 Read the body from a file

Choose "File" in "Body or file" to read the body from a file. The path can be relative or absolute, and ~ is your home folder. For a collection shared with the team, a relative path starts from the workspace folder of that collection. For a collection saved only for you, it starts from the first folder of the open workspace (or your home folder if no workspace is open). You can use the same data for both an HTTP POST and an MQTT publish.

  • The file contents are sent as they are (variables are not expanded).
  • For a collection shared with the team, MsgVisor asks you before sending a file outside the workspace (15). For a collection saved only for you, it does not ask (you made it yourself).

#6.4 Turn responses and received messages into test data

  • HTTP: Click "Use as test data" in the response pane, or drag that button to the row of test data cards. A new card is made with the body and format (JSON, XML, or text) of the response.
  • WebSocket: Drag a timeline row to the row of cards for sending ("Use as test data" also works). A text message becomes JSON if it can be read as JSON, and Text otherwise. Binary frames use the Base64 format.
  • MQTT: Drag a timeline row to the row of Publish cards. You can also click "Use as test data" in the selected message pane. The topic, QoS, and retain are carried over too. A body that is not text uses the Base64 format. A message over 1 MB, of which only the beginning was recorded, cannot be turned into test data.

Values of secret variables in recorded bodies are masked as ********. After you create the test data, rewrite them as {{variables}} if needed.

#6.5 Generate test data

MsgVisor makes many test data cards at once from the shape of the body and a rule for each field. It uses fixed rules, not AI (to ask AI, use "Ask AI to create"; see 14.6).

Click "Generate..." in the header of the test data area, or right-click a request or connection in the tree and choose "Generate Test Data...". The generator opens over the editor. Press Esc or click "Close" to close it.

The test data generator. Rules for each field on the left, and the cards to make with a preview on the right

  • Shape of the body: For a request imported from OpenAPI, MsgVisor uses the requestBody schema. For GraphQL, it uses the variable types of the operation (when the schema has been fetched). For gRPC, it uses the message type. For JSON-RPC, it uses the params of the method (when there is an OpenRPC document; for methods that take positional params, you set a rule for each argument, and each card is an array in argument order). If none of these is available, it infers the shape from the body of the selected card (or the first JSON card if none is selected). A badge at the top shows which one it used. It makes JSON bodies.
  • Rules for each field (left): Each row shows the field name, a type badge, and a required mark. You can choose from these rules: fixed value, sequence (start, step, prefix, digits), random number (min to max, decimals), date range (optionally with time), choose from values (one per line), dummy value (full name, kana name, email, phone, postal code, prefecture, address, company, sentence, word, UUID, IPv4, URL), null, and leave out (for fields that are not required). At first, each field has a rule inferred from its type, format (email, date-time, and so on), allowed values (enum), constraints, and name. For fields that allow null, you can also set how often the value is null. If a rule has an error, its row turns red and you cannot add cards.
  • Valid (tab on the right): Set the number of cards (1 to 100) and the tag. "Other values" makes the random values again. Click a card to show its body in the preview.
  • Invalid and boundary (tab on the right): Candidates made from the constraints of the schema are listed by kind. Select them with the checkboxes (the checkbox of a kind selects all of that kind). Click a candidate to show its body in the preview. Each card breaks only one rule, and the other fields have the same values as the first valid card (so you can tell which violation caused the rejection).

Candidates selected in the invalid and boundary tab. The body of the selected candidate appears in the preview

Kind Cards it makes
Missing required fields For each required field, a body without that field
Wrong types For each field, a value of another type (a number for a string field, a string for a number field, and so on)
null where not allowed null for each field that does not allow null
Out of range and boundary values Values below the minimum or above the maximum (invalid), and values exactly at the minimum or maximum (boundary)
Length and number of items Strings shorter than the minimum or longer than the maximum length, and arrays with too few or too many items (invalid), and the exact lengths (boundary)
Values not in the list A value that is not in the enum
Format and pattern Strings that do not match the format (email, date, uuid, uri, and so on) or the pattern
Unknown fields An extra field added to an object that does not allow unknown fields
Whole body An empty body, and a body that is not valid JSON
  • Data file (tab on the right): Writes many rows (1 to 100,000) made by the valid rules to a CSV or JSON Lines file (for sending in bulk; see 6.7). The column names are the field names (nested fields look like user.name). "Add a card that uses the columns" adds a card whose values are {{column name}}.
  • "Add N cards" adds the cards to the end of the test data. The cards are named like "Valid case 1" and 'Invalid case: "name" is missing', and get a tag (Valid case, Invalid case, Boundary case) and a color mark (green, orange, blue). The expected results are written too (success for valid and boundary cards, failure for invalid cards: 2xx / 4xx for HTTP, OK / INVALID_ARGUMENT for gRPC, no errors / errors for GraphQL, and result / -32602 for JSON-RPC). One undo in the editor removes all the added cards.
  • The rules are not saved to the file (when you open the generator again, it infers them again).

#6.6 Expected results

You can write on a test data card the result that should come back when you send it. For a card with an expected result, MsgVisor compares the result of the send with it and shows an "As expected" or "Not as expected" badge in the response pane. Sending in bulk also uses it to decide pass or fail (6.7).

Cards with expected results. The expected result appears in small type at the top right of each card

  • Write it in the "Expected" field below the cards. For HTTP, write a status code (201) or a class (4xx); separate several with commas (400, 422). For gRPC, write a status name (such as INVALID_ARGUMENT). For GraphQL, choose "Expect success (no errors)" or "Expect errors". For JSON-RPC, write an error code (-32602; separate several with commas), error for any error, or result if you expect a result (the error in the body is compared, whatever the HTTP status). MQTT and WebSocket do not return responses, so you cannot write one for them.
  • If you write nothing, a successful response passes (2xx and 3xx for HTTP, OK for gRPC, no errors and 2xx for GraphQL, a result and 2xx for JSON-RPC). In that case, sending one card does not show pass or fail in the response pane.
  • If there is no response (the connection failed or timed out), the card does not pass even if the expected result is a failure (when sending in bulk, it counts as "No response").
  • In the file, write it like expect: { status: 4xx } (see File format).

#6.7 Send in bulk

Send one request with several test data cards one after another, and check the results in a table. You can use this with HTTP, GraphQL (queries and mutations), gRPC (Unary), and JSON-RPC (sent over HTTP).

Click "Send all..." in the header of the test data area, and the response pane switches to "Send all". Use the tabs above the response pane to go back and forth with "Response" (the tab shows the number of passes and the number of other results).

Results of sending in bulk. A bar of counts, and the status, time, check, expected result, and pass or fail of each row

  1. Choose What to send.
    • Test data cards: Filter by tag ("All tags" or a tag such as "Invalid case"). The listed cards are sent, except the ones you uncheck.
    • Data file: Click "Select file..." and choose a CSV file (the first row is the header), a JSON file (an array of objects), or a JSON Lines file. The encoding can be Auto (detected from the BOM and whether the file is valid UTF-8), or UTF-8, Shift_JIS, EUC-JP, or UTF-16LE. In "Card to send for each row", choose the card to send for each row. The values of a row go into the card and the request as variables named after the columns ({{name}}), and they take precedence over environment variables with the same name. You see the number of rows, the encoding, the first 5 rows, and how columns map to variables (columns used as variables, columns not used, variables taken from the environment, and columns whose names cannot be variables). Up to 100,000 rows can be read.
  2. How to send: Set the interval (milliseconds) and choose whether to "Stop when a result is not as expected".
  3. Click "Send N" to start. While sending, a "Stop" button appears. Closing the editor also stops it.
  • In a production (prod) environment, MsgVisor shows the number of requests and asks you once when you start.
  • Variables are expanded for each send, so dynamic variables (such as {{$uuid}}) change every time. MsgVisor asks for missing secret values when you start.
  • Results: At the top, you see a bar and badges with the counts of passed (green), not as expected (orange), and no response (red), the progress, and the elapsed time. Each table row shows the name of the test data (and the row number for a data file), a status badge, a time bar, the size, the OpenAPI check, the expected result, and pass or fail. Rows that did not pass have a colored line on the left. Click a row to see its response in the response pane. The table lists up to 5,000 rows (all results are counted).
  • Click "CSV" or "JSON" to export the results to a file.
  • What to send, the data file, and how to send are remembered for each request in this workspace (they are not written to the collection file).
  • The send history keeps the whole run as one entry (5.4).
  • For MQTT and WebSocket, choose "Data file" in "Send repeatedly…" to send once for each row (9.6).

#7. Environments and variables

#7.1 Create environments

You create environments on the collection settings page. Open it in one of these ways:

  • Right-click a collection in the tree and choose "Edit Environments…"
  • Choose "Edit Environments…" at the end of the environment list (from the environment button in the editor or the Status Bar)
  • Run the command "MsgVisor: Edit Environments…"

The "Environments" tab of the page is a table with environments as columns and variables as rows. What you enter is saved to the collection right away (there is no save step).

The Environments tab of the collection settings page. Columns are environments and rows are variables. token is a secret variable

Action How
Add an environment The "+" at the right end of the table ("Add environment" when there are no environments)
Rename an environment Edit the name field in the column header, then leave the field or press Enter
Set an environment tag "None / dev / stg / prod" in the column header. The line above the column changes color (red for prod)
Choose what AI agents are allowed to do "AI agents" in the column header. If you do not choose, it follows the environment tag (14.2)
Add a variable "Add variable" below the table. The focus moves to the name field, so type the name right away
Enter a value The cell in the environment's column. A cell with a dotted border is a variable not yet written in that environment
Rename a variable The name field in the row header. It changes in all environments
Delete The trash button of a column or row (MsgVisor asks before deleting)
  • tag is the environment tag (dev, stg, prod). It is used for colors and for the production confirmation (15).
  • Turn a password or token into a secret variable with the "Secret" switch in its row (7.4).
  • "Show YAML" at the top right of the page opens that part of the collection file as text. In YAML, it looks like this:
msgvisor: 3
name: Sample API
environments:
  dev:
    tag: dev
    variables:
      baseUrl: http://localhost:3000
      broker: localhost
      token: { secret: true }
  prod:
    tag: prod
    variables:
      baseUrl: https://api.example.com
      broker: mqtt.example.com
      token: { secret: true }

#7.2 Switch environments

Select the environment of a collection in one of these ways. The selected environment is remembered for each workspace.

  • The environment button in the target line of the editor
  • The environment in the Status Bar
  • The button on the collection row in the tree, or "Select Environment…" in its right-click menu
  • The command "MsgVisor: Select Environment…"

If you have not selected one, the first environment of the collection is used.

The environment list. "Edit Environments…" at the end opens the environment table

#7.3 Write variables

You can write variables as {{name}} in the URL, query, headers, body, and authentication fields, and in the MQTT broker URL, topics, and so on. Just before sending, they are expanded with the values of the selected environment.

  • If a variable's value contains variables, they are expanded too (circular references are not expanded).
  • The editor shows variables in color. Hover over one to see its value in the current environment (secret variables are masked).
  • If a variable has no value (it is not in the environment, or its arguments are wrong), MsgVisor tells you and does not send.

Dynamic variables, which make a new value for each send:

Variable Value
{{$uuid}} A random UUID (v4)
{{$timestamp}} The current time (UNIX seconds)
{{$isoTimestamp}} The current time (ISO 8601, UTC)
{{$randomInt min max}} An integer in the range (0 to 1000 if omitted)
{{$randomHex digits}} A random hexadecimal string (8 digits if omitted)

Within one send, the time has the same value.

#7.4 Secret variables

  • The value of a variable marked { secret: true } in an environment is not written to the file. It is kept in VS Code SecretStorage (the credential store of the OS). Values are kept for each collection, environment, and variable.

  • Turn on the "Secret" switch in a row of the environment table (7.1) to make that variable secret. The current value moves to SecretStorage and is removed from the file. The cell shows "Stored" or "Not set". Click "Set value…" to enter a value, and × to clear it.

  • When you turn the switch off, MsgVisor asks you, then deletes the value in SecretStorage and empties the value (so that the secret value is not written back to the file). Enter the value again.

  • Secret values keep working when you rename an environment or variable (they follow along). When you delete one, its secret values are deleted too.

  • If there is no value yet, MsgVisor asks for it when sending. The value you enter is used from then on.

    Entering the value of a secret variable. The value is stored in SecretStorage

  • The command "MsgVisor: Manage Secret Values…" (also in the right-click menu of a collection in the tree) shows whether each value is stored, and lets you enter it again or clear it.

  • In a collection, write passwords and tokens as variables, like {{token}}. If you write a value that is not a variable in an authentication field, the editor shows a warning.

  • If a collection contains the value (value) of a secret variable, MsgVisor reports it as a problem.

#7.5 Local values

In a collection shared with the team, put values that only you use on your machine (the port of your local server, your own test user, and so on) in the local values. They are saved in a file that is not added to Git (.vscode/msgvisor/local/). A collection saved only for you is all yours, so it does not use local values (write the values in the environments).

  1. Right-click a collection in the tree and choose "Edit Local Values…". If there is no file yet, MsgVisor creates a template with the environment names and opens it.
  2. Under environments.<environment>.variables, write the values of the variables you want to override. You can also add variables and environments that are not in the collection.
  3. When you save, the values are used right away. In the editor, hovering over the variable shows "Local value (this machine only)".

You cannot write secret variables here (they go in SecretStorage; see 7.4). For the format, see File format (in Japanese).

#7.6 Defaults

You can write headers, authentication, TLS, and timeouts once for all requests in the same collection or folder.

  • For a collection: Right-click the collection in the tree and choose "Edit Defaults…" (the "Defaults" tab of the collection settings page)
  • For a folder: Right-click the folder in the tree and choose "Edit Defaults…" (the folder settings page)
  • The page has fields for headers, authentication, TLS (certificates), and timeout. What you enter is saved right away, and items you empty are removed. Items that a folder does not set are inherited from the collection ("Inherit" is selected for authentication and certificate verification).
  • In the file, they are written as defaults: of the collection or folder (you can open it with "Show YAML").

The Defaults tab of the collection settings page

Settings are layered from the outside in: the collection, then folders (outermost first), then the request or connection. Inner values win.

  • Headers (HTTP and WebSocket): The header list in the editor shows inherited rows with a "From …" badge. If you write a row with the same name yourself, the inherited row becomes "Overridden here" and is not sent.

    The Headers tab. Rows inherited from the collection and the folder have a "From …" badge

  • Authentication (HTTP): If the request has no authentication of its own, it inherits it. In the Auth tab, "Inherit" is selected, and the source and type are shown. To change it for this request only, choose another type. Choose "None" to not send the inherited authentication.

  • Timeout (HTTP): The description in the Settings tab shows the inherited value and its source.

  • TLS (HTTP, MQTT, WebSocket): If the request inherits a setting that turns off certificate verification, the "Verify certificates" switch is off and its source is shown. Turn it on to verify certificates for this request only.

For the format, see File format (in Japanese).

#7.7 Get tokens with OAuth 2.0

For an API protected by an authorization server such as Keycloak, use the authentication type "OAuth 2.0". Before sending, MsgVisor gets an access token and sends it as Authorization: Bearer <token>. It gets a new one automatically before the token expires, so you do not need to enter tokens again by hand, even when you send many times.

  1. Usually, choose "OAuth 2.0" for the authentication in the defaults of the collection (or folder) (7.6). For one request only, choose it in the Auth tab. If the OpenAPI document has an OAuth 2.0 or OpenID Connect scheme, this setting is created when you import it (5.6).

  2. Choose the Grant type and fill in the fields.

    Grant type When to use Fields
    Password Calling the API as a user (such as a test user) Token URL, Client ID, Client secret, User name, Password, Scope
    Client credentials Calling the API as an application, without a user Token URL, Client ID, Client secret, Scope
    Browser login Logging in with the browser to call the API (for two-factor authentication and so on) Authorization URL, Token URL, Client ID, Client secret, Scope, Redirect port
    • For Keycloak, the token URL is https://<host>/realms/<realm>/protocol/openid-connect/token and the authorization URL is …/protocol/openid-connect/auth.
    • Write the password and the client secret as secret variables (such as {{password}}; see 7.4). If you write a value that is not a variable, you see a warning. For a public client, leave the client secret empty.
    • "Send client credentials" can usually stay at "Basic header". Choose "In the body" only if the server reads them from the body. To send additional values such as audience, write them in "Extra parameters".
  3. "Get a token to check" on the defaults page checks whether a token can actually be obtained with the values of the selected environment.

With Browser login:

  • When a token is needed (the first send, or when the refresh token cannot get a new one), the login page of the authorization server opens in your default browser. "Log in with the browser to get an access token…" appears at the bottom right of VS Code, and sending continues after you log in. Click "Cancel" in the notification to cancel (it gives up after 5 minutes).
  • After the login, the browser returns to the local address http://127.0.0.1:<port>/callback (MsgVisor listens there only during the login). Register http://127.0.0.1/* as a redirect URI of the client in the authorization server ("Valid redirect URIs" in Keycloak). If the server needs a fixed port, write it in "Redirect port".
  • MsgVisor uses PKCE (S256), so this works with public clients (without a secret) too.

The Auth tab. OAuth 2.0 inherited from the folder, and the token panel (time left, user, client, scope, refresh token). A key badge in the target line

The token panel (in the Auth tab and on the defaults page):

Display Meaning
Not obtained yet (gray) The token is obtained at the next send. "Get token" gets it without sending
Valid · 4:12 left (green) The token you have and the time left. The bar shows the share of time left. The user, client, and scope read from the token, and whether there is a refresh token, are shown too
Expired · renewed when sending (yellow) Less than 30 seconds are left before the expiry. A new token is obtained before the next send
Could not be obtained (red) The reason (for example, invalid_grant: Invalid user credentials) appears below
Set the values of these variables first (yellow) A variable for the token URL or the password has no value
  • "Get new token" gets a new token with the original grant, without using the token you have. "Discard" throws away the token you have (a new one is obtained at the next send).
  • The key badge in the target line also shows the time left (red on failure). Click it to open the Auth tab.

How tokens are renewed:

  • Before sending (a send, a connection, a repeated send, or fetching a schema or services), MsgVisor checks the token and gets a new one if less than 30 seconds are left before the expiry. If the token response included a refresh token, MsgVisor uses it; if that fails, it gets a new token with the original grant.
  • If the response is 401 (UNAUTHENTICATED for gRPC), that token is discarded. MsgVisor does not resend automatically, so send again (a new token is used).
  • Tokens are kept only inside MsgVisor (in memory) and are not written to files. After you reopen VS Code, a new token is obtained at the first send. When you switch environments, a separate token is obtained with the values of that environment.
  • In the sent request and the send history, tokens are masked as ********.
  • This works with HTTP, GraphQL, and gRPC (it is not added to WebSocket and MQTT).

#8. HTTP

#8.1 The request line

  • Method: Choose from GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS. You can write other methods in the file.
  • URL: Starts with http:// or https://. Variables are shown in color.
  • Environment button: Click it to choose an environment.
  • Send (Ctrl+Enter): Sends the body of the selected test data. While sending, it changes to "Cancel".
  • Copy as curl (the button to the left of the Send button): Turns the request that sends the selected test data into a curl command and copies it to the clipboard. Defaults are applied and variables are expanded, but secret variables are written as {{name}}, without their values. A body file is written as its path (--data-binary @path).

#8.2 Tabs

Tab Contents
Body The test data cards and the body of the selected card (6)
Headers A list of names and values. The switch on each row turns sending it on or off. If you do not write Content-Type, it is set from the body format, and a badge shows this
Query A list of names and values (added after the ? of the URL)
Auth None, Basic (user name, password), Bearer (token), API key (name, value, and whether it goes in a header or the query), OAuth 2.0 (7.7)
Settings How long to wait for the response (seconds; if empty, the setting msgvisor.http.timeoutSeconds), whether to follow redirects, and whether to verify certificates
  • Headers are sent in the order written, with their upper and lower case kept. User-Agent (MsgVisor) and Accept (*/*) are added if you do not write them.
  • Up to 10 redirects are followed. When a redirect moves to another origin, Authorization and Cookie are not sent.
  • Write CA certificates and client certificates in request.tls in the file (see File format). If you turn off certificate verification, the editor shows a warning.

#8.3 Read the response

  • Status badge: The code and text. The color is green for 2xx, blue for 3xx, yellow for 4xx, and red for 5xx and failures.

  • Time and size: The time taken (ms) and the size of the body.

  • Timing bar: DNS, TCP connect, TLS, server processing, and download. The "Timing" tab shows a bar and the ms for each item in a table.

    The Timing tab of the response

  • Tabs: "Pretty" (JSON shown as a tree that you can collapse by object and array), "Raw", "Headers", "Timing", and "Sent request" (the URL, headers, and body after expansion; secret values are masked).

  • Buttons: "Use as test data", "Open in editor" (opens the whole body in a new editor; JSON is formatted), and "Copy".

  • When the connection fails, the wait times out, the certificate is not trusted, and so on, the reason appears in the response pane.

  • For a large body, the first 1 MB is shown. Use "Open in editor" to see the whole body.

#8.4 SSE (Server-Sent Events)

If the Content-Type of the response is text/event-stream, MsgVisor does not wait for the end of the body. It shows the events in order as they arrive.

  • The Send button changes to "Stop", and the response pane shows "Receiving" and the number of events. It ends when you click "Stop" or the server closes the stream (neither is a failure).

  • The "Events" tab lists the received events, newest first (a badge with the event type, the beginning of the data, and the size). The filter field filters by event type or content. You can also pause.

  • Select an event to see its details below (the event type, id, the data as a tree, and the history of value in the data). "Use as test data" turns its data into a test data card.

    Receiving SSE. The Events tab lists the received events, newest first

  • The response timeout (the setting msgvisor.http.timeoutSeconds) applies until the response headers arrive. It does not cut the stream.

  • One send keeps up to 1,000 events. Beyond that, the oldest are discarded, and the number discarded is shown.

  • If the connection drops, MsgVisor does not reconnect automatically. Click "Send" again.

#8.5 Sent so far

The band at the bottom of the editor shows a bar for each send, in the order sent (the height is the time and the color is the status). Hover over a bar to see the time, status, duration, and test data; click it to see that response. Up to 50 sends are kept for each file until you close VS Code.

#8.6 Check responses against the OpenAPI document

When you send a request imported from OpenAPI (5.6), MsgVisor checks the response against the document and shows a badge at the top of the response pane.

Badge Meaning
Schema ✓ matches (green) The status is in the document, and the JSON body matches the schema
Schema ✗ N problem(s) (red) The body does not match the schema. N is the number of mismatches
Status N is not in the document (yellow) The document has no response for that status (2XX and default are also checked)
Schema: not checked (gray) The response could not be checked (the document has no schema, the body is not JSON, the Content-Type is not in the document, or the document cannot be read). Hover over the badge to see the reason

Click the badge to open the "Schema check" tab. It lists the mismatches with the "Location in the body" (such as $.items[0].email) and the "Problem" (a required property is missing, wrong type, out of range, wrong format, and so on).

The Schema check tab. Mismatches with the document are shown by location in the body and problem

  • If you fix the document file, the next send uses the fixed version. A document from a URL is read once and used while VS Code stays open.
  • SSE streams are not checked.

#8.7 Complete and validate the body with the OpenAPI document

For a request imported from OpenAPI, MsgVisor completes and validates JSON test data bodies with the requestBody schema of the document. A badge like "requestBody of createPet" appears above the body field.

  • In the body, the keys you can write are suggested with their types and descriptions (required keys first; Ctrl+Space also shows them). At a value position, the allowed values (enums), true / false, and null are suggested.
  • Values of the wrong type, values that are not allowed, and missing required properties get a red mark. Keys that the document does not allow (additionalProperties: false) get a yellow mark. Hover over a mark to see the reason.
  • {{variables}} in the body are expanded when sending, so they are treated as matching anything.
  • The format (format) and range (minimum and so on) are not checked in the body field (they are checked when validating the response).
  • If the document cannot be read, the badge turns yellow; hover over it to see the reason.

#9. MQTT

For an overview of the MQTT editor, see the figure in 3.3.

#9.1 Connection

  • Connection line: The broker URL, the MQTT version, the environment button, a connection status badge (Not connected / Connecting… / Connected / Reconnecting…), and the "Connect" / "Disconnect" button.
  • Connection settings (opened with the gear button in the connection line): MQTT version (5.0 / 3.1.1), client ID (if empty, msgvisor- plus 8 hexadecimal digits is made for each connection), user name, password, keepalive (seconds), session expiry (seconds; 5.0 only), clean start, reconnect automatically, verify certificates, and Will.
  • Will: Turn on the "Will" switch in the connection settings to enter a topic, a message, QoS, retain, and the delay in seconds before the Will is sent (5.0 only). If the connection is lost unexpectedly (the network goes down, there is no keepalive response, and so on), the broker publishes this message. It is not published when you disconnect with "Disconnect".
  • Numbers band: The counts of received and sent messages, received messages per second, how long you have been connected, and bars of the messages received in the last 40 seconds (hover over a bar to see the count in that second).
  • If the first connection fails, the reason (connection refused, host name not found, certificate not trusted, rejected by the broker, timeout, and so on) appears right away. If the connection drops after it was established, MsgVisor reconnects automatically according to the settings and subscribes again.
  • The connection stays open when you close the editor. The tree row shows "MQTT · Connected", and you can disconnect with the button on the row or "Disconnect" in its right-click menu. When you open the editor again, it shows the timeline so far. When you close VS Code, all connections are closed.
  • One file has one connection. If you open the same file in two editors, both show the same connection.
  • If you change the connection settings while connected, the change is used from the next connection.

#9.2 Subscriptions

  • "Subscriptions" on the left lists a color mark, the topic filter, QoS, and a status dot for each subscription (subscribed / Subscribing… / Rejected; for a rejection, the broker's reason is shown too).
  • Enter a topic filter (+ and # are allowed) and QoS in the fields below, and click "Subscribe" to add it. If you are connected, it subscribes right away.
  • Use the buttons on a row to stop / resume or delete a subscription. Subscriptions are written to subscriptions in the file.
  • You can write {{variables}} in topic filters too.

#9.3 Timeline

  • Each row shows the time (to the millisecond), an arrow between "You" and "Broker" (a blue → for sent, an orange ← for received, and a dot for connections, subscriptions, and so on), the topic (in the color of its subscription), the beginning of the body, and the size. New rows appear at the top.
  • Filter: "All / Received / Sent", and a topic field (+ and # are allowed). You can also filter by clicking the tree of received topics.
  • Pause: Freezes the display. While paused, a band shows how many messages arrived; when you resume, they are shown all at once.
  • Clear and Export (9.7).
  • Select a row to see its details in "Selected message" on the right. You can drag a row to the row of Publish cards.
  • Each connection keeps up to msgvisor.timeline.maxEvents events (10,000 by default). Beyond that, the oldest are discarded, and the number discarded is shown.

#9.4 Received topics

The received topics are shown as a tree that you can expand and collapse by level. Each level shows a count and a bar of its share of the total. Leaf topics show a small line chart of the value and the last value. Click one to filter the timeline by that topic (level/# for a level). "Expand all" and "Collapse all" are also available.

#9.5 Selected message

Shows the direction, time, topic, QoS, retain, size, MQTT 5 properties, and the body (JSON as a collapsible tree). If the body is JSON with a value, or is a number itself, a line chart shows how the value of that topic changed (select points with the mouse or the arrow keys). There are "Use as test data" and "Copy" buttons.

To send a sent message again, turn it into a card with "Use as test data", then publish it (the recorded body has its secret values masked).

#9.6 Publish

  • "Publish" at the bottom right has the test data cards, the topic, QoS (0 / 1 / 2), the retain switch, and the body.
  • "Publish" (Ctrl+Enter) sends it. You cannot click it while not connected.
  • When you publish to a topic you subscribe to, a note above the button says that the message will also appear as received.
  • Write MQTT 5 properties (content type, response topic, correlation data, user properties, message expiry interval) in options.properties of the test data in the file (see File format).
  • Send repeatedly: Click "Send repeatedly…" to show the count and interval (milliseconds) fields. "Start" sends the selected card again and again. Variables are expanded for each send, so {{$uuid}} and {{$randomInt 20 30}} change every time. While sending, a progress bar and "Stop" appear. It also stops if the connection drops or you close the editor. In a production environment, MsgVisor asks you once when you start. The send history keeps the whole run as one entry. If you choose "Data file", it sends once for each row of a data file (CSV, JSON, JSON Lines) instead of a count, with the values of the row as variables named after the columns (6.7).

#9.7 Export

"Export" in the timeline saves the records to a JSON Lines file (one JSON per line). Values of secret variables stay masked. For events whose body is over 1 MB, only the beginning is written.

#10. WebSocket

The WebSocket editor has the same layout as MQTT (the target line, the numbers band, the timeline, the selected message, and the send area). It has no subscriptions or received topics columns.

The WebSocket editor. What you sent (→) and what the server returned (←) are listed on the timeline

#10.1 Connection

  • Connection line: The WebSocket URL (ws:// or wss://), the environment button, a connection status badge, and the "Connect" / "Disconnect" button.
  • Connection settings (opened with the gear button): Subprotocols (enter them separated by commas, in order of preference; they are written to the file when you leave the field), headers sent when connecting (such as an authentication token; you can write {{variables}} in the values), reconnect automatically (off by default), and verify certificates.
  • The subprotocol that the server chose appears on the timeline as "Connected (subprotocol …)".
  • If the connection fails, the reason appears (connection refused, host name not found, certificate not trusted, the server rejected the connection (with a status such as 401), or timeout). If the server closes the connection after it was established, the close code and reason appear.
  • The connection stays open when you close the editor. Disconnect with the button on the tree row or "Disconnect" in its right-click menu (same as MQTT).

#10.2 Sending

  • Select a test data card in "Send" at the bottom right, and click "Send" (Ctrl+Enter).
  • The frame type depends on the body format. Hex, Base64, and binary bodies are sent as binary frames; others as text frames.
  • "Send repeatedly…" sends again and again with a fixed count and interval (same as MQTT; see 9.6).

#10.3 Timeline and selected message

  • The timeline lists sent (→) and received (←) messages, pings / pongs from the server, and connections and disconnections. Binary frames have a "Binary" badge.
  • The filter field filters by content (WebSocket has no topics). Pause, clear, and export work the same as MQTT (9.3, 9.7).
  • Select a row to see the direction, time, frame type, size, and body in "Selected message" on the right. If the body is JSON with a value, or a number, a chart shows how the value of the messages changed.

#11. GraphQL

You send GraphQL requests on the same screen as HTTP. A request has one query document, and each test data card holds the variables (JSON) passed to the operation. Switch cards to send the same query with different variables.

The GraphQL editor. In the Operation tab, the query document is at the top and the variables of the selected card are at the bottom. The response is on the right

#11.1 Create a request

Choose the "GraphQL" card on the "New request / connection" screen. The templates are "Empty query" and "Countries example" (looks up a country on a public demo API, with two cards that have different variables).

#11.2 The request line and tabs

  • Request line: A "GraphQL" badge appears instead of the method. The URL (http:// or https://), the environment button, Copy as curl, and Send (Ctrl+Enter) work the same as HTTP.
  • Operation tab: The query document is at the top (the same for all test data), and the variables of the selected card are at the bottom. The query is highlighted, and syntax errors are marked.
    • If the document has several operations (query, mutation), choose the operation to send for each card with "Operation to send" to the right of the variables field. If none is chosen, the border turns yellow and a warning appears in the problem list.
    • Select the "No variables" card to send without variables.
  • The Headers, Auth, and Settings tabs are the same as HTTP (there is no Query tab for the URL). Content-Type: application/json and Accept: application/graphql-response+json, application/json are added if you do not write them, and a badge shows this. The defaults of the collection and folders (headers, authentication, TLS, timeout) are inherited too.
  • {{ }} inside the query is not expanded as a variable. Pass values as GraphQL variables (such as $id). {{ }} inside the variables JSON is expanded.

#11.3 Schema and suggestions

Click the "Schema" badge in the request line to fetch the schema from the endpoint (introspection). It is sent with the same headers and authentication as the request.

Badge Meaning
Fetch schema Not fetched yet. Click to fetch it
Schema 12:03:44 (green) Fetched (at the time shown). Click to fetch it again
Schema (file) Read from the schema file. Click to read it again
Schema failed (red) Could not be fetched. Hover over it to see the reason. Click to try again
  • With a schema, fields and arguments are suggested in the query field (Ctrl+Space also shows them), and fields that are not in the schema are marked.
  • In the variables field, the names, types, and descriptions of the variables of the operation to send are suggested (required ones first). Enum values, true / false, and null are suggested too. Values of the wrong type, values not in the enum, and missing required variables get a red mark, and unknown variables get a yellow mark.
  • The fetched schema is kept for each URL in VS Code's storage (it is not written to workspace files). When you switch environments, the schema for that environment's URL is used.
  • If the server has introspection turned off, set a schema file (SDL .graphql, or introspection result .json) in "Schema file" in the Settings tab.
  • You can still send even if there are schema marks (the schema may be out of date).

#11.4 When you send

  • A GraphQL request is sent as an HTTP POST with { "query": …, "operationName": …, "variables": … } as the body. The timing, Sent so far, the send history, and Copy as curl work the same as HTTP.
  • GraphQL servers often return HTTP 200 even when there are errors, so the response pane shows a GraphQL badge: "data" (there is a result), "No data", or "N error(s)".
  • Errors are listed at the top of the response pane (the error message, the path in the result, and the line and column in the query). Click a line and column to jump to that position of the query in the Operation tab.
  • In a production environment (prod), MsgVisor asks you before sending anything other than a query (such as a mutation).

#11.5 Subscriptions

If the operation is a subscription, the Send button changes to "Subscribe". Click it to list the received results in order in the "Events" tab of the response pane (shown the same way as HTTP SSE; see 8.4).

  • The button changes to "Stop", and the response pane shows "Receiving" and the number of results. It ends when you click "Stop" or the server finishes (neither is a failure).
  • Select a result to see its body as a tree below. Filtering and pausing are the same as SSE.
  • Transport ("Subscription transport" in the Settings tab):
    • WebSocket (graphql-ws): The default. Receives with the widely used protocol (graphql-transport-ws). The response pane shows the connection response (101 Switching Protocols).
    • SSE: Use it with servers that support graphql-sse (distinct connections).
  • Subscription URL: The WebSocket URL. If empty, the request URL is used with http:// changed to ws:// and https:// changed to wss://.
  • Connection parameters (JSON): The value sent when graphql-ws connects. Many servers receive authentication here, so write, for example, { "Authorization": "Bearer {{token}}" } ({{ }} is expanded). The values of the Headers and Auth tabs are also added to the WebSocket connection request.
  • The old protocol (Apollo's subscriptions-transport-ws) is not supported. If the server does not accept graphql-ws, MsgVisor tells you. If the server supports it, try SSE.
  • Even in a production environment, MsgVisor does not ask before subscribing (it only reads).

#12. gRPC

You call gRPC methods on the same screen as HTTP. Each test data card holds the message (JSON) to send. Switch cards to call the same method with different messages. The screen depends on the kind of method: Unary (send one, receive one) and server streaming use the same screen as HTTP, and client streaming and bidirectional streaming use the same screen as WebSocket (12.5).

The gRPC editor (Unary). The request line has the address, the method, a kind badge, and the Services badge

#12.1 Create a request

Choose the "gRPC" card on the "New request / connection" screen. The templates are "Empty call" and "Health check" (calls the standard health check grpc.health.v1.Health/Check of a server with server reflection). If the collection you save it in has a grpcUrl variable, the address is written with that variable.

#12.2 The request line and tabs

  • Request line: A "gRPC" badge appears instead of the method selector. To its right are the address field (like grpc://localhost:50051; grpcs:// for TLS), the method field (package.Service/Method, for example shop.v1.Orders/GetOrder), a button to choose the method from a list, a badge with the kind of method, and the "Services" badge (12.3). The environment button and Send (Ctrl+Enter) are the same as HTTP. You cannot copy it as curl.
  • Message tab: The JSON of the message of the selected card. If there are service definitions, fields are suggested, and wrong types and fields that are not in the definition are marked (12.3). Write field names as written in the .proto (order_id) (the JSON name orderId also works). Write 64-bit integers as strings, enums as names, and bytes as Base64. Select the "Empty message" card to send a message with all default values.
  • Metadata tab: The metadata to send (the gRPC counterpart of HTTP headers). Names are sent in lower case. The headers in the defaults of the collection and folders are also inherited as metadata.
  • Auth tab: The same as HTTP. Basic and Bearer are sent as authorization metadata, and an API key as metadata with its name.
  • Settings tab: Deadline (seconds), whether to verify certificates, .proto files, and import paths.
    • .proto files: The files to read the method definitions from (paths from the workspace folder). Add them with "Add path". If empty, the definitions are fetched from the server by server reflection.
    • Import paths: Folders to search for the files that the .proto files import. google/protobuf/*.proto (Timestamp and so on) can be read without setting them.

#12.3 Choose services and methods

The "Services" badge in the request line shows the state of the method definitions (services).

The method list. For each service, it shows the methods, the request and response types, and a kind badge

Badge Meaning
Fetch services Not fetched yet. Click to fetch them from the server by server reflection (with the same metadata, authentication, and TLS as the call)
Services 12:03:44 (green) Fetched (at the time shown). Click to fetch them again
Services (.proto) (green) Read from the .proto files in the Settings tab. They are read again when the files change, or when you click
Services failed (red) Could not be fetched. Hover over it to see the reason. Click to try again
  • Choose a method: The button to the right of the method field opens the list of methods for each service. It shows the method name, the request and response types, and the kind (Unary, Server streaming, and so on). Filter with the field at the top, and click or press Enter to choose. Press Esc to close.
  • Kind badge: The kind of the method written in the method field. If the method is not in the definitions, a "Not in the services" badge appears. Hover over the badge to see how the method is called.
  • Message suggestions and checks: In the Message tab, the names, types, and descriptions (comments in the .proto) of the fields of the request type of the selected method are suggested (Ctrl+Space also shows them). Enum values are suggested too. Values of the wrong type and values not in the enum get a red mark, and fields that are not in the definition get a yellow mark. Fields written with JSON names (orderId) are checked as those fields too. The "Message HelloRequest" badge above the body shows the type used for suggestions.
  • Services fetched by server reflection are kept for each URL in VS Code's storage (they are not written to workspace files). When you switch environments, the services for that environment's URL are used.

#12.4 When you send

  • The badge in the response pane shows the gRPC status code and name (0 OK in green, others in red; for example, 5 NOT_FOUND). Anything other than OK counts as a failure, and the status name and details appear at the top of the response.
  • The response message is shown as JSON (fields with default values are shown too). The response metadata and trailers are shown in the "Headers" tab.
  • The timing, Sent so far (OK in green, others in red), and the send history (the method and status name) work the same as HTTP.
  • If the message cannot be read as JSON, has fields that are not in the definition, has values of the wrong type, or the method is not in the definitions, MsgVisor shows the reason and does not send.
  • In a production environment (prod), MsgVisor asks you every time before calling (gRPC methods have no mark that tells whether they only read).

#12.5 Streaming

Server streaming (send one, then keep receiving) is called on the same screen as HTTP.

  • "Send" starts the call, and the received messages are listed in order in the "Events" tab of the response pane (shown the same way as HTTP SSE; see 8.4). The button changes to "Stop", and "Receiving" and the count appear.
  • When the server finishes, the status appears in the badge of the response pane. Trailers appear in the "Headers" tab. If you end it with "Stop", a gray 1 CANCELLED badge appears, and it does not count as a failure.
  • A deadline is set only if you write timeoutSeconds (if you do not, the call continues until you stop it or the server finishes).

Client streaming (keep sending, then receive one at the end) and bidirectional streaming (keep both sending and receiving) use the same screen as WebSocket once the kind of method is known from the service definitions (10). If there are no definitions, click the "Services" badge to fetch them.

The bidirectional streaming screen. Start begins the call, and each card you send sends one message

  • Start: Begins the call. The state becomes "In call".
  • Send: Each time you select a card on the right and click "Send" (Ctrl+Enter), that message is sent. Suggestions and checks are the same as in the Message tab. Repeated sending also works.
  • Finish sending: Tells the server that no more messages will be sent (half-close). For client streaming, the response arrives after this. You cannot send after finishing.
  • Disconnect: Cancels the call (CANCELLED).
  • The timeline lists sent messages (↑), received messages (↓), the response metadata, the end of sending, and the status (code, name, details). When the status arrives, the call ends, and you can call again with "Start".
  • You can select a sent message and turn it into a card with "Use as test data" (received messages are of the response type, so they cannot).
  • Edit the metadata, authentication, deadline, .proto files, and import paths in the call settings (the gear button).
  • In a production environment, MsgVisor asks you each time you send a message (same as WebSocket). Streaming sends are not kept in the send history (see them on the timeline and in exports).

#13. JSON-RPC

MsgVisor sends JSON-RPC 2.0 requests over HTTP POST or WebSocket. Each test data card holds only the params (the arguments passed to the method); MsgVisor builds the outer part, {"jsonrpc": "2.0", "method": …, "params": …, "id": …}, when it sends. Switch cards to call the same method with different params. If the URL is http:// or https://, the screen is the same as HTTP; if it is ws:// or wss://, the screen is the same as WebSocket (13.5). If you write the URL as a variable such as {{rpcUrl}}, MsgVisor decides by its value in the selected environment.

The JSON-RPC editor (HTTP). The request line has the URL, the method, and the Methods badge, and the response pane shows an error badge and the contents of the error

#13.1 Create a request

Choose the "JSON-RPC" card on the "New request / connection" screen. The templates are "Empty request" and "Ethereum example" (calls eth_getBalance on a public Ethereum node, with a card with valid params and a card that expects the error -32602). If the collection you save it in has an rpcUrl variable, the URL is written with that variable.

You can also create one in these ways:

  • From a curl command: If the body is a JSON-RPC request, you can make it a JSON-RPC request (5.2).
  • Import an OpenRPC document, or a collection from Postman or another tool (5.7).
  • Convert an existing HTTP request (13.6).

#13.2 The request line and tabs

  • Request line: A "JSON-RPC" badge appears instead of the method selector. To its right are the URL, the field for the method to call (such as eth_getBalance), a button to choose the method from a list, a method mark (not in the document, deprecated), and the "Methods" badge (13.3). The environment button, Copy as curl, and Send (Ctrl+Enter) are the same as HTTP.
  • Params tab: The params JSON of the selected card. Write an array (["0xabc", "latest"]) or an object ({ "limit": 10 }). Select the "No params" card to send without params.
    • Send as a notification: When checked, that card is sent without an id (a JSON-RPC notification). The server does not return a result. The card gets a "notification" mark.
    • Examples (N): Appears if the OpenRPC document has examples for this method. Click it to add a card for each example (13.3).
  • Headers tab: The same as HTTP. Content-Type: application/json and Accept: application/json are added automatically (headers you write take precedence). The headers in the defaults are inherited too.
  • Auth tab: The same as HTTP.
  • Settings tab: Timeout (seconds), whether to verify certificates, and the OpenRPC file (a path from the workspace folder; JSON or YAML).

#13.3 OpenRPC and choosing methods

OpenRPC is a format for describing JSON-RPC APIs. The "Methods" badge in the request line shows the state of the OpenRPC document.

The method list. It shows the method names, the arguments, descriptions, and deprecated marks

Badge Meaning
Fetch methods Not fetched yet. Click to call rpc.discover on the server and get the document (with the same headers, authentication, and TLS as when sending; over WebSocket if the URL is a WebSocket URL)
Methods 3 · 12:03:44 (green) Fetched (the number of methods and the time fetched). Click to fetch it again
Methods 3 (file) (green) Read from the OpenRPC file in the Settings tab. It is read again when the file changes, or when you click
Methods failed (red) Could not be fetched. Hover over it to see the reason. Click to try again
  • Choose a method: The button to the right of the method field opens the list of methods. It shows the method name, the arguments (limit, kind?; ? marks an optional argument), the description, and a deprecated mark. Filter by name and description with the field at the top, and click or press Enter to choose. Press Esc to close.
  • Method marks: If the method in the field is not in the document, a "Not in the document" mark appears; if it is deprecated, a "Deprecated" mark appears.
  • Params suggestions and checks: In the Params tab, the arguments of the selected method are suggested (Ctrl+Space also shows them). For methods that take positional params, you see which argument goes in which position; for methods that take named params, you see the argument names. Values of the wrong type, values not in the allowed list, and missing required arguments get a red mark, and too many arguments or unknown names get a yellow mark. The "Params [limit, kind]" badge above the body shows the arguments used for suggestions.
  • Examples as test data: "Examples (N)" in the Params tab adds a card for each example in the document. If an example has a result, the expected result is set to "result".
  • Checking the result: When a result comes back, MsgVisor checks it against the shape of the result in the document and shows a schema badge (matches / the number of mismatches) in the response pane. It reads the same way as the OpenAPI check (8.6). Errors and notifications are not checked.
  • Error names: For errors listed in the errors of the document, their message is shown as the name.
  • Generating test data: The generator (6.5) makes bodies from the shape of the method's params.
  • A document fetched with rpc.discover is kept for each URL in VS Code's storage (it is not written to workspace files). The request that fetches it is not kept in Sent so far or the send history.

#13.4 When you send

  • The response pane shows the HTTP status and a "result" (green) or "error -32602 Invalid params" (red; the error code and name) badge. The id of the request is also shown, like #7. For an error, the error code, name, message (message), and data appear at the top of the response.
  • JSON-RPC servers often return HTTP 200 even for errors, so in Sent so far, the bar of an error is red and shows the error code. The send history also shows the method and the error code.
  • Responses that break the rules, such as a different id, a missing "jsonrpc": "2.0", or both result and error, are listed in a warning list. If the response is not in the JSON-RPC shape, a "Not a JSON-RPC response" badge appears.
  • Expected results (6.6), sending in bulk (6.7), the timing, and Copy as curl work the same as HTTP.
  • If the params cannot be read as JSON, are neither an array nor an object, or the method is not written, MsgVisor shows the reason and does not send.
  • In a production environment (prod), MsgVisor asks you every time before sending (JSON-RPC methods have no mark that tells whether they only read).

#13.5 Send over WebSocket

If the URL is ws:// or wss://, the screen is the same as WebSocket (10). Connect with "Connect", then each time you select a card on the right and click "Send" (Ctrl+Enter), one request with an id is sent.

The JSON-RPC WebSocket screen. On the timeline, each response is paired with its request by id, with the response time and the result or error

  • Timeline: The row of a sent request (↑) shows #id, and the row of a received response (↓) shows #id, "✓ result" or "✗ error -32602", and the response time. Even if responses arrive out of order, they are paired with their requests by id. A request waiting for a response has a spinner. If the wait time ("Timeout" in the settings, or the setting value if you do not write one) passes, a "No response to #id … within N seconds" row appears. Notifications from the server (such as eth_subscription) are shown with a "notification" mark. The field at the top filters by method or content.
  • Selected message: For a request, it shows the id, the time to the response, and "Go to the response"; for a response, it shows the result / error and "Go to the request". Click to select the other half of the pair.
  • Cards sent as notifications (13.2) have no id, and no response is waited for.
  • Repeated sending (also for each row of a data file) works. Sending in bulk does not.
  • Edit the headers added to the connection request, authentication, the wait time, certificate verification, and the OpenRPC file in the connection settings (the gear button).
  • In a production environment, MsgVisor asks you each time you send (same as WebSocket). What you send over WebSocket is not kept in the send history (see it on the timeline and in exports).

#13.6 Convert an HTTP request to JSON-RPC

An HTTP request whose body is a JSON-RPC request (made in Postman or another tool) can be turned into a JSON-RPC request with "Convert to JSON-RPC..." in its right-click menu in the tree.

  • Before converting, MsgVisor shows the method and the number of cards to turn into params, and asks you to confirm.
  • The method of the first JSON-RPC body is written to the request. Cards that called other methods keep only their params (you are told so when asked to confirm). Cards whose body is not JSON-RPC are kept as they are.
  • Cards with requests that have no id become notification cards. Expected results (statuses) are kept.
  • The query goes back into the URL, and the JSON Content-Type and Accept headers, which are added automatically, are removed. The URL, other headers, authentication, TLS, and the wait time are kept.
  • If the request is open in an editor, you can undo the conversion with undo in the editor.

#14. Using MsgVisor with AI agents

AI agents (agent mode of the chat in VS Code, Claude Code, Codex, and so on) can use the requests saved in MsgVisor. MsgVisor has no AI of its own. It gives tools to your agent through MCP (Model Context Protocol).

  • Look things up: Read collections, requests, test data, and the schemas of documents (OpenAPI).
  • Send and check: Send requests, and read the responses and the results of the document check. MsgVisor adds the authentication (tokens, passwords, secret variables), so the agent never gets it. An agent can send read-only requests (such as GET) by itself. For requests that change data, such as POST, you confirm each one before it is sent, in environments where you allow it (14.3).
  • Use connections: Open MQTT and WebSocket connections and read the received messages. Sending (publishing) is confirmed the same way as requests that change data (14.4).
  • Add drafts: Add test data and requests to a collection. The agent only adds them and does not send them; you send them.
  • Read what you are looking at: Read the open request and its last response or error, and the records of what was sent and received on open connections.

Examples of what to ask:

  • "Using MsgVisor, send the request that lists the pets and check the response."
  • "Why did the request in my editor fail?"
  • "Add test data for invalid input to the request that creates a pet."
  • "Connect to the sensors broker and tell me what the devices are sending."
  • If you also have DBVisor: "Send the request that lists the orders, and check that it matches the orders table in the database."

You can also ask from the editor: "Ask AI" in an error response, and "Ask AI to create" for test data (14.6).

#14.1 Getting started

Run the command "MsgVisor: Connect AI Agents..." (also in the "…" menu of the Collections view) to open the Connect AI Agents page.

The Connect AI Agents page. Choosing an agent card shows the steps and the register button

  1. Choose your agent: Choose the agent you use from the cards.
  2. Set it up:
    • Chat in VS Code: No setup is needed. Open the chat in agent mode, and the MsgVisor tools are available. If you are asked whether to trust or start the server, allow it.
    • Claude Code, Codex: Click "Register with Claude Code" (for Codex, "Register with Codex"). Then start a new conversation (session). Conversations that were already open do not get the tools.
    • Other agents: Register the command shown on the page as a stdio MCP server.
  3. Ask the agent: Start a terminal agent in a folder that is open in VS Code. It uses the MsgVisor collections of that window.
  • External agents such as Claude Code and Codex need Node.js to start MsgVisor.
  • In a WSL, SSH, or container window, start the agent in a terminal in the same place (such as the terminal of that window).
  • While an agent is connected, the Status Bar shows a robot icon and "MsgVisor". Hover over it to see the names of the connected agents. Click it to open the Connect AI Agents page.

#14.2 What agents are allowed to do

What agents can do is set for each environment. Choose it in "Collections That Agents Can Use" on the Connect AI Agents page, or in "AI agents" in the environment column header of the collection settings page (7.1).

"Collections That Agents Can Use" on the Connect AI Agents page. Choose how much agents may do in each environment

Level What agents can do Environments with this level when you do not choose
Not allowed Nothing (a collection that is not allowed in any environment is invisible to agents) prod environments
Definitions only Read requests and test data, and add drafts stg environments and environments without a tag
Send read-only requests The above, plus send GET, HEAD, OPTIONS, and GraphQL queries and read the responses, and open MQTT and WebSocket connections and read the records dev environments
Also send requests that change data (asks each time) The above, plus send POST, PUT, PATCH, DELETE, GraphQL mutations, gRPC calls, and JSON-RPC calls (sent over HTTP), and send on connections (MQTT publish, WebSocket send). You confirm each one before it is sent (Only environments you choose)
  • If you do not choose, the level follows the environment tag ("Follows the tag (…)" in the list). Environments without a tag might be production, so agents cannot send there. For an environment where agents should send, give it the dev environment tag or choose "Send read-only requests".
  • "Also send requests that change data" works only in the environments you choose. You cannot choose it for prod environments (even if you write it directly in the collection file, the level stops at sending read-only requests).
  • In a collection without environments, agents can read the definitions and add drafts, but cannot send. To let them send, create an environment.
  • The level you choose is written to the environment in the collection file (such as agent: read; see File format). For a collection shared with the team, it applies to the team.
  • In environments where "Also send requests that change data" is not chosen, agents cannot send requests that change data. They add drafts (test data, requests), and you check and send them.
  • Agents cannot start gRPC client streaming or bidirectional streaming calls (they can read the records of calls you started).
  • Agents cannot open or send on JSON-RPC WebSocket connections.

#14.3 What you are asked to confirm

The first time an agent does something, and before it sends anything that changes data, MsgVisor asks you in a VS Code dialog.

When What you are asked Answers
The first time an agent reads a collection Whether the requests, test data, and responses may be given to the agent. The agent may send them to its AI service "Allow" (remembered for each collection), "Allow Only This Time"
The first time an agent sends to or connects to a destination (host) Whether to send to that destination with the request's authentication. This prevents an agent from changing the URL to send your credentials to another server Same as above
When an agent sends a request that changes data, or sends on a connection (only in environments with "Also send requests that change data") Whether to send that request. You see how and where it is sent, the environment, the name of the test data, and the beginning of the body (and the topic for MQTT) "Send", "Send and Skip This Question While Connected", Cancel
  • You can withdraw permission with "Withdraw" for the collection on the Connect AI Agents page (the destinations you allowed are withdrawn too).
  • "Send and Skip This Question While Connected": Choose this when the agent sends the same request many times (such as a POST during development). You are no longer asked only when that request is sent to that environment with the same method (such as POST), even if the body changes. When the agent disconnects, this is reset.
  • If you cancel, nothing is sent. The agent is told that you did not allow it.
  • If a secret variable has no value, the agent is refused without showing an input box, and VS Code shows a notification ("Enter the Value"). Enter the value, then ask again.
  • For OAuth 2.0 with browser login, agents do not open the browser. If you first click "Get token" in the Auth tab of the editor, the agent can send with that token (7.7).

#14.4 Let agents use connections (MQTT, WebSocket)

Agents can open saved connections and read the received messages. They can do this in environments with "Send read-only requests".

  • Connect: Agents connect in the environment you have selected. For MQTT, the subscriptions in the definition are made, and agents can also add topic filters. Connections that agents open appear in the editor and the tree, so you can watch them too.
  • Read: Agents can read the records of connections you opened and of connections they opened. They can also wait for new messages to arrive and read them ("send, then wait for the reply").
  • Send (MQTT publish, WebSocket send): Only in environments with "Also send requests that change data", and you are asked before each send (14.3). Agents send saved test data, or a body they wrote (and the topic for MQTT).
  • Disconnect: Agents can close only the connections they opened. They do not close connections you opened. When the agent disconnects, MsgVisor closes the connections that the agent opened.
  • Each time an agent connects, sends, or disconnects, the timeline shows a row such as "The AI agent (…) is sending a message." What agents send is also kept in the send history, marked "AI (…)".
  • Records of a connection are given according to the level of the environment it was opened in. For example, the records of a connection you opened in stg are not given to the agent even if you later select dev.

#14.5 What agents add

  • When an agent adds test data or a request, a notification appears ("The AI agent (…) added "…" to "…". It was not sent."). "Show" opens that request, and "Undo" reverts the addition. A request the agent added opens in the editor.
  • Test data is not added to a request that has unsaved changes. Save or undo them first.
  • Agents cannot add test data that reads from a file (6.3). They add test data with the body written directly.

#14.6 Ask AI from the editor

Buttons in the editor create a request text for your agent. MsgVisor does not call AI; it hands the text to your agent.

"Ask AI" in an error response, and "Ask AI to create" in the header of the test data area

Button Where it appears What it asks
Ask AI The response pane when something went wrong (a send failure, a status of 400 or more, a gRPC status other than OK, GraphQL errors, a JSON-RPC error, or a response that does not match the document) Find the cause and how to fix it. The text includes the name of the request, the environment, the test data, the result, the mismatches with the document, and the beginning of the response body
Ask AI to create The header of the test data area (also in the Publish and Send areas) Create test data (valid and invalid) for the request and add it. The agent adds the cards (with the MsgVisor tools) and does not send them

When you click one, choose how to hand it over:

  • Ask in the VS Code Chat: Opens the chat with the text filled in. You send it. You can check the text and add to it before sending.

  • Copy the Request for Another Agent: Paste it into the chat of Claude Code, Codex, or another agent.

  • The response body is included in the text only when the environment it was sent in is "Send read-only requests" or higher (values of fields whose names show they are secret become ***). Otherwise, the text says that it was not included.

  • The buttons appear when the integration is on (the setting msgvisor.agent.enabled) and the workspace is trusted.

#14.7 Ready-made prompts

In your agent, you can choose ready-made prompts from MsgVisor (in the VS Code chat, type /; in Claude Code, choose MsgVisor's from /. How they appear depends on the agent).

Name What it does
explain_failed_request Finds the cause of the error in the request open in the editor and how to fix it
create_test_data Creates test data (valid and invalid) for a request and adds it. You can pass the names of the request and the collection (if omitted, the open request is used)
check_requests Sends the read-only requests of a collection and makes a table of the statuses, times, and document checks. You can pass the names of the collection and a folder

Request definitions can also be read as resources (msgvisor://<collection>/requests/<request>). Use them with agents that can attach resources.

#14.8 What MsgVisor protects

Safeguard Details
Only saved requests are sent Agents send only saved requests, and only in environments you allow. Unless you allow more, they send only requests that do not change data (GET, HEAD, OPTIONS, GraphQL queries)
Each request that changes data is confirmed Even in environments with "Also send requests that change data", MsgVisor shows you the contents and asks before sending. It cannot be chosen for prod environments (14.3)
Secret values are not given Passwords, tokens, and the values of secret variables are not given to agents. MsgVisor adds them when it sends. Authentication values written directly in a definition are given as *** too
Secret values in responses are masked If a response contains the same text as a secret value used for sending, it is masked. Values of fields whose names show they are secret (password, token, Authorization, Set-Cookie, and so on) also become *** (the setting msgvisor.agent.maskedFields)
Destinations are confirmed The first time an agent sends to or connects to a destination, MsgVisor asks you (14.3)
Outside files are not sent Test data that reads a file outside the workspace is not sent by agents
Responses and records follow the environment they were sent in Whether a response or connection record is given to an agent depends on the level of the environment it was sent or connected in. Changing the selected environment later does not give it
Limits Bodies up to 50,000 characters, and time up to 30 seconds (you can change these in the settings; see 16.1)
Records What agents send is kept in the send history, marked "AI (agent name)". The response pane of an open editor also shows "Sent by the AI agent (…)". Connections that an agent opened are closed when the agent disconnects
Untrusted workspaces Agents cannot be used
  • What an agent reads (requests, test data, responses) is sent to the AI service of that agent. Allow only data that you may send there.
  • A server that changes state even on GET is still treated as receiving a read-only request. Values in a response whose names do not show they are secret cannot be masked. It is safer to let agents use environments with development servers and credentials with few permissions.
  • To stop the integration, click "Turn Off the Integration" at the bottom of the Connect AI Agents page (the setting msgvisor.agent.enabled).

#15. Safeguards against mistakes and leaks

Trying to send in a production (prod) environment. A red band appears at the top of the editor, and MsgVisor asks before sending

Safeguard Details
Production band and confirmation In an environment tagged prod, a red band appears at the top of the editor. MsgVisor asks you before HTTP sends (except GET, HEAD, and OPTIONS), GraphQL mutations, gRPC calls, MQTT publishes, and WebSocket sends. When sending in bulk or repeatedly, it asks once at the start (you can turn this off with the setting msgvisor.safety.confirmOnProduction)
Environment colors In the tree, the environment button in the editor, and the Status Bar: green for dev, yellow for stg, and red for prod. The environment name is shown too, not only the color
Secret values are not written to files Values of secret variables are kept in SecretStorage. If you write a value that is not a variable in an authentication field, you see a warning. When you import from other tools, secret values also go into SecretStorage
Secret values are not kept in records In the "Sent request" of a response, the timeline, and exports, the values of secret variables and OAuth 2.0 access tokens are masked as ********. Access tokens are not written to files either
Files outside the workspace In a collection shared with the team, if a test data body points to a file outside the workspace, MsgVisor asks before sending (so that a collection from a cloned repository cannot send your private keys or other local files)
Untrusted workspaces Nothing is sent and no connection is made. AI agents cannot be used either
AI agents Agents do not get secret values, and the first send to a destination is confirmed. Agents can send read-only requests by themselves; requests that change data are confirmed one by one in environments you allow (this cannot be allowed in prod environments; see 14.8)
No communication from the Webview The screens (Webviews) do not communicate with the outside. All sending is done in the extension itself (the Extension Host)

#16. Settings and keyboard shortcuts

#16.1 Settings

Setting Default Description
msgvisor.http.timeoutSeconds 30 How long to wait for an HTTP response (seconds; 0 means no limit). request.timeoutSeconds of a request takes precedence
msgvisor.http.followRedirects true Whether to follow HTTP redirects. request.followRedirects of a request takes precedence
msgvisor.timeline.maxEvents 10000 The maximum number of timeline events kept for each connection
msgvisor.safety.confirmOnProduction true Whether to ask before sending and publishing in prod environments
msgvisor.history.enabled true Whether to keep a send history
msgvisor.history.maxEntries 1000 The maximum number of history entries kept for each workspace
msgvisor.agent.enabled true Whether AI agents can use MsgVisor (14)
msgvisor.agent.maxBodyLength 50000 The maximum number of characters of a body given to agents (1,000 to 1,000,000)
msgvisor.agent.maxEvents 100 The maximum number of record events (received messages and so on) given to an agent at a time
msgvisor.agent.timeoutSeconds 30 The time limit (seconds) for requests sent by agents, and for waiting for new messages on a connection
msgvisor.agent.maskedFields *password*, *token*, authorization, and others Names of JSON fields and headers whose values agents get as *** (* matches any characters)

#16.2 Commands

Command Description
MsgVisor: New Request / Connection… Opens the "New request / connection" screen
MsgVisor: Go to Request… Filters the requests and connections of all collections by name, folder, or URL, and opens one
MsgVisor: New Collection… Creates a collection (asks only for the name)
MsgVisor: Create Sample Collection Creates the collection "MsgVisor sample"
MsgVisor: Import from OpenAPI… Opens the OpenAPI import screen (5.6)
MsgVisor: Import from Other Tools (Postman, Insomnia, Bruno)... Opens the screen for importing from other tools. It can also read OpenRPC documents (5.7)
MsgVisor: Select Environment… Selects the environment of the collection of the active request or connection
MsgVisor: Manage Secret Values… Enters secret values again or clears them
MsgVisor: Edit Environments… Opens the environment table of the collection of the active request or connection (7.1)
MsgVisor: Get Started Opens the four-step walkthrough
MsgVisor: Connect AI Agents... Opens the Connect AI Agents page (14.1)
MsgVisor: Clear Send History Clears the send history of this workspace

#16.3 Keyboard shortcuts

Key Where Action
Ctrl+Enter (Cmd+Enter on macOS) HTTP, GraphQL, gRPC, and JSON-RPC editors Send (Subscribe for a GraphQL subscription)
Ctrl+Enter MQTT editor Publish
Ctrl+Enter WebSocket editor, gRPC streaming screen, JSON-RPC WebSocket screen Send
Ctrl+Enter "New request / connection" screen Create and open
Ctrl+Z / Ctrl+Shift+Z, Ctrl+Y Editor (including inside input fields) Undo / redo in the file
Ctrl+S Editor Save
Enter Collections view Open (expand or collapse a folder)
Ctrl+Enter (Cmd+Enter on macOS) Collections view Send (opens the editor and sends; for MQTT, WebSocket, and JSON-RPC over WebSocket, connects if not connected)
Ctrl+N / Ctrl+Shift+N (Cmd on macOS) Collections view New request / new folder (at the location of the focused row)
Ctrl+C / Ctrl+X / Ctrl+V (Cmd on macOS) Collections view Copy / cut / paste
Ctrl+D (Cmd+D on macOS) Collections view Duplicate
F2 Collections view Rename
Delete (Cmd+Backspace on macOS) Collections view Delete ("Undo" in the notification restores it)
Ctrl+Enter (Cmd+Enter on macOS) Send History Send again
Delete (Cmd+Backspace on macOS) Send History Delete from the history

#17. Troubleshooting

Problem What to do
Nothing appears in the tree Check that a folder (workspace) is open. If there are no collections, a welcome message appears
Tree shortcuts (F2, Ctrl+C, and so on) do not work, or act on another row Shortcuts work on the focused row (the row with a border, where the arrow keys took you) while a tree row has the focus. If several rows are selected and the focused row is among them, they act on all the selected rows. They do not work while you type in the tree's search field, or while a button at the top of the view has the focus
A tree row turns yellow or red and gets a "!" It means the last send returned 4xx (yellow), or returned 5xx or could not connect (red). Hover over the row to see the result. It disappears when the next send succeeds
A tab opened from the tree is replaced by the next one you open It is a preview tab (its name is in italics). To keep it, double-click the tab or edit its contents. If you turn off the VS Code setting workbench.editor.enablePreview, tabs always stay open
Clicking "Send" on a tree row does not send If the definition has a problem or a variable has no value, a message appears in the editor that opened. Check the message at the top of the editor. In a production (prod) environment, it is sent after you answer the confirmation
A request cannot be saved Check whether the collection file opened with "Show YAML" has unsaved changes. Changes to an id, and content that is not valid YAML, are not saved either
"Fix the problems in this file before sending." appears Look at the "Problems" list at the top of the editor, and fix the file
"These variables have no value" appears Check whether the selected environment has that variable
"Sending and connecting are disabled in untrusted workspaces." appears Trust the workspace (2.4)
Connection refused Check the host and port of the URL, and whether the server or broker is running
The certificate is not trusted Set the CA certificate in tls.ca, or, in a test environment, turn off "Verify certificates"
gRPC shows "This method sends a stream of messages." It is a client streaming or bidirectional streaming method. Click the "Services" badge to fetch the services, and the screen with "Start" appears
gRPC shows "The definitions could not be fetched by server reflection" If the server does not support reflection, set the .proto files (and import paths) in the Settings tab
JSON-RPC shows HTTP status 200 even though there is an error JSON-RPC servers often return 200 even for errors. Tell them apart by the "error" badge in the response pane and the red bar in Sent so far. If you write the error code as the expected result, you also get pass or fail (13.4)
JSON-RPC shows "Methods failed" If the server does not support rpc.discover, set the OpenRPC file in the Settings tab (13.3)
JSON-RPC shows "This JSON-RPC request uses WebSocket." The URL (the variable's value) is ws:// or wss://. If the screen has not changed to the connection layout, select the environment again or reopen the editor. Connect with "Connect", then send
You entered a wrong secret value Enter it again with "MsgVisor: Manage Secret Values…"
No messages arrive in MQTT Check the status dot of the subscription (subscribing or rejected), the topic filter, and the timeline's filter and pause
You are asked every time in production This prevents sending to production by mistake. To stop it, turn off msgvisor.safety.confirmOnProduction
A file from another tool cannot be read Check that you chose: for Postman, an exported collection (choose environment-only files together with the collection); for Insomnia, an exported file (design documents and environment-only files are not read); for Bruno, the collection folder (a folder with bruno.json or opencollection.yml); for OpenRPC, a document with openrpc and methods at the top level
Text in the "Data file" of sending in bulk is garbled Choose the encoding again (CSV files saved by Excel are often Shift_JIS)
An OpenAPI document cannot be read Check that it has openapi: 3.x or swagger: "2.0" at the top, and that it is valid YAML. If you are asked whether to read $refs on the network, choose "Read" (they cannot be read in untrusted workspaces)
"Schema: not checked" appears Hover over the badge to see the reason. If you moved or renamed the document, fix openapi: { source } in the collection (you can open it with "Show YAML")
Something does not work Choose "MsgVisor" in the Output panel to see the log

#18. FAQ

Q. Is it safe to put collections shared with the team (.vscode/msgvisor/) in Git? A. Yes. If you make passwords and tokens secret variables, they are not written to the file. Screen state, such as the selected environment, is not written to the file either. Save collections that you do not want in Git as "Only me".

Q. Can I use MsgVisor without opening a folder? A. Yes. Collections saved only for you work in a window with no folder open (new collections, new requests, OpenAPI import, and the sample). The send history is kept too.

Q. Is the send history kept? A. Yes. What you send (HTTP, GraphQL, gRPC, and JSON-RPC sends and responses, MQTT publishes, and WebSocket sends) is kept in the "Send History" of each workspace (5.4). From a history row, you can also send again with the same test data. Received messages are not kept, so export the MQTT and WebSocket timelines (gRPC streaming and JSON-RPC sends over WebSocket are also seen on the timeline).

Q. Can I import curl commands, OpenAPI documents, and Postman collections? A. You can import curl commands with "Import" on the "New request / connection" screen (5.2), OpenAPI and Swagger 2.0 documents with "Import from OpenAPI" (5.6), and Postman, Insomnia, and Bruno collections and OpenRPC documents with "Import from Other Tools" (5.7). From the HTTP editor, you can copy a request as a curl command.

Q. Can I use WebSocket, SSE, GraphQL, and gRPC? A. You can use WebSocket (10), SSE (8.4), GraphQL queries, mutations, and subscriptions (11), and gRPC Unary and streaming calls (12). GraphQL and gRPC also offer suggestions and checks based on the schema (service definitions).

Q. Can I keep sending to an API protected by Keycloak or a similar server? A. With the authentication type "OAuth 2.0", MsgVisor gets an access token before sending and gets a new one automatically before it expires (7.7). The grant type can be Password, Client credentials, or Browser login.

Q. Can AI (Claude Code or Copilot) send or create requests? A. Yes. After you set it up on the Connect AI Agents page, an agent can send requests and check the responses, open connections and read messages, and add drafts of test data and requests (14). Passwords and tokens are never given to the agent. For requests that change data, such as POST, either the agent prepares a draft and you send it, or you choose "Also send requests that change data" for the environment and confirm each one before it is sent.

Q. Can I use a proxy? A. Proxies are not supported yet.

Q. Can I run scripts before sending or after receiving? A. No. For safety, there are no plans for a script feature in v0.x. Scripts and tests imported from other tools are kept as comments before the items (5.7). To check responses, you can use expected results (6.6).

Q. Can I give a request to someone else, or copy it to another collection? A. Select a row in the tree and press Ctrl+C to copy it. YAML in the same form as the collection file goes to the clipboard. Select another collection or folder and press Ctrl+V to paste it. You can also paste it into a chat or email to share it (the person who receives it copies the text and pastes it into the tree). Values of secret variables are not included (5.3).

Q. Can I quickly open the request I want among many? A. The magnifying glass button at the top of the tree (the command "MsgVisor: Go to Request…") filters all collections by name, folder, or URL so you can open one (5.3). You can also focus the tree and type to filter within the tree.

Q. Can I use the same test data for both HTTP and MQTT? A. Yes. Put the body in a file, and choose "File" in the test data for both (6.3).

Q. Can I quickly make lots of valid and invalid test data? A. "Generate..." makes many valid cards at once from the shape of the body and rules, and lets you choose invalid and boundary candidates to add (6.5). The expected results are written too, so when you send them with "Send all", you see pass or fail right away (6.7).

Q. Can I send CSV data one row at a time? A. Choose a data file in "Send all", and a card is sent for each row. Write the column names as variables in the card ({"name": "{{name}}"}; see 6.7).