Connect Playwright to Cursor
Navigate and automate websites in a browser sandbox. Add Toolspoke to Cursor once and it can use 9 Playwright actions. Your Playwright credential stays in Toolspoke, and you choose which actions Cursor may call.
Set it up in Cursor
Three steps, the first one once for every toolkit you will ever add.
Add Toolspoke to Cursor
~/.cursor/mcp.json, or .cursor/mcp.json for one project
{ "mcpServers": { "toolspoke": { "url": "https://toolspoke.com/mcp" } } }Cursor completes the sign-in in a browser tab the first time it connects.
Install Playwright and connect it
Add Playwright to a project in your Toolspoke workspace.
Playwright needs no credential. There is nothing to go and fetch: the settings below are optional, and they are configuration rather than secrets.
Choose what Cursor may do
All 9 actions start on. Switch off any of the 3 actions that change something in Playwright, and Cursor gets a refusal if it tries.
What you can ask Cursor for
A few of the Playwright actions that only read, so they are safe to try first.
- Open a URL and return its rendered text content, optionally scoped to one CSS selector
- Open a URL and run a JavaScript function inside the page, returning its result
- Open a URL and return the browser console output it produced, newest last
- Open a URL and list the network requests the page made, with status codes
What Cursor can do in Playwright
6 actions read and 3 write.
Reads
Open page
Open a URL and return the page's accessibility snapshot: headings, links, buttons and form fields with the selectors needed to interact with them. Start here before any click or form action. Pass snapshot_depth on large pages to keep the response small.
Find on page
Open a URL and search its accessibility snapshot for text or a regular expression, returning only the matching nodes with a few lines of context. Much cheaper than open_page when you already know what you are looking for.
Extract text
Open a URL and return its rendered text content, optionally scoped to one CSS selector. Use this to read an article, a rendered price or any content that only exists after JavaScript runs.
Evaluate
Open a URL and run a JavaScript function inside the page, returning its result. Use it to pull structured data out of the DOM, for example "() => [...document.querySelectorAll('h2')].map(node => node.textContent)". The code runs in the page, not on the server.
Console messages
Open a URL and return the browser console output it produced, newest last. Use it to find JavaScript errors on a page you are debugging.
Network requests
Open a URL and list the network requests the page made, with status codes. Static assets are excluded unless you ask for them, so this is a quick way to discover the JSON APIs a page calls.
Writes
Click
Open a URL, click one element and return the resulting page snapshot. The selector is a CSS selector or a ref taken from open_page. Because the browser is recreated per call, this always navigates first, chain further steps with run_flow instead of calling click twice.
Fill form
Open a URL, fill one or more fields and optionally submit, then return the resulting page snapshot. Use it for logins, searches and filter forms. Never send credentials you were not explicitly given.
Run flow
Open a URL and run an ordered sequence of interactions in one browser session, then return the final snapshot. This is the only way to chain steps, because the browser does not survive between calls, use it for multi-step flows such as accept a cookie banner, type a search, click a result.
Playwright in Cursor: questions
Does Cursor see my Playwright credential?
No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Cursor only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.
Can I stop Cursor from changing things in Playwright?
Yes. Each of the 9 actions can be switched off for a project. Turn off the 3 that change something and Cursor can only read.
Will 9 actions crowd Cursor's context?
No. Toolspoke shows Cursor five bridge tools, plus a guide where a toolkit has one, and Cursor searches for the Playwright action it needs when it needs it. Adding more toolkits does not add more tools to its list.
Should it go in every project or just one?
Either. Put the block in ~/.cursor/mcp.json to have Toolspoke in every project, or in .cursor/mcp.json inside one project to keep it there.
What does it cost?
Tool calls are free on every plan. Playwright runs in a sandbox, so a call bills the sandbox time it uses.
Try Playwright in Cursor
Free to start, and tool calls cost nothing on any plan.