Best MCP Servers for Cursor and Claude Code (Setup Guide)
· 6 min read · Tools
The best MCP servers to start with are Context7 for current library docs, Playwright for letting the agent drive a browser, GitHub for issues and PRs, and Supabase if your database lives there. Install two or three, not ten. Every server adds tools the agent has to read and choose between, and some of them can change real data.
One note on "tested": the commands below come from each maintainer's own docs, checked while writing this. I'm not claiming benchmark results. Versions and flags change, so if something fails, trust the linked docs over this page.
First, how MCP config works in each tool
If MCP is new to you, read MCP Servers Explained first. Short version: an MCP server is a small program or hosted endpoint that gives your editor extra tools.
Cursor reads a JSON file. Create .cursor/mcp.json in your project for project-specific tools, or ~/.cursor/mcp.json in your home directory for tools available everywhere. Cursor's MCP docs also mention a marketplace with one-click installs.
Claude Code uses a command. For user-scoped servers, claude mcp add --scope user writes to the mcpServers key in ~/.claude.json. Project-scoped servers live in .mcp.json at the project root. Per the Claude Code quickstart, it won't read made-up paths like ~/.claude/mcp.json. After adding a server, open the MCP panel with /mcp to check it connected. New to the tool? Start with the Claude Code tutorial.
The shortlist
| Server | What it's for | Type | Risk level |
|---|---|---|---|
| Context7 | Up-to-date docs for the libraries you use | Remote or local (npx) | Low |
| Playwright | Agent opens, clicks and checks your app in a browser | Local (npx) | Medium |
| GitHub | Issues, PRs, code search, Actions runs | Remote or Docker | Medium |
| Supabase | Inspect and manage your Postgres project | Remote | High unless locked down |
1. Context7: stops the agent guessing old APIs
Most "it wrote code that doesn't run" bugs come from the model remembering an old version of a library. Context7 pulls current docs into the prompt. It's the one I'd install first because it's read-only by nature.
The fastest route is the setup CLI. It needs Node.js 22.13 or newer: npx ctx7 setup. Use --cursor or --claude to target a specific agent. A free API key from context7.com/dashboard is recommended for higher rate limits.
Manual setup, Claude Code:
claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
Manual setup, Cursor (~/.cursor/mcp.json), using the remote URL:
{
"mcpServers": {
"context7": {
"url": "https://mcp.context7.com/mcp",
"headers": { "CONTEXT7_API_KEY": "${env:CONTEXT7_API_KEY}" }
}
}
}
Setting the key as an environment variable beats pasting it into the file. One docs page for another Cursor-compatible server says as much. Then add a line to your prompt: "use context7" when you ask about a library.
2. Playwright: lets the agent check its own work
This is the one that changes how you work. Instead of you refreshing the page and reporting "the button does nothing," the agent opens the app, clicks, and sees what happens. It pairs well with the routine in Testing AI Written Code.
Claude Code, straight from the Claude Code docs:
claude mcp add playwright -- npx -y @playwright/mcp@latest
Cursor, in .cursor/mcp.json:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest"]
}
}
}
One caution: a browser agent can visit any page. Playwright's --allowed-origins flag limits direct requests, but Playwright itself warns it's a convenience guardrail, not a security boundary. Point it at localhost and your own staging URL, and don't leave it logged into accounts you care about.
3. GitHub: issues and PRs without leaving the chat
Good for "read issue #42 and fix it" or "summarize what changed in the last five PRs." It's useful, but it needs a token, so scope the token narrowly.
GitHub maintains the official server. It runs hosted at https://api.githubcopilot.com/mcp/ or locally from the Docker image ghcr.io/github/github-mcp-server. Don't install the old npm package. GitHub's own Cursor install guide notes the server currently requires a Personal Access Token rather than OAuth. The remote server needs Cursor v0.48.0 or newer.
Claude Code:
claude mcp add --transport http github https://api.githubcopilot.com/mcp/
Then run /mcp to finish sign-in. If it asks for a token instead, use a fine-grained PAT limited to the repos you're working on, and check GitHub's current Claude Code guide for the exact header syntax, since I didn't verify that part.
Also, issue text is untrusted input. A stranger can write instructions into an issue, and an agent may read them as orders. Keep write actions on manual approval.
4. Supabase: powerful, so lock it down first
If your backend is Supabase, this server lets the agent inspect tables, read logs and run advisors. It can also change things. It isn't read-only by default, and it can write, migrate and deploy.
Supabase is blunt about the intended use. The docs say the MCP server is only designed for development and testing. The safe setup uses two URL parameters. The read_only=true parameter runs queries as a read-only Postgres user, and project_ref scopes the server to one project. Without project scoping, the server can reach every project in your Supabase organization.
claude mcp add --scope project --transport http supabase "https://mcp.supabase.com/mcp?project_ref=YOUR_PROJECT_REF&read_only=true"
For Cursor, put the same URL in the url field of mcp.json.
Read-only isn't a full shield. Supabase's own write-up says prompt injection remains the number one concern even in read-only mode. A community guide also warns that read-only queries may ignore Row Level Security, so treat what the agent can read as everything. Point it at a dev project with fake data. For the wider setup, see Supabase for Vibe Coding.
Others worth a look later
The Claude Code docs list hosted servers for Notion, Stripe and others. The quickstart also shows one for Sentry. I'd add those only when you have a real need, like debugging production errors or wiring up payments. The Cursor docs point to cursor.directory for community servers, which is a good place to browse but not a place to install blindly.
A safe way to add any server
- Start project-scoped. Use
.cursor/mcp.jsonor--scope projectso the server only exists where you need it. - Read what it can do. Open the tool list in Cursor settings or
/mcpin Claude Code. If you see "delete" or "deploy," ask whether you want that. - Use the narrowest credential. Read-only token, dev database, one repo.
- Keep manual approval on for anything that writes.
- Commit before you try it. Git is your undo button.
Paste this into your agent after installing a server:
List every tool the [server name] MCP server gives you.
Mark each one as read-only or write/delete.
Then do one harmless read-only call to confirm it works,
and don't use any write tool without asking me first.
It costs one message and shows you what you just handed over. For the broader picture of credentials and agent permissions, AI Generated Code Security is worth ten minutes.
When a server won't show up
- Cursor: validate the JSON, check the file location, restart Cursor, and confirm your environment variables are visible to it. You can validate syntax with
python3 -m json.tool < .cursor/mcp.json. - Claude Code: run
claude mcp list, then/mcp. A project-scoped server shows "pending approval" until you startclaudeand approve it. - Remote vs local mix-ups: Cursor takes a bare
url, while Claude Code needs"type": "http"in JSON and skips a url entry without it.
FAQ
How many MCP servers should I install?
Two or three that you'll use weekly. Start with Context7 and Playwright, then add GitHub or Supabase when a task needs them. More servers means more tools for the agent to sort through, and more access to keep track of.
Do MCP servers cost money?
The servers here have free options as far as I found, but your editor or model usage still counts toward your plan. Context7 recommends a free API key for higher limits. For plan costs, see Cursor pricing or Claude Code pricing.
Is it safe to connect MCP to my production database?
Not if you can avoid it. Supabase recommends a development project, and if production is unavoidable, project scoping, read-only mode, limited feature groups and manual approval. Prompt injection is still a risk even then, so use fake or anonymized data when you can.
Cover photo: Luca Bravo on Unsplash