Bruno MCP Studio

v2.6.0
io.github.Ostico/bruno-mcp-studio Checked 3 hours ago Published 10 days ago

Author, edit and run Bruno collections as files: HTTP, WebSocket, gRPC, per-request pass/fail.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

create_collection Create Bruno Collection

Create a new Bruno API testing collection with configuration. outputPath is the PARENT directory and name is appended to it: outputPath "/work/apis" with name "Billing" creates the collection at /work/apis/Billing. Do not put the collection name in outputPath as well. The new collection is also added to the workspace registry that `list_collections` reads rather than the disk, so a collection missing from it is invisible to that tool and to the Bruno app. The result says whether it was registered and, if not, why.

ParameterTypeDescription
name *string
outputPath *stringAbsolute path of the PARENT directory to create the collection directory in. name is appended: "/work/apis" with name "Billing" creates /work/apis/Billing, and passing "/work/apis/Billing" here would…
baseUrlstring
descriptionstring
formatstring
ignorearray
registerInWorkspacebooleanSet false to create the collection without touching any workspace file. It will not appear in list_collections until something else registers it.
workspacePathstringAbsolute path of the workspace.yml to register the new collection in. Defaults to the same one list_collections reads: BRUNO_WORKSPACE_PATH, or the Bruno app's workspace for this platform.

create_environment Create Bruno Environment

Create an environment file for a Bruno collection. Writes the WHOLE file, so it REFUSES a name that already exists rather than overwriting it — the error names the existing variables and which ones a replace would delete, so you can merge with update_environment, pick another name, or retry with overwrite: true.

ParameterTypeDescription
collectionPath *stringAbsolute path to existing collection directory.
name *string
variables *Either a flat name-to-value map, or a list of variable objects when you need flags. Use the list form to declare a secret at create time: a secret variable is stored as a name only (no format persists…
overwritebooleanReplace an environment that already exists. Without this an existing name is refused. Keys in the file that this tool does not model are preserved either way.

update_environment Update Bruno Environment

Partially update an existing Bruno environment by MERGING the provided variables into the existing ones. Variables not listed are preserved, unlike create_environment, which replaces the whole file.

ParameterTypeDescription
collectionPath *stringAbsolute path to existing collection directory.
name *stringName of the existing environment to update.
variables *objectVariables to merge into the environment. Existing variables not listed here are kept.

set_environment_variable Set Environment Variable

Set (add or update) a single variable in an existing Bruno environment. MERGES into the environment — all other variables are preserved.

ParameterTypeDescription
collectionPath *stringAbsolute path to existing collection directory.
environment *stringName of the existing environment.
name *stringVariable key to set.
value *string | number | booleanVariable value.
enabledbooleanWhether the variable is enabled. Persisted: enabled=false is written as a disabled variable.
secretbooleanWhether the variable is a secret. Persisted. IMPORTANT: marking a variable secret means its VALUE IS NOT SAVED — Bruno stores a secret variable as a name only (.bru lists it under vars:secret, .yml…

remove_environment_variable Remove Environment Variable

Remove a single variable from an existing Bruno environment. MERGES into the environment — all other variables are preserved.

ParameterTypeDescription
collectionPath *stringAbsolute path to existing collection directory.
environment *stringName of the existing environment.
name *stringVariable key to remove.

write_request Write Bruno Request

Create a request file or change an existing one (.bru and .yml). The locator decides which: collectionPath plus name creates, filePath changes what is already there. Creating never overwrites — an existing file is refused, so address it by filePath. Changing is a partial merge: only provided fields are updated and every other field is preserved. Pass requests to write a whole set in ONE call, not one call per request. Authors HTTP requests by default, WebSocket requests with kind "websocket" (url plus websocket.messages) and gRPC requests with kind "grpc" (url plus grpc.method, grpc.protoPat…

move_request Move Request

Relocate a request file to another folder, or to another collection entirely. Pass copy:true to duplicate it instead of moving it. The bytes are moved verbatim, nothing is parsed and rewritten, so seq arrives unchanged and may tie with a request already there; that is reported, and Bruno breaks such a tie by filename. The file keeps its name: use write_request with filename to rename it. The new path comes back in the response.

ParameterTypeDescription
filePath *stringAbsolute path to the .yml or .bru request file to move. Get from list_requests or get_collection_stats.
copybooleanLeave the original in place and write a duplicate at the destination. Since the file keeps its name, a copy needs a different folder or collection.
targetCollectionPathstringAbsolute path to the collection it should land in. Omit to move within the request's own collection.
targetFolderstringFolder inside the target collection, relative to its root, e.g. "auth/login". Omit for the collection root. Created if it does not exist.

add_test_script Add Test Script

Add pre-request, post-response, or tests scripts to a Bruno request. Canonical scriptType values are pre-request/post-response/tests; the aliases before-request (→ pre-request) and after-response (→ post-response) are also accepted. Appends to any existing script of that type by default — pass scriptMode:"replace" to overwrite it, or use remove_script to clear it. Assertions must be wrapped in test("name", function() { ... }) to be reported. Scripts run as async functions: top-level await works, and bru.sleep(ms), setTimeout and setInterval spend the script timeout (settings.timeout, def…

ParameterTypeDescription
bruFilePath *stringAbsolute path to the .yml or .bru request file. Get from list_requests or get_collection_stats.
script *stringScript body. For post-response/tests, wrap every assertion in a test() block — test("status is 200", function() { expect(res.getStatus()).to.equal(200); }); — because only test() blocks are record…
scriptType *stringScript type. Canonical: pre-request, post-response, tests. Aliases: before-request (→ pre-request), after-response (→ post-response).
scriptModestringHow to write the script. "append" (default) concatenates onto any existing script of this type; "replace" overwrites it. Each script type has its own slot in both .bru and .yml, so replacing one leave…

remove_script Remove Script

Delete a pre-request, post-response, or tests script from a Bruno request, leaving the rest of the request intact, including duplicate blocks accumulated by appending. Canonical scriptType values are pre-request/post-response/tests; the aliases before-request and after-response are accepted. Removing all scripts also drops the now-empty script container.

ParameterTypeDescription
bruFilePath *stringAbsolute path to the .yml or .bru request file. Get from list_requests or get_collection_stats.
scriptType *stringWhich script to remove. Both .bru and .yml keep the three script types in separate slots, so removal is precise: clearing tests leaves a post-response script in place, and vice versa.

delete_request Delete Requests

Permanently delete request files from a Bruno collection. One confirm covers the whole list. Each file is unlinked and cannot be recovered through this server. Only .yml/.bru files inside a detected collection can be deleted. Every path is checked before the first unlink, so one unusable path deletes nothing. The result names each file's outcome. To clear a script and keep the request, use remove_script.

ParameterTypeDescription
confirm *booleanMust be true. Every file in filePaths is deleted permanently.
filePaths *arrayAbsolute paths to the .yml or .bru request files to delete, from list_requests or get_collection_stats. A one-element list deletes one request.

list_collections List Collections

List the Bruno collections REGISTERED IN workspace.yml, with their names and paths. This is a registry listing, not a filesystem scan: a collection that exists on disk but is not registered will NOT appear, and registered entries that no longer exist are returned with "exists": false. A known absolute path works in the other tools without appearing here. Use the returned path as collectionPath in get_collection_stats, list_requests and run_collection.

ParameterTypeDescription
workspacePathstringOptional explicit path to workspace.yml

list_requests List Requests

List all request files (.yml/.bru) in a Bruno collection. Returns absolute file paths, each usable as an entry in the requests list of run_collection, or of one of its groups.

ParameterTypeDescription
collectionPath *stringAbsolute path to collection directory. Use the path returned by list_collections.

get_collection_stats Get Collection Statistics

Get statistics about a Bruno collection — request counts by method, folders, environments, and per-request details including each request's file path and URL. environmentDetails lists each environment with the NAMES of the variables it declares, values withheld, so what an environment already defines is visible before merging into it with set_environment_variable. Use filePath values as entries in the requests list of run_collection. SIZE: the per-request array is the bulk of the response and grows with the collection — a few hundred requests run to tens of kilobytes. Narrow it with folde…

ParameterTypeDescription
collectionPath *stringAbsolute path to collection directory. Use the path returned by list_collections.
folderstringReport only requests in this folder, path relative to the collection root. Nested folders are included, so "auth" also matches "auth/oauth2".
includeRequestsbooleanSet false to drop the per-request array and return only the counts, folders and environments.
methodstringReport only requests with this method, case-insensitive. A request that has no method is bucketed under its kind, so "GRPC" and "WS" work here too.
nameContainsstringReport only requests whose name contains this text, case-insensitive.

run_collection Run Collection

Execute requests in a Bruno collection and run their test scripts. SUBSET: requests is an ORDERED list of .yml/.bru paths, absolute or relative to collectionPath; a directory expands recursively. Duplicates allowed, and run twice. Omit to run the whole collection. Pass requests OR groups, never both. GROUPS: one call, more than one identity or configuration. Each group owns its OWN variable store and cookie jar, so nothing a group sets — a bru.setVar, a session cookie — is visible to any other group. That is what makes running the same five requests as alice and as bob in one call safe. IT…

read_request Read Bruno Request

Read a single request file back as structured JSON: method, url, headers, query and path params, body, auth mode, scripts, assertions, vars, settings and docs. Both .bru and .yml return the same shape, so the on-disk format stays invisible. Use this before write_request to see current state, and after it to confirm what was written. A websocket or grpc request also carries its stored messages in full — title, content, and for a websocket the type and whether the runner will send it — under websocket.messages or grpc.messages, keyed as write_request accepts them. A "notes" array reports any…

ParameterTypeDescription
filePath *stringAbsolute path to the .bru or .yml request file. Use the path returned by write_request or list_requests rather than rebuilding it: request filenames are lowercased on write.

read_environment Read Bruno Environment

Read an environment back as structured JSON: every variable with its value, plus its disabled and secret flags. Omit "name" to list the collection's environments instead. Secret variables are returned by name only — no file format stores a secret's value, so there is none to return.

ParameterTypeDescription
collectionPath *stringAbsolute path to the collection directory.
namestringEnvironment name, without extension. Omit to list the available environment names.

unregister_collection Unregister Collection

Remove a collection from the workspace registry, leaving every file on disk untouched. list_collections reads that registry, so this is how an entry stops being listed, including a stale entry whose directory is gone. To delete the collection itself, use delete_collection.

ParameterTypeDescription
collectionPath *stringAbsolute path of the collection as it is listed. Use the path from list_collections: matching is by path, not by name, because two entries are allowed to share a name.
workspacePathstringAbsolute path of the workspace.yml to remove the entry from. Defaults to the same one list_collections reads: BRUNO_WORKSPACE_PATH, or the Bruno app's workspace for this platform.

delete_collection Delete Collection

Permanently delete a Bruno collection: the collection directory and everything inside it is removed from disk, and its workspace registry entry with it. Nothing here can be recovered through this server. Only a directory that is itself a collection root — one holding opencollection.yml or bruno.json — can be deleted. To keep the files and only stop the collection being listed, use unregister_collection instead.

ParameterTypeDescription
collectionPath *stringAbsolute path of the collection directory to delete. Use the path from list_collections.
confirm *booleanMust be true. Explicit acknowledgement that the directory and every request in it are deleted permanently.
workspacePathstringAbsolute path of the workspace.yml holding its entry. Defaults to the same one list_collections reads: BRUNO_WORKSPACE_PATH, or the Bruno app's workspace for this platform.