Cursor supports MCP servers, which means your coding agent can call browser.city tools directly (open a browser, navigate, click, extract markdown) without you writing glue code.
1) Set your API key
Set BROWSERCITY_API_KEY in your environment.
2) Add browser.city as an MCP server
You can configure MCP at the project level (recommended) or for your whole machine.
Project config: .cursor/mcp.json
Create .cursor/mcp.json in your repo:
{ "mcpServers": { "browsercity": { "url": "https://mcp.browser.city/mcp", "headers": { "Authorization": "Bearer ${env:BROWSERCITY_API_KEY}" } } }}{ "mcpServers": { "browsercity": { "url": "https://mcp.browser.city/mcp", "headers": { "Authorization": "Bearer ${env:BROWSERCITY_API_KEY}" } } }}{ "mcpServers": { "browsercity": { "url": "https://mcp.browser.city/mcp", "headers": { "Authorization": "Bearer ${env:BROWSERCITY_API_KEY}" } } }}{ "mcpServers": { "browsercity": { "url": "https://mcp.browser.city/mcp", "headers": { "Authorization": "Bearer ${env:BROWSERCITY_API_KEY}" } } }}
User config: ~/.cursor/mcp.json
If you want it globally, add the same JSON to ~/.cursor/mcp.json.
3) Use it inside Cursor
Try a prompt like:
Use browsercity tools to open a browser, navigate to a URL, and return the page as markdown.
You should see tools such as browser_open, browser_navigate, browser_snapshot, and browser_markdown available.
4) When to use MCP vs REST vs Sessions
- Use MCP when you want Cursor to drive multi-step browsing as tools.
- Use the Request API (
POST /v1/requests) when you just wantURL -> markdownwithout interaction. - Use Sessions (
POST /v1/sessions+ Playwright connect) for deterministic automation flows you want to own in code.