这是全部在cursor中进行的,从仓库创建-文件生成-README配置全套-到上传更新仓库-全都是在cursor中用自然语言实现的。这是全部在cursor中进行的,从仓库创建-文件生成-README配置全套-到上传更新仓库-全都是在cursor中用自然语言实现的。 (仓库中的部分内容应该是有问题的,所以不要100%相信它) This is all done in Cursor. From repository creation to file generation, full README configuration, and up to uploading and updating the repository. It's all achieved using natural language in Cursor. (Some of the content in the repository may be problematic, so don't trust it 100%).
本仓库提供了在Windows环境下配置和使用Cursor IDE 0.46版本中的MCP (Model Context Protocol) Servers功能的详细指南。MCP允许AI助手使用外部工具和服务,极大地扩展了其功能和实用性。
MCP (Model Context Protocol) 是一种允许大型语言模型(LLM)与外部工具和服务交互的协议。在Cursor IDE中,MCP Servers功能允许AI助手调用各种工具来执行搜索、浏览网页、执行代码等操作。
在开始配置MCP Servers之前,请确保满足以下条件:
这是最简单的方法,适合初学者:
注意: 在Windows环境中,项目级配置文件功能在Cursor 0.46版本可能存在问题。如果此方法不起作用,请使用方法1或方法3。
为特定项目配置MCP服务器:
.cursor
文件夹(如果不存在).cursor
文件夹中创建mcp.json
文件{
"mcpServers": {
"server_name": {
"command": "command_executable",
"args": ["arg1", "arg2", "..."]
}
}
}
例如,配置Sequential Thinking服务器:
{
"mcpServers": {
"sequential_thinking": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
}
}
}
注意: 全局配置文件功能可能需要特定版本的Cursor才能支持。
为所有项目配置MCP服务器:
%APPDATA%\Cursor
)mcp.json
文件以下是一些常用的MCP服务器及其配置命令:
npx -y @modelcontextprotocol/server-sequential-thinking
env BRAVE_API_KEY=[your-key] npx -y @modelcontextprotocol/server-brave-search
npx -y @modelcontextprotocol/server-puppeteer
npx -y @modelcontextprotocol/server-github
npx -y @modelcontextprotocol/server-fs
某些MCP服务器需要环境变量来配置API密钥或其他设置。在Windows中,有几种方法可以设置环境变量:
env API_KEY=your_key_here npx -y @package/server-name
$env:API_KEY="your_key_here"
npx -y @package/server-name
MCP服务器状态显示为黄色
无法找到MCP工具
Windows权限问题
项目级配置文件不起作用
Node.js版本问题
nvm
切换到Node.js v18或更高版本:nvm install 18
nvm use 18
按需添加服务器
使用Git Bash代替CMD
安全存储API密钥
定期更新MCP服务器
项目特定配置
是的,MCP工具只在Composer和Agent模式下可用。
服务器状态指示器应显示为绿色,并且在使用时会弹出终端窗口。
理论上没有限制,但建议只添加当前需要的服务器以减少资源消耗。
可以将.cursor/mcp.json
文件添加到版本控制系统中,或使用配置同步工具。
欢迎通过Issues或Pull Requests贡献改进和更新。
MIT License - 详见LICENSE文件。
{
"mcpServers": {
"server_name": {
"env": {},
"args": [
"arg1",
"arg2",
"..."
],
"command": "node"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.