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-mcpsearch 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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the behavioral-disclosure burden. It usefully explains the three credential sources (CURSOR_API_KEY, key file, cached OAuth token), but it does not explicitly state that the operation is read-only, whether it validates credentials, or what status values it returns.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the main purpose and followed by useful credential-source context. There is no wasted language.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple zero-parameter status tool, the description covers the core purpose and credential origins. However, because there is no output schema and no annotations, it could say more about what the reported status looks like or whether it verifies credentials, leaving some ambiguity for an agent interpreting results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so there is no parameter semantics burden. The baseline for zero-parameter tools is 4, and the description appropriately avoids unnecessary parameter discussion.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action and resource: "Report Cursor login/token status." This distinguishes it from the sibling cursor_oauth_login, which implies initiating login, though the distinction is not made explicit. An agent can reasonably infer this is a status-checking tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by "Report Cursor login/token status," suggesting the tool should be used to check authentication state. However, the description does not explicitly say when to use it instead of cursor_oauth_login or cursor_oauth_wait, nor does it mention prerequisites or follow-up actions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does disclose key behavior: it starts a browser flow, does not require an API key, returns a login_url for the user, and requires a follow-up call to complete the token exchange. It omits details like flow timeout, where the token is stored, or failure behavior, but the core interaction contract is clear.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two compact clauses with no waste: the first states purpose and the key constraint, the second states the return value and the required next step. Nothing is buried or redundant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter OAuth starter with no output schema, the description covers the essential return (login_url and uuid) and the follow-up action. It could say more about what happens if the user never completes login or whether a browser opens automatically, but nothing an agent needs to invoke it correctly is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so the schema has nothing to document. The description correctly implies no input is required and clarifies that the relevant value (uuid) comes from this call's return, not from the caller.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Start OAuth browser login') and immediately distinguishes itself from cursor_login by noting 'no API key needed'. An agent can identify it as the browser-based OAuth entry point without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly describes the two-step flow: call this, then call cursor_oauth_wait with the returned uuid. It does not explicitly contrast with the sibling cursor_login beyond the 'no API key needed' hint, so the exclusion is implied rather than fully stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | uuid returned by cursor_oauth_login | |
| timeoutMs | No | Wait timeout in ms (default 300000 = 5 min) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the full disclosure burden; it does convey that this is a blocking wait followed by a token exchange. It stays silent on what happens when the timeout elapses, whether the call polls or blocks, and whether a token is persisted or merely returned.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tight sentences with no filler; the purpose comes first and the calling prerequisite second.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no annotations and no output schema, the definition should explain what a successful versus timed-out result looks like for a blocking call. The core flow is covered, but failure/timeout semantics are absent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, with uuid and timeoutMs both documented in the schema, so the baseline is 3. The description adds no further detail about the uuid's provenance beyond what the schema already states.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a concrete verb ('wait for'), the resource (OAuth browser authorization), and the side effect (exchange the token). It is clearly distinguishable from cursor_oauth_login, whose URL-opening step it explicitly follows.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives an explicit precondition: 'Call after cursor_oauth_login's URL was opened,' naming the sibling that produces the input. It does not cover the when-not case (e.g., what to do if the user never completes the flow) or alternatives on timeout.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cursor_web_searchA
Web search (Cursor server-side, pure protocol). Returns a synthesized answer with source links. Good for latest docs, releases, facts.
| Name | Required | Description | Default |
|---|---|---|---|
| maxResults | No | Max source links (default 15) | |
| searchTerm | Yes | Search query / question |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It usefully discloses that the search runs server-side and returns a synthesized answer with source links (valuable given no output schema), but it says nothing about authentication needs, rate limits, or failure behavior for a network-dependent tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences, front-loaded with the core action and return value, with zero redundant phrasing. Nothing could be removed without losing information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter read tool with no output schema, the description covers purpose, output shape, and use case adequately. Only auth/rate-limit context is missing, a minor gap given the presence of login siblings.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so both parameters (searchTerm, maxResults) are already fully documented. The description adds no format, syntax, or query-construction guidance beyond the schema, so baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource ('Web search') and adds what it produces ('synthesized answer with source links'), which distinguishes it plainly from the login/oauth siblings. 'Cursor server-side, pure protocol' is somewhat opaque jargon but does not obscure the core purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'Good for latest docs, releases, facts' gives an implied usage context, but there is no explicit when-not guidance and no reference to the sibling tools or alternatives. The agent can infer intent but is not told when another tool would be better.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v2.0.0- First observed
cursor_login - First observed
cursor_oauth_login - First observed
cursor_oauth_wait - First observed
cursor_web_search
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.
Maintenance
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.2118 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.252 npmAGPL 3.0