教程

Cursor MCP 服务器配置指南

在 Cursor 中接入 MCP 服务器的配置指南,让编程 Agent 能使用文档、仓库、浏览器工具、数据库和内部开发服务。

返回目录

教程

Cursor MCP 服务器配置指南

适合把 Cursor 作为主要 AI IDE,并希望复用工具能力、减少手动复制上下文的团队。

CursorMCPAI 编程 Agent开发者工具IDE Agents工作流自动化
适合场景

适合把 Cursor 作为主要 AI IDE,并希望复用工具能力、减少手动复制上下文的团队。

页面类型

教程

属性

Cursor / MCP 配置 / IDE Agent

如何使用

把这个工作流作为起点,再根据自己的流程调整工具、提示词和复核步骤。

概览

当 Cursor 的 Agent 能访问定义编码任务的系统时,它会更有价值:issue、API 文档、数据库 schema、设计说明、浏览器状态和本地脚本。MCP 的作用是把这些能力暴露成有名字的工具,而不是每次都靠复制长上下文或重复说明。

合适的 Cursor MCP 配置通常比想象中更小。IDE Agent 第一天不需要连接公司所有系统,它需要几个能直接支持常见开发问题的工具:读取 schema、查文档、检查浏览器页面、搜索仓库上下文或查询安全的预发接口。每个服务器都应该有明确任务和稳定输出。

这篇指南重点放在配置和验证。一次只加一个服务器,项目专属工具靠近仓库,个人工具只有足够安全才放全局,并用不会改动生产数据的提示词测试连接。

使用场景

  • 让 Cursor 读取框架文档或内部文档,使 Agent 回答实现问题时能引用当前资料,而不是只靠模型记忆。
  • 连接仓库或 issue 系统,把 ticket、PR 和代码搜索变成编辑时可用的上下文。
  • 前端改动需要真实页面检查时,接入浏览器自动化或 DevTools MCP,而不只做静态代码审查。
  • 用只读方式暴露数据库或 API 工具,让 Cursor 理解 schema、日志和服务契约,再辅助生成代码。

实施步骤

  1. 从重复开发问题开始. 选择 Cursor 经常遇到的任务,例如检查 API 契约、读取产品文档、调试本地页面或把 ticket 映射到代码。好的 MCP 服务器应减少高频复制上下文。
  2. 选择全局或项目配置. 跨仓库都用得上的个人工具放全局。属于某个代码库工作流、需要团队看到同一配置的工具放项目级配置。
  3. 加入服务商配置. 打开 Cursor 的 MCP 或工具设置,添加服务商提供的 server JSON。command、args、URL 和环境变量名要明确,方便之后排查。
  4. 缩小工具范围. 如果服务器支持 feature flags、只读模式或项目绑定,先关掉过宽和写入能力。Cursor 应看到编码任务需要的工具,而不是所有后台管理动作。
  5. 刷新 Agent 会话. 修改 MCP 配置后,重启或刷新 Cursor Agent 会话,让工具列表重新加载。如果工具没出现,检查 JSON、命令路径、环境变量和认证状态。
  6. 检查第一次代码改动. 运行一个窄范围提示词,让 Cursor 使用新工具,然后审查 diff 和引用上下文。验证重点不只是连通,而是工具是否真正提升了修改质量。

配置步骤

  1. 团队拥有的 MCP 服务器只有在命令可移植、密钥不写进文件时,才放入项目配置。
  2. token 统一放环境变量,并在仓库设置说明里记录变量名。
  3. 数据库、日志和文档类工具先用只读模式,等团队看过 Agent 调用方式后再考虑写入能力。
  4. 服务器名称要说明任务,例如 `supabase-schema`、`browser-qa`、`internal-docs`。
  5. 每个服务器都准备一个固定测试提示词,未来升级时不用临时想验证方法。

快速判断

首选服务器能解决常见编码问题的文档、schema 或浏览器检查服务器。
作用域选择个人工具放全局;仓库工作流工具放项目配置。
质量检查第一次 Cursor diff 应引用工具输出,而不是凭空猜测。
主要风险把过宽的写入型服务接到 IDE Agent,却没有审查习惯。

常见问题

Cursor MCP 应该放全局还是项目?

个人通用工具放全局;属于仓库工作流或需要团队共享的工具放项目配置。

第一个 Cursor MCP 服务器选什么最安全?

只读的文档、schema 或浏览器检查服务器通常比写入型运维服务器更适合作为第一步。

为什么 Cursor 看不到 MCP 工具?

检查 JSON、命令路径、环境变量、网络、认证状态,以及修改配置后是否刷新了 Agent 会话。

相关资源

123 results 0 saved 7 categories 123 resources Updated index

Workflow Directory

Browse curated agents, MCP servers, templates, and workflow examples for real AI automation projects.

AI agent stack research

Find the right AI agents, MCP servers, and workflow templates

Agent Stack Library is a practical directory for people who are building real AI automation systems, not just collecting tool names. The site brings together AI agent frameworks, MCP servers, workflow templates, coding agents, browser automation tools, research workflows, and SaaS operations playbooks so you can compare an entire agent stack before committing to a toolchain.

A useful AI agent stack usually needs more than one model or one chat interface. Teams need a clear workflow, safe tool permissions, repeatable prompts, review checkpoints, and a way to measure whether the output is good enough for production. That is why the directory focuses on use cases such as AI coding agents, MCP server selection, SEO content workflows, browser QA, research assistants, internal tools, and multi-agent orchestration.

If you are evaluating MCP servers for AI agents, start with the task. A coding agent often needs GitHub access, a narrow filesystem scope, a test runner, and browser or DevTools verification. A research agent may need web search, document parsing, citation capture, memory, and a review step. A business operations agent may need CRM, email, calendar, spreadsheet, and audit logs. The best stack is the smallest one that completes the job safely.

AI agent workflow templates

Workflow templates help turn one-off prompts into repeatable systems. Each template should define the trigger, input context, agent role, connected tools, output format, human review step, and success metric. Browse the AI Agent Workflow Templates guide for SEO, coding, research, browser automation, and SaaS operations examples.

MCP servers for AI agents

MCP servers connect agents to browsers, repositories, files, databases, memory, and business apps. Good MCP choices reduce custom integration work, but they also require clear permission boundaries. The Best MCP Servers for AI Agents guide explains how to pick a safe and useful tool stack.

AI coding agent workflow

Coding agents work best when they follow a normal engineering path: issue intake, repo context, plan, patch, tests, UI verification, pull request, and human review. The AI Coding Agent Workflow page gives a practical checklist for scoped code changes.

How to choose an agent stack

Start by deciding what the agent is allowed to do. Read-only workflows are easier to launch because the agent can gather context, summarize findings, and draft recommendations without touching production systems. Write-capable workflows need stricter guardrails: scoped credentials, test environments, logging, rollback procedures, and a human approval point before external actions.

Next, compare tools by workflow fit rather than popularity. An open-source agent framework may be perfect for a developer team that wants full control, while a managed automation platform may be better for operations teams that need quick integrations. A browser automation stack is useful for UI checks and web research, but it should not replace structured APIs when reliable APIs exist.

Finally, measure quality. Track task completion rate, review time, correction rate, cost per run, latency, and whether the output can be reused without heavy manual cleanup. A strong AI agent workflow is not the one with the most tools; it is the one that produces reliable output, exposes failures clearly, and lets humans stay in control where the risk is high.

What each directory category is for

The Agents category covers frameworks, SDKs, and agent products that help teams plan, call tools, manage memory, hand off work, or coordinate multiple specialist agents. Use this category when you are comparing LangGraph-style orchestration, coding agents, research agents, customer support agents, or open-source agent frameworks for a production project.

The MCP Tools category is focused on servers and integrations that let an AI agent interact with the outside world. These pages are useful when you need repository context, browser inspection, file access, databases, calendars, CRMs, or other business systems. Each MCP server should be judged by permission scope, reliability, setup effort, documentation quality, and how clearly failed tool calls are reported.

The Workflows and Templates categories are for readers who already know the job they want to automate. Instead of starting with a tool, start with a repeatable process: SEO content briefing, GitHub issue triage, browser QA, competitive research, sales lead enrichment, or support ticket summarization. From there, pick the smallest agent stack that can collect the right context, run the task, produce a reviewable output, and leave a log for future improvement.