Skip to content

MCP tools

The MCP server is at https://api.mockhub.io/_mcp. To connect to it, see Connect an AI assistant.

The tools come in toolsets, and the connection URL chooses which toolsets the server lists:

URL Lists
https://api.mockhub.io/_mcp The default toolsets: core, mocks, traffic and state
https://api.mockhub.io/_mcp/all Every toolset
https://api.mockhub.io/_mcp/default+contracts The default toolsets and contracts
https://api.mockhub.io/_mcp/contracts+webhooks contracts and webhooks only, without core

Join names with +, in any order. Only the names in the URL are listed: a URL with neither default, all nor core leaves out whoami, the project tools and the docs tools, so name core too. An unknown name is refused with mcp-toolset-unknown.

A toolset decides what the assistant sees, not what it may do. A tool outside the connection’s toolsets still works when called; the token’s role and kind decide what is allowed. Fewer tools keep the assistant’s context small, which matters for a client that loads every tool definition up front. whoami names the toolsets the connection lists and, for each other one, its tools and the URL that adds it.

A client that signed in through the browser is connected to the URL it signed in with: to change toolsets, remove MockHub from the client, add it again with the new URL, and sign in again. A token works at every URL.

The Claude Code permission name of each tool is mcp__mockhub__ followed by the tool name, when the server is named mockhub.

Core (core)

Who the token is, the projects it reaches, creating a project, searching and reading the docs. In the default toolsets, at https://api.mockhub.io/_mcp.

ToolWhat it doesChanges dataLeast role
get_tool_definitionShows the arguments and availability of a named tool, and how to reconnect if it is outside the listed toolsetsNoViewer
whoamiShows the token, its workspace, its role, any project restriction, and the tools it cannot use and whyNoAny
list_projectsLists the workspace's projects, optionally filtered by name, each with its address and how many of its mocks are activeNoViewer
get_projectShows one project's detailsNoViewer
search_docsSearches these docs and answers the five best pages, with the headings that matchNoAny
read_docsReads one page of these docs, or one section of it, as markdownNoAny
create_projectCreates a project on a new subdomainYesEditor, personal token only

Mocks (mocks)

Read, create, change, tag, delete and restore mocks. In the default toolsets, at https://api.mockhub.io/_mcp.

ToolWhat it doesChanges dataLeast role
get_mock_responseReads one saved response with version-checked body chunks for large definitionsNoViewer
list_mocksLists a project's mocks with how many responses each holds and which is the default, the other mocks that answer the same requests, and when each was last called, optionally by status, HTTP method, tag, or how long nobody has called themNoViewer
get_mockShows one mock's full definition and the project's other mocks that answer the same requestsNoViewer
list_mock_tagsLists the tags a project's mocks carry, with how many carry eachNoViewer
tag_mocksAdds tags to, or removes them from, up to 100 mocksYesEditor
create_mockCreates a mock with one or more named responses and which of them answers, by default, by rules on the request or in a sequence, optionally in a scenario, without templating or linked to an OpenAPI operationYesEditor
update_mockChanges any part of a mock: its name, request, responses, which response answers, status, data store use, scenario, templating or OpenAPI operation; refuses to overwrite a change someone made since you read itYes, overwritesEditor
set_mocks_statusTurns up to 100 mocks on or off in one call, all or none within your planYesEditor
list_mock_versionsLists a mock's earlier versions, newest first: what each change was, who made it and when, and what restoring each would changeNoViewer, personal token only
get_mock_versionShows one earlier version of a mock in full, and how it differs from the mock now or from another versionNoViewer, personal token only
restore_mock_versionPuts a mock back as it was in an earlier version; the mock it replaces is kept as a version, so a restore can be undoneYes, overwritesEditor, personal token only
delete_mockDeletes a mockYes, permanentlyEditor
delete_mocksDeletes up to 100 mocks in one call, all or noneYes, permanentlyEditor
scaffold_resourcePreviews, then creates, the inactive mocks that make a path a REST resource over one data store collection, tagged resource:<name>, and seeds an empty collection from examplesYesEditor
preview_identity_providerShows the identity-provider endpoints a preset would create as mocks, without creating themNoEditor
install_identity_providerCreates the identity-provider endpoints exactly as their preview showed, as inactive mocksYesEditor

Traffic (traffic)

Request logs, why a request matched, a mock from a logged request. In the default toolsets, at https://api.mockhub.io/_mcp.

ToolWhat it doesChanges dataLeast role
delete_mock_request_logsClears every logged request one mock answered; the mock staysYes, permanentlyEditor
list_request_logsLists requests a project received, by mock, method, origin, time or whether a mock matched, with which response answered and why a mock could not renderNoViewer
get_request_logShows one logged request in full: its headers and body and the response's, as far as the project's logging kept themNoViewer
get_request_log_bodyReads a logged request or response body in chunks when it is too large for the full logNoViewer
create_mock_from_request_logTurns a logged request into a new mockYesEditor
explain_request_log_matchSays why a logged request matched no mock, by replaying it against the closest mocks; makes up to six sandbox requests, which spend no request allowanceNoViewer
preview_requestAnswers a request you describe with the project's mocks as saved, without serving or logging it: the closest three mocks, or one you name, each tried in the sandbox, which spends no request allowanceNoViewer, personal token only

State (state)

Scenarios, the data store and fixtures. In the default toolsets, at https://api.mockhub.io/_mcp.

ToolWhat it doesChanges dataLeast role
get_storeShows a project's data store: each collection's records and size, which mocks save to it, and the limitsNoViewer
list_store_recordsLists one data store collection's records with their versions, searched, filtered and sorted as its list endpoint wouldNoViewer
get_store_recordReads one data store record whole, with the version an update sends backNoViewer
put_store_recordsAdds or updates up to 100 records in one collection, all or nothing; an update is refused when the record changed since it was readYes, overwritesEditor
clear_storeDeletes the records of one collection or of the whole data store; mocks stayYes, permanentlyEditor
list_scenariosLists a project's scenarios with their states and the state each is in nowNoViewer, personal token only
create_scenarioCreates a scenario with its states, for mocks to joinYesEditor, personal token only
update_scenarioRenames a scenario or replaces its states; refuses to remove a state a mock still usesYes, overwritesEditor, personal token only
delete_scenarioDeletes a scenario that no mock is attached toYes, permanentlyEditor, personal token only
set_scenario_stateMoves a scenario to one of its states; the next request sees itYes, overwritesEditor, personal token only
reset_scenarioPuts a scenario back in its first state; the next request sees itYes, overwritesEditor, personal token only
reset_scenariosPuts every scenario and response sequence in a project back to its start, as the dashboard's Reset all does; the next request sees itYes, overwritesEditor
list_fixturesLists a project's saved fixtures without their recordsNoViewer
get_fixtureShows one saved fixture's records and scenario statesNoViewer
apply_fixtureResets a project's data store and scenarios to a saved fixture; mocks stayYes, overwritesEditor

Contracts (contracts)

OpenAPI contract checks, coverage and import. Added to the default toolsets by https://api.mockhub.io/_mcp/default+contracts.

ToolWhat it doesChanges dataLeast role
check_request_log_contractChecks a logged response against one revision of the project's OpenAPI contract, as far as the log kept it as sent, and keeps the verdict as the log's latest checkYesViewer
check_request_logs_contractChecks up to 20 logged responses a call against one or two contract revisions, says how each verdict moves between them, and keeps each as the log's latest checkYesViewer
check_openapi_requestsChecks up to 500 requests you supply against one revision of the project's OpenAPI contract before you send them, naming each broken rule and never a valueNoViewer
get_contract_healthShows whether background contract checks run for a project and, for a period, what their sample found per operation; needs a personal tokenNoViewer
get_openapi_coverageShows, for each operation of one contract revision, the mocks that serve it now and the latest checks of logged responses against itNoViewer
preview_openapi_importShows what importing an OpenAPI document would change, without importing it; counts as one importNoEditor
apply_openapi_importImports an OpenAPI document exactly as a preview planned it; new mocks start inactive unless asked to activate them. Counts as one importYes, overwritesEditor

Chaos (chaos)

Start and stop chaos profiles. Added to the default toolsets by https://api.mockhub.io/_mcp/default+chaos.

ToolWhat it doesChanges dataLeast role
list_chaos_profilesLists a project's chaos profiles, which one is running and until whenNoViewer, personal token only
create_chaos_profileSaves a chaos profile with a delay, an injected error or a broken connection, switched off until startedYesAdmin, personal token only
start_chaos_profileTurns a chaos profile on for up to a day, turning off any other; calling it again restarts the countdownYes, overwritesEditor, personal token only
stop_chaos_profileTurns a chaos profile offYesEditor, personal token only

Webhooks (webhooks)

List and fire webhooks, read deliveries. Added to the default toolsets by https://api.mockhub.io/_mcp/default+webhooks.

ToolWhat it doesChanges dataLeast role
list_webhooksLists a project's webhooks, without their secrets or header valuesNoViewer, personal token only
fire_webhookSends a webhook once; every call sends again and counts against the webhook allowanceYesEditor, personal token only
list_webhook_deliveriesLists a webhook's deliveries and how each went, without sending anythingNoViewer, personal token only

Config as code (config)

The project config document and packs. Added to the default toolsets by https://api.mockhub.io/_mcp/default+config.

ToolWhat it doesChanges dataLeast role
get_project_configExports a project's mocks, scenarios, chaos profiles, webhooks, settings and contract as one configuration documentNoViewer
preview_project_configShows what applying a configuration document would create, change and delete, without applying itNoEditor
apply_project_configMakes a project match a configuration document exactly as its preview showed, deleting what the document leaves outYes, overwritesEditor; Admin to change settings, chaos profiles or webhooks
list_packsLists the packs a project can install: the starter packs, and the workspace's own for a personal tokenNoViewer
preview_packShows what installing a pack would change, without installing itNoEditor
install_packInstalls a pack exactly as its preview showed, replacing the project's definitions, then resets its data to the pack's fixtureYes, overwritesEditor; Admin when the pack changes settings, chaos profiles or webhooks
delete_packDeletes one saved version of a workspace pack; projects that installed it keep their configurationYes, permanentlyEditor, personal token only

CI (ci)

Ephemeral environments and verification runs. Added to the default toolsets by https://api.mockhub.io/_mcp/default+ci. The environment permission is Can create, list and delete ephemeral environments on a machine token.

ToolWhat it doesChanges dataLeast role
create_environment_from_projectCreates a new automatically expiring copy of a project without overwriting an existing environmentYesEditor; Admin for settings, chaos or webhooks; machine tokens need the environment permission
list_environmentsLists the workspace's ephemeral environments with their address and when each is deletedNoEditor; a machine token also needs the environment permission
upsert_environmentCreates an empty ephemeral environment that deletes itself after a few hours, or renews the one with that nameYesEditor; a machine token also needs the environment permission
delete_environmentDeletes an ephemeral environment and everything in it; never a permanent projectYes, permanentlyEditor; a machine token also needs the environment permission
list_verification_runsLists the newest application verification runs of this token, or of the workspace for an Admin or Owner, with their state and verdictNoViewer; a machine token needs the environment permission
get_verification_reportReads a finished run's report as a summary: the verdict, each assertion with its evidence, and the number of calls the dependency receivedNoViewer; a machine token needs the environment permission
get_request_probeReads what a probe of your mocks showed: for each changed request, whether a mock answered it with a success, the copy refused it, or the result could not be decidedNoViewer; a machine token needs the environment permission
cancel_verification_runStops a verification run that is still going and deletes its preview environmentsYes, permanentlyEditor; a machine token also needs the environment permission

Project settings (projects)

Rename, configure or delete a project. Added to the default toolsets by https://api.mockhub.io/_mcp/default+projects.

ToolWhat it doesChanges dataLeast role
update_projectRenames a project or changes its description or subdomainYes, overwritesEditor
delete_projectDeletes a project and everything in it, which only support can recover, for 14 days; needs the project's exact nameYes, permanentlyAdmin
get_project_settingsShows a project's settings: response templating, what request logs keep, the gateway mode and CORSNoViewer, personal token only
update_project_settingsChanges some of a project's settings, keeping the rest; they apply to the project's address at onceYes, overwritesAdmin, personal token only

Assistant (assistant)

Draft changes for review in the dashboard. Added to the default toolsets by https://api.mockhub.io/_mcp/default+assistant.

ToolWhat it doesChanges dataLeast role
propose_changesAsks MockHub's AI assistant for a proposal you review and apply in the dashboard; spends one AI creditYesEditor, personal token only
list_assistant_proposalsLists your own assistant proposals in a project, newest first, with a link to review eachNoViewer, personal token only

A whoami answer looks like this. For a machine token, kind is machine and user is null; projectRestriction names the project a restricted token reaches. For an assistant that signed in through the browser, kind is oauth, client is the name it signed in with, and its token lasts an hour, which the assistant renews on its own.

{
"token": {
"name": "Claude Code - work laptop",
"kind": "personal",
"client": null,
"prefix": "mh_sk_3f9a1c",
"expiresAt": "2026-12-13T09:30:00+00:00"
},
"user": { "email": "ada@example.com", "displayName": "Ada Lovelace" },
"workspace": { "id": "0199a3c2-7a41-7d2e-9b0f-3c5e8d1a2b4f", "name": "Acme" },
"role": "editor",
"projectRestriction": null,
"toolsets": {
"connected": [{ "name": "core", "title": "Core", "tools": ["whoami", "list_projects", "…"] }],
"available": [
{
"name": "contracts",
"title": "Contracts",
"summary": "OpenAPI contract checks, coverage and import.",
"tools": ["check_request_log_contract", "…"],
"url": "https://api.mockhub.io/_mcp/default+contracts"
}
]
}
}

token.role is the token’s own role. For a personal token, role is the one it acts with: the lower of its owner’s role and token.role.

The answer also has refusedTools: the tools this token cannot use in its workspace, grouped under the reason a call would be refused with. Every tool it does not list is available. For a machine token with the Editor role, the list starts:

"refusedTools": [
{
"reason": "These tools need a personal API token (mh_sk_); machine tokens cannot use them.",
"tools": ["list_scenarios", "set_scenario_state", "reset_scenario", "list_chaos_profiles", "start_chaos_profile", "stop_chaos_profile", "list_webhooks", "fire_webhook", "list_webhook_deliveries", "propose_changes", "list_assistant_proposals", "get_project_settings", "update_project_settings", "create_scenario", "update_scenario", "list_mock_versions", "get_mock_version", "restore_mock_version", "delete_scenario"]
},
{
"reason": "Machine tokens cannot do this. Use a personal API token of a workspace editor or higher.",
"tools": ["create_project"]
}
]

get_project answers with capabilities for that project: edit, manage and delete. MCP workflows puts the tools together into tasks.

Each token can make 60 requests a minute, counting the few an assistant makes when it connects; for an assistant that signed in through the browser, the limit is per connection. A batch of several requests in one message counts each of them, and a batch of more than 60 is refused. Further requests are answered with 429 until the minute is over.

Identity-provider previews and installs also count toward the workspace’s shared allowance for mock imports. Calls from the app, the CLI and MCP all spend that allowance. If the workspace reaches the limit, the tool returns a retryable 429 with the number of seconds to wait.

Message Meaning
Project “…” not found in this token’s workspace The project is in another workspace, or a restricted machine token cannot see it.
Permission denied: this needs the editor role or higher… The token’s role is too low for the tool.
Machine tokens cannot do this. Use a personal API token… Only people can create projects.
This token’s owner is no longer a member of workspace “…” The person who created the personal token left the workspace.
Validation failed. followed by field names A value was invalid, such as a subdomain that is too short. The assistant usually corrects it.
A project with this host already exists The subdomain is taken.
A message about the plan’s limit The workspace is at a plan limit.
Nothing to update The request did not say what to change.

This token is limited to the viewer role… means your role allows the tool but the personal token’s role does not: create a token with a higher role, up to your own.

Each refusal also carries the problem MockHub’s API answers, as problem in the tool result’s structured content and as a second block of text: its error type, its HTTP status, the invalid fields, and retryable, which is true only when the same call can succeed after a wait (retryAfter seconds, when given). When a tool refuses says what to do with each.

Report a problem with this page