cursor-search-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cursor-search-mcp search the web for the latest MCP spec changes and summarize with sources"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cursor-search-mcp
Standalone MCP server that extracts Cursor's web search into a reusable tool — for any MCP client (pi, Claude Code, Cursor, etc.).
Pure protocol client: talks directly to api2.cursor.sh (RunSSE + BidiAppend, reverse-engineered from cursor-agent). No cursor-agent binary, no child processes, zero npm dependencies.
Features
🔍 Web search as a tool — server-side Cursor web search (the same engine behind cursor-agent's
web_search), returns summarized answers with source links🔑 API key login —
CURSOR_API_KEY(auto token exchange + refresh)🌐 OAuth login — browser-based PKCE device flow, for accounts without API keys
🪶 Zero deps — plain Node.js ≥ 18, single-purpose protocol implementation
🔒 Token cached with
0600permissions at~/.cursor-search-mcp/auth.json
Related MCP server: Kimi Search MCP
Tools
Tool | Description |
| Validate API key / report token status |
| Start OAuth browser login (returns |
| Poll until browser authorization completes |
| Web search — returns |
Install
# from npm (after publish)
npx cursor-search-mcp
# or from source
git clone https://github.com/zzjcool/cursor-search-mcp
cd cursor-search-mcpConfiguration
API key (either way):
export CURSOR_API_KEY=crsr_xxxx
# or
echo "crsr_xxxx" > ~/.cursor-search-mcp/keyOr use OAuth — simplest from the terminal:
npx cursor-search-mcp login # prints a login URL, waits for you to authorize, caches the token
npx cursor-search-mcp status # check login state
npx cursor-search-mcp search "mcp spec 2026-07-28 changes" # one-shot searchOr from inside an agent session: call cursor_oauth_login → open the returned login_url → call cursor_oauth_wait.
On MCP startup without any credentials, the server automatically starts OAuth, prints the login URL to stderr, and polls in the background — the login-aware initialize instructions surface it to the agent.
Optional env vars:
Var | Default | Description |
|
| API base URL |
|
| Model used for search synthesis |
|
| State directory |
|
| Client version header |
MCP client config (stdio)
{
"mcpServers": {
"cursor-search": {
"type": "stdio",
"command": "npx",
"args": ["-y", "cursor-search-mcp"],
"env": { "CURSOR_API_KEY": "crsr_xxxx" }
}
}
}How it works
Reverse-engineered from cursor-agent 2026.10.01 (protocol verified end-to-end):
login POST /auth/exchange_user_api_key (API key → accessToken)
GET /auth/poll?uuid&verifier (OAuth PKCE device flow)
search POST /agent.v1.AgentService/RunSSE (downstream SSE stream)
POST /aiserver.v1.BidiService/BidiAppend (upstream binary frames)The client maintains the full agent-loop protocol: KV blob get/set ACKs, 5s client heartbeats, web-search approval interactions — so the server-side search engine executes as if invoked from a real agent session.
Caveats
Uses undocumented Cursor APIs; the protocol may change without notice (pin your version)
Search quota counts against your Cursor account
Educational / research purpose — respect Cursor's terms of service
License
MIT
ℹ️ Moved: development continues in search-mcp-hub (
packages/cursor-search-mcp). This repo is the v1/v2 history archive. npm publishes continue from the monorepo.
Available Tools
4 toolscursor_loginA
Report Cursor login/token status. Credentials come from CURSOR_API_KEY, ~/.cursor-search-mcp/key, or a cached OAuth token.
Inputs: no named parameters.
cursor_oauth_loginA
Start OAuth browser login (no API key needed). Returns login_url for the user to open in a browser; then call cursor_oauth_wait with the returned uuid to complete the token exchange.
Inputs: no named parameters.
cursor_oauth_waitA
Wait for the user to finish OAuth browser authorization and exchange the token. Call after cursor_oauth_login's URL was opened.
Inputs: uuid (required), timeoutMs.
cursor_web_searchA
Web search (Cursor server-side, pure protocol). Returns a synthesized answer with source links. Good for latest docs, releases, facts.
Inputs: searchTerm (required), maxResults.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The three auth-related tools have distinct roles: status check, OAuth initiation, and OAuth completion wait. An agent could briefly hesitate between cursor_login and cursor_oauth_login when unauthenticated, but the descriptions clarify the intended sequence.
All tools use a consistent cursor_ prefix and snake_case, with auth tools following a clear cursor_oauth_* subpattern. cursor_login and cursor_web_search are slightly less uniform in verb style but remain readable and predictable.
Four tools is reasonable for a narrow web-search server with an unavoidable OAuth lifecycle. The set is slightly auth-heavy (three auth tools to one search tool), but that reflects a legitimate setup flow rather than unnecessary bloat.
The auth lifecycle is well covered with status, initiation, and completion tools, and web search is present. Minor gaps like logout/token clearing or richer search options exist, but core workflows are covered.
Related MCP Connectors
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
Web search and page-reading for AI agents. One-click OAuth connect, or a Caesar API key.
Web search, data extraction and controlled browser automation for AI assistants via OAuth.
Free web search for AI agents. No API key required. Hosted MCP in active development.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables MCP-compatible agents to perform web searches via the agent-web-search engine, returning ranked results with sources.1-
- AlicenseCqualityBmaintenanceEnables MCP clients to run web searches and optionally fetch webpages through Moonshot's open platform API, using a configured API key.281 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible AI agents to search the web and obtain cited answers, step-by-step reasoning, and deep research through hosted APIs.MIT
- AlicenseAqualityCmaintenanceEnables web search and page fetching through the DeepSeek Search and Fetch APIs, exposing search and fetch tools to MCP clients. Supports paginated content retrieval with cursors so long pages can be read in chunks without repeating upstream requests.232 npmAGPL 3.0