·

Sequential Thinking MCP With Cursor

Set up Sequential Thinking MCP in Cursor so your AI agent can break complex problems into structured, step-by-step reasoning right from your editor.

Cursor's advantage over a terminal-based agent is proximity to the codebase — it already has semantic indexing, inline diffs, and a running language server. That changes how Sequential Thinking MCP earns its keep here: the highest-value pattern isn't planning in the abstract, it's grounding each reasoning step in an actual @codebase search result before committing to it, so the plan doesn't drift from what the code actually does.

Connecting Sequential Thinking MCP to Cursor Agent Mode

Cursor reads MCP servers from ~/.cursor/mcp.json for a global config, or .cursor/mcp.json inside a project for one scoped to that repo. The shape is the same mcpServers object used by Claude Desktop:

{
  "mcpServers": {
    "sequential-thinking": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
    }
  }
}

You can also add it through the UI: Cursor Settings → MCP → Add new MCP server, which writes the same file for you and gives you a live status indicator (green dot for connected) without needing to check a terminal. Project-scoped .cursor/mcp.json is worth committing if your team standardizes on this tool — same trade-off as Claude Code's project scope, new team members get it automatically on clone with no extra setup step.

Sequential thinking only does anything inside Agent mode (the mode that can call tools), not Cursor's plain Ask/chat mode, which is answer-only and has no tool access. Switch modes with Cmd/Ctrl+. or the mode dropdown at the top of the chat panel before expecting the tool to be available at all.

By default, Cursor prompts for approval on each new MCP tool the agent wants to call in a session — for a read/write-free tool like this one, that gets old fast across a long chain. Turn on Auto-run for MCP tools specifically (Cursor Settings → Agent → “Auto-run MCP tools”) rather than globally enabling auto-run for everything, since other MCP servers you may have connected (filesystem, git, database tools) genuinely warrant a manual approval step that this one doesn't.

Cursor Settings → Agent → Auto-run MCP tools: On
Cursor Settings → Agent → Auto-run (all tools): Off

Tips
- Confirm you're in Agent mode before troubleshooting a "tool not available" issue — Ask mode simply can't call any MCP tool, sequential thinking included.
- Scope auto-run to MCP tools only, not all tools — you still want a manual gate on file edits and shell commands even if reasoning calls are auto-approved.
- Commit .cursor/mcp.json at the project root if the whole team should get this without individual setup.


Breaking a Cross-Cutting Change into Ordered, Reviewable Edits

Cross-cutting changes — the kind that touch a shared interface used in a dozen call sites — are where sequential thinking pays off most inside Cursor specifically, because the agent can interleave a reasoning step with an actual codebase search rather than reasoning from memory about what it thinks the code looks like.

Example: adding a required tenantId field to a UserContext interface used across an API layer, a background job runner, and a webhook handler — a genuinely risky change if any call site constructs UserContext without it.

We're adding a required tenantId field to the UserContext interface in
src/types/context.ts. Use sequential thinking to plan this out, and actually
search the codebase for every place UserContext gets constructed before
deciding on the migration order — don't guess at the call sites.
{
  "thought": "Before planning anything, need the actual list of construction sites — searching for 'new UserContext(' and object literals typed as UserContext across the codebase rather than assuming based on the file structure.",
  "thoughtNumber": 1,
  "totalThoughts": 6,
  "nextThoughtNeeded": true
}

(Cursor's agent runs a codebase search here, finding 11 construction sites across src/api/, src/jobs/, and src/webhooks/.)

{
  "thought": "11 construction sites found: 7 in src/api/ (all have tenant available from the request), 3 in src/jobs/ (tenant available from the job payload), 1 in src/webhooks/stripe-handler.ts where tenant is NOT directly available — it has to be looked up from the Stripe customer ID via a DB query that doesn't currently exist in that handler.",
  "thoughtNumber": 2,
  "totalThoughts": 6,
  "nextThoughtNeeded": true
}
{
  "thought": "The webhook handler is the actual blocker for making tenantId required immediately — everywhere else can be updated in one pass. Making the field required before the webhook handler has a tenant lookup path will either break that handler at compile time (if using TypeScript strict mode) or silently pass undefined at runtime otherwise.",
  "thoughtNumber": 3,
  "totalThoughts": 6,
  "nextThoughtNeeded": true
}
{
  "thought": "Revised plan: (1) add tenantId as optional first, update all 10 non-webhook call sites, (2) add the DB lookup in stripe-handler.ts to resolve tenant from the Stripe customer ID, (3) only then flip tenantId to required and remove the optional marker, as a separate final commit that the type checker will validate for us.",
  "thoughtNumber": 4,
  "totalThoughts": 6,
  "nextThoughtNeeded": false
}

That plan only holds together because thought 1 actually searched instead of assuming an exhaustive list — a purely conversational reasoning pass (no tool grounding) would have plausibly missed that one awkward webhook call site until it broke in production. The interface change is trivial; the risk is entirely in that one call site sequential thinking forced the agent to go find rather than assume.

Tips
- Explicitly instruct "search the codebase before deciding" — without it, Cursor's agent sometimes reasons about a cross-cutting change based on the files already open in context, missing call sites elsewhere in the repo.
- Treat any construction site that can't trivially provide the new required data (like the webhook handler here) as the actual scheduling constraint for the whole rollout, not an edge case to handle last.
- Ask for the final step to be a separate, isolated commit (flipping optional to required) — it gives you a clean type-checker-validated boundary to review before merging.


Combining Sequential Thinking with Codebase Search for Better Plans

The pattern above generalizes: interleave a reasoning step with a grounding search whenever a thought makes a factual claim about "what the code does" rather than a judgment call about "what we should do." The failure mode to watch for is a chain that sounds confident and well-structured but never actually queried the codebase — Cursor's model can produce a plausible-looking UserContext construction site list purely from pattern-matching on file names and folder conventions, and it reads identically to a chain that actually searched, until it's wrong.

A reliable way to force the distinction: ask for search results to be cited inline in the thought content, not just asserted.

Use sequential thinking to plan the migration. Every thought that makes a
factual claim about the codebase (call sites, existing patterns, current
behavior) must reference the specific file and line range you found it in.

This produces thoughts like:

{
  "thought": "src/webhooks/stripe-handler.ts:34-41 constructs UserContext with only { userId, email } — confirmed by reading the actual function body, not inferred from the file name. No tenant field is available at this point in the handler.",
  "thoughtNumber": 2,
  "totalThoughts": 6,
  "nextThoughtNeeded": true
}

versus the ungrounded, easier-to-produce-but-riskier version:

{
  "thought": "Webhook handlers probably don't have tenant context available since they're triggered by external systems.",
  "thoughtNumber": 2,
  "totalThoughts": 6,
  "nextThoughtNeeded": true
}

The second version might be right, but it's a guess dressed up as a reasoning step, and it's exactly the kind of thought that slips through unnoticed in a long chain unless you're specifically checking whether claims are grounded.

Tips
- Require file:line citations for factual claims in the prompt itself — it's a cheap, mechanical way to catch ungrounded reasoning before it reaches your review.
- Skim a chain specifically for confident-sounding claims with no file reference attached — those are the ones most likely to be wrong.
- Don't over-apply this to judgment calls (architecture trade-offs, naming decisions) — forcing citations there just produces awkward, padded thoughts with nothing real to cite.


Known Limitations and Overuse Anti-Patterns in Cursor

A few practical limits worth knowing. Cursor's chat panel doesn't have a dedicated collapsible reasoning tree the way the Claude Code VS Code extension does — long chains render as sequential chat bubbles, and past roughly 10-12 thoughts the panel gets genuinely hard to scan back through, especially once codebase search results are interleaved in between. There's also no cross-session persistence: closing a composer/chat tab loses the thought history, so a long structured planning session needs to happen in one sitting or you'll be re-establishing context from scratch.

The more common problem in practice is overuse rather than any tool limitation. Once a team gets used to seeing well-structured JSON reasoning chains, there's a temptation to reach for sequential thinking on every non-trivial request — adding a single new field to a form, renaming a variable across a small module, writing a one-off script. All of that produces a real cost (multiple round trips, growing context) for zero benefit, because these tasks aren't branchy or revisable in the first place; they're just multi-step, which any competent agent handles fine with inline reasoning.

A second anti-pattern: using branching as a way to avoid making a decision. Asking the agent to branch on two options and then not asking for a final recommendation leaves you with two well-written essays and the same decision you started with, having spent the extra tokens for no forward progress.

Tips
- Reserve sequential thinking in Cursor for changes that touch multiple call sites with real behavioral differences between them — not routine single-file edits.
- Always close a branching chain with an explicit recommendation step — branching without synthesis is reasoning theater, not decision support.
- For very long planning sessions, copy the final plan out into a scratch markdown file in the repo before closing the chat tab — there's no session history to recover a lost chain from.


Tips

Cursor's real edge with this tool is proximity — reasoning steps that can be immediately checked against an actual codebase search, rather than reasoning from an LLM's memory of "typical" code patterns. Use that deliberately by demanding grounded, cited claims for anything factual, save branching for genuine either/or decisions with a required final recommendation, and keep the tool out of routine single-file work where it adds cost without adding insight.

Tips
- Turn on auto-run for MCP tools specifically, not globally, to keep a manual gate on actual file edits.
- Require file:line grounding for factual claims in cross-cutting change plans — it's the cheapest defense against a confident-sounding but ungrounded reasoning chain.
- Export any plan you'd regret losing into a repo file before closing the chat — Cursor keeps no session history for an in-progress thought chain.