mcp

v0.10.0
@testplane/mcp Checked 7 hours ago Published 8 days ago

MCP server for Testplane tool

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

navigate

Open a URL in the browser

ParameterTypeDescription
url *stringThe URL to navigate to
timeoutnumberMaximum time to wait in milliseconds. Default: 30000

click

Click an element on the page.

ParameterTypeDescription
altTextstringImage alt attribute for testing-library getByAltText.
displayValuestringCurrent input display value for testing-library getByDisplayValue.
exactbooleanWhether to match text exactly (queryOptions.exact).
hiddenbooleanInclude elements hidden from the accessibility tree (queryOptions.hidden).
labelTextstringLabel text associated with a form input for testing-library getByLabelText.
levelintegerHeading level modifier for role='heading' (queryOptions.level), 1-6.
namestringAccessible name modifier (queryOptions.name) for role queries.
placeholderTextstringInput placeholder text for testing-library getByPlaceholderText.
rolestringARIA role for testing-library getByRole (e.g. "button", "heading", "link").
selectorstringCSS selector, XPath, or webdriverio locator. Mutually exclusive with testing-library query fields.
testIdstringdata-testid attribute for testing-library getByTestId.
textstringVisible text content for testing-library getByText.
titlestringHTML title attribute for testing-library getByTitle.

hover

Hover an element on the page.

ParameterTypeDescription
altTextstringImage alt attribute for testing-library getByAltText.
displayValuestringCurrent input display value for testing-library getByDisplayValue.
exactbooleanWhether to match text exactly (queryOptions.exact).
hiddenbooleanInclude elements hidden from the accessibility tree (queryOptions.hidden).
labelTextstringLabel text associated with a form input for testing-library getByLabelText.
levelintegerHeading level modifier for role='heading' (queryOptions.level), 1-6.
namestringAccessible name modifier (queryOptions.name) for role queries.
placeholderTextstringInput placeholder text for testing-library getByPlaceholderText.
rolestringARIA role for testing-library getByRole (e.g. "button", "heading", "link").
selectorstringCSS selector, XPath, or webdriverio locator. Mutually exclusive with testing-library query fields.
testIdstringdata-testid attribute for testing-library getByTestId.
textstringVisible text content for testing-library getByText.
titlestringHTML title attribute for testing-library getByTitle.

type

Type text into an element on the page.

ParameterTypeDescription
value *stringThe text value to type into the element
altTextstringImage alt attribute for testing-library getByAltText.
displayValuestringCurrent input display value for testing-library getByDisplayValue.
exactbooleanWhether to match text exactly (queryOptions.exact).
hiddenbooleanInclude elements hidden from the accessibility tree (queryOptions.hidden).
labelTextstringLabel text associated with a form input for testing-library getByLabelText.
levelintegerHeading level modifier for role='heading' (queryOptions.level), 1-6.
namestringAccessible name modifier (queryOptions.name) for role queries.
placeholderTextstringInput placeholder text for testing-library getByPlaceholderText.
rolestringARIA role for testing-library getByRole (e.g. "button", "heading", "link").
selectorstringCSS selector, XPath, or webdriverio locator. Mutually exclusive with testing-library query fields.
testIdstringdata-testid attribute for testing-library getByTestId.
textstringVisible text content for testing-library getByText.
titlestringHTML title attribute for testing-library getByTitle.

select

Select an option in a native <select> element.

ParameterTypeDescription
altTextstringImage alt attribute for testing-library getByAltText.
displayValuestringCurrent input display value for testing-library getByDisplayValue.
exactbooleanWhether to match text exactly (queryOptions.exact).
hiddenbooleanInclude elements hidden from the accessibility tree (queryOptions.hidden).
indexintegerZero-based option index to select. Mutually exclusive with --visible-text and --value.
labelTextstringLabel text associated with a form input for testing-library getByLabelText.
levelintegerHeading level modifier for role='heading' (queryOptions.level), 1-6.
namestringAccessible name modifier (queryOptions.name) for role queries.
placeholderTextstringInput placeholder text for testing-library getByPlaceholderText.
rolestringARIA role for testing-library getByRole (e.g. "button", "heading", "link").
selectorstringCSS selector, XPath, or webdriverio locator. Mutually exclusive with testing-library query fields.
testIdstringdata-testid attribute for testing-library getByTestId.
textstringVisible text content for testing-library getByText.
titlestringHTML title attribute for testing-library getByTitle.
valuestringOption value attribute to select. Mutually exclusive with --visible-text and --index.
visibleTextstringOption visible text to select. Mutually exclusive with --index and --value.

wait

Wait for an element to appear or disappear on the page. Useful for waiting until page loads fully or loading spinners disappear.

ParameterTypeDescription
altTextstringImage alt attribute for testing-library getByAltText.
disappearbooleanWhether to wait for element to disappear. Default: false (wait for element to appear)
displayValuestringCurrent input display value for testing-library getByDisplayValue.
exactbooleanWhether to match text exactly (queryOptions.exact).
hiddenbooleanInclude elements hidden from the accessibility tree (queryOptions.hidden).
includeSnapshotInResponsebooleanWhether to include page snapshot in response. Default: true
labelTextstringLabel text associated with a form input for testing-library getByLabelText.
levelintegerHeading level modifier for role='heading' (queryOptions.level), 1-6.
namestringAccessible name modifier (queryOptions.name) for role queries.
placeholderTextstringInput placeholder text for testing-library getByPlaceholderText.
rolestringARIA role for testing-library getByRole (e.g. "button", "heading", "link").
selectorstringCSS selector, XPath, or webdriverio locator. Mutually exclusive with testing-library query fields.
testIdstringdata-testid attribute for testing-library getByTestId.
textstringVisible text content for testing-library getByText.
timeoutnumberMaximum time to wait in milliseconds. Default: 3000
titlestringHTML title attribute for testing-library getByTitle.

snapshot

Capture a DOM snapshot of the current page. Note: by default, not useful tags and attributes are excluded (e.g. script, style, etc.). Prefer to use defaults. Response contains info as to what was omitted. If you need more info, request a snapshot with more tags and attributes.

ParameterTypeDescription
excludeAttrsarrayHTML attributes to exclude from the snapshot
excludeTagsarrayHTML tags to exclude from the snapshot
includeAttrsarrayHTML attributes to include in the snapshot besides defaults
includeTagsarrayHTML tags to include in the snapshot besides defaults
maxTextLengthnumberMaximum length of text content before truncation
truncateTextbooleanWhether to truncate long text content (default: true)

screenshot

Capture a PNG screenshot of the current browser viewport. Strongly prefer capturing text-based snapshots using takePageSnapshot tool. Only use to test for visual changes when text-based snapshots are not useful.

ParameterTypeDescription
filePathstringPath to save the screenshot (defaults to tmp directory)

console

Get browser-side console messages. This command only works with Chromium-based browsers and returns only "unseen" messages - those that were not returned by the previous getLogs call in the current session.

network-list

List captured requests from the active browser session or a saved Time Travel recording

ParameterTypeDescription
attemptintegerAttempt index to inspect. Defaults to the latest attempt for the selected test and browser
browserstringBrowser id to inspect in report mode
errorsbooleanShow HTTP 4xx/5xx responses and network failures
jsonbooleanReturn structured JSON
limitintegerMaximum requests to show. 0 means all retained requests
methodstringFilter by HTTP method, e.g. GET or POST
namestringFull test name to inspect in report mode
reportstringPath or URL to a Testplane HTML report directory, report HTML file, or databaseUrls.json
snapshotFilestringPath or URL to a time travel snapshot zip. Mutually exclusive with report mode
statusstringFilter by HTTP status codes or classes, e.g. 404 or 4xx,5xx
typestringFilter by comma-separated resource types, e.g. fetch,xhr
urlstringFilter by a literal substring of the URL

network-inspect

Inspect request and response metadata. Use network-body to read captured bodies

ParameterTypeDescription
requestId *stringRequest ID returned by network-list
attemptintegerAttempt index to inspect. Defaults to the latest attempt for the selected test and browser
browserstringBrowser id to inspect in report mode
jsonbooleanReturn structured JSON
namestringFull test name to inspect in report mode
reportstringPath or URL to a Testplane HTML report directory, report HTML file, or databaseUrls.json
snapshotFilestringPath or URL to a time travel snapshot zip. Mutually exclusive with report mode

network-body

Retrieve the complete captured response body, or the request body when requested

ParameterTypeDescription
requestId *stringRequest ID returned by network-list
attemptintegerAttempt index to inspect. Defaults to the latest attempt for the selected test and browser
browserstringBrowser id to inspect in report mode
namestringFull test name to inspect in report mode
outputstringWrite the body to a file. Required for binary bodies
reportstringPath or URL to a Testplane HTML report directory, report HTML file, or databaseUrls.json
requestbooleanRetrieve the request body instead of the response body
snapshotFilestringPath or URL to a time travel snapshot zip. Mutually exclusive with report mode

list-tabs

Get a list of all currently opened browser tabs with their URLs, titles, and active status

switch-tab

Switch to a specific browser tab by its number (starting from 1)

ParameterTypeDescription
tabNumber *integerThe number of the tab to switch to (starting from 1)

new-tab

Open a new browser tab, optionally navigate to a URL, and automatically switch to it

ParameterTypeDescription
urlstringOptional URL to navigate to in the new tab

close-tab

Close a specific browser tab by its number (1-based), or close the current tab if no number is provided

ParameterTypeDescription
tabNumberintegerThe number of the tab to close (starting from 1). If not provided, closes the current tab

launch

Launch a new browser session with custom desired capabilities. Avoid using this tool unless the user explicitly requests a custom browser configuration; browsers are launched automatically for commands like navigate to URL. Testplane can ONLY download Chrome and Firefox automatically, for other browsers you MUST ensure that driver is launched and provide it as custom gridUrl.

ParameterTypeDescription
desiredCapabilitiesobjectWebDriver desiredCapabilities that should be used when launching the browser. Example to launch Chrome with mobile emulation: {"browserName":"chrome","goog:chromeOptions":{"mobileEmulation":{"deviceMe…
gridUrlstringWebDriver endpoint to connect to. "local" (default) lets Testplane manage Chrome and Firefox automatically; set a Selenium grid URL only when you need other browsers.
headlessbooleanWhether to run browser in headless mode. When omitted, preserves the current session mode (CLI defaults to headless on first launch; use "--headless false" for headful mode).
windowSizeBrowser window size to use for the session. Provide {"width": number, "height": number} or a string like "1280x720"; use null to reset to the default size.

attach

Attach to existing browser session

ParameterTypeDescription
session *objectAttach to browser json object from console after --keep-browser testplane run

attach-repl

Attach to a running Testplane REPL session

ParameterTypeDescription
port *integerTestplane REPL TCP port
hoststringTestplane REPL TCP host

close-browser

Close the current browser session

save-state

Save the current browser state, including cookies and web storage, to a JSON file

ParameterTypeDescription
path *stringPath to the JSON file with saved browser state. Relative paths are resolved from the current working directory.
cookiesbooleanWhether to include cookies in the saved state. Default: true
localStoragebooleanWhether to include localStorage in the saved state. Default: true
sessionStoragebooleanWhether to include sessionStorage in the saved state. Default: true

restore-state

Restore browser state from a JSON file. By default the page is refreshed after restore so it can observe restored cookies and web storage.

ParameterTypeDescription
path *stringPath to the JSON file with saved browser state. Relative paths are resolved from the current working directory.
refreshbooleanWhether to reload the current page after restoring state. Default: true. Reloading makes the page observe restored cookies and storage immediately.

run-code

Run arbitrary Testplane script using the current browser, useful when other tools don't provide the functionality you need. Inline input may be code or a function that receives browser as its only argument. In REPL sessions, the code is passed directly to the Testplane REPL.

ParameterTypeDescription
codestringJavaScript code to run. It may be an expression like "await browser.getUrl()" or a function like "(browser) => browser.getUrl()".
filestringPath to a JavaScript file to run instead of inline code

test-results

Read a Testplane HTML report and list final-attempt test results with filters

ParameterTypeDescription
report *stringPath or URL to a Testplane HTML report directory, report HTML file, or databaseUrls.json
browserstringComma-separated browserId filter
durationstringDuration filter, for example >5s, >=100ms, <2s, or =500ms
fieldsstringComma-separated output fields for text and saved JSON. Allowed: status, browser, attempt, duration, file, name, error, meta, skipOrMuteReason. Default: status,browser,attempt,duration,file,name,error
filestringFile path mask. Supports simple glob masks such as src/** or *.test.js
grepstringRegex to match against the full test name
grepErrorstringRegex to match against error text
limitintegerMaximum number of test results to print in text output. Default: 100, max: 500
metaarrayMeta filters in key=value form. Can be repeated
offsetintegerNumber of matched test results to skip before listing in text output
saveJsonbooleanSave the whole filtered report as JSON without pagination to a file under os.tmpdir()/testplane-cli, then print the path, summary, and example file fragment. Useful for saving output to a file for lat…
statusstringComma-separated status filter. Allowed: passed, failed, muted, retried, skipped. failed includes error and fail report statuses.

inspect-result

Read a Testplane HTML report and inspect test result attempt details as JSON

ParameterTypeDescription
browser *stringBrowser id to inspect
name *stringFull test name to inspect
report *stringPath or URL to a Testplane HTML report directory, report HTML file, or databaseUrls.json
attemptintegerAttempt index to inspect. When omitted, all attempts for the selected test and browser are returned
includeBase64booleanInclude base64 image payloads in result images and errors. Omitted by default to keep output compact
prettybooleanPretty-print JSON output. Use --no-pretty for compact JSON

time-travel-snapshot

Inspect Testplane Time Travel rrweb snapshot at a selected time and return a DOM snapshot of the replayed page, optionally with a diff from a previous time

ParameterTypeDescription
attemptintegerAttempt index to inspect. Defaults to the latest attempt for the selected test and browser
browserstringBrowser id to inspect in report mode
diffFromnumberWhen set, return only current DOM nodes that changed between this time and the requested time. Uses the same offset/timestamp rules as time
excludeAttrsarrayHTML attributes to exclude from the snapshot
excludeTagsarrayHTML tags to exclude from the snapshot
includeAttrsarrayHTML attributes to include in the snapshot besides defaults
includeTagsarrayHTML tags to include in the snapshot besides defaults
maxTextLengthnumberMaximum length of text content before truncation
namestringFull test name to inspect in report mode
reportstringPath or URL to a Testplane HTML report directory, report HTML file, or databaseUrls.json
snapshotFilestringPath or URL to a time travel snapshot zip. Mutually exclusive with report mode
timenumberTime to inspect in milliseconds. Values within snapshot duration are offsets from the first rrweb event; larger values are absolute timestamps
truncateTextbooleanWhether to truncate long text content (default: true)

time-travel-export-html

Export a Testplane Time Travel rrweb snapshot at a selected time as a browser-openable HTML file with captured inline styles

ParameterTypeDescription
attemptintegerAttempt index to inspect. Defaults to the latest attempt for the selected test and browser
browserstringBrowser id to inspect in report mode
filePathstringPath to save the exported HTML file. Defaults to os.tmpdir()/.testplane/time-travel-snapshots
namestringFull test name to inspect in report mode
reportstringPath or URL to a Testplane HTML report directory, report HTML file, or databaseUrls.json
snapshotFilestringPath or URL to a time travel snapshot zip. Mutually exclusive with report mode
timenumberTime to inspect in milliseconds. Values within snapshot duration are offsets from the first rrweb event; larger values are absolute timestamps