一个用于在Reddit开发者平台上编写应用程序的MCP服务器。
在您的mcp.json文件中添加以下内容,以选择所需的编辑器或LLM。
{
"mcpServers": {
"devvit-mcp": {
"command": "npx",
"args": ["-y", "@devvit/mcp"]
}
}
}
{
"mcpServers": {
"devvit-mcp": {
"command": "npx",
"args": ["-y", "@devvit/mcp"],
"env": {
"DEVVIT_DISABLE_METRICS": "true"
}
}
}
}
git clone git@github.com:reddit/devvit-mcp.git
cd devvit-mcp
nvm use
npm install
npm run dev
如果您想在其他项目中测试您的MCP服务器,请传递整个node运行时路径以及您机器上的/dist/index.js位置。
which nodedevvit-mcp根目录开始的pwd + /dist/index.js{
"mcpServers": {
"devvit-mcp": {
"command": "/Users/marcus.wood/.nvm/versions/node/v22.13.0/bin/node",
"args": ["/Users/marcus.wood/open-source/devvit-mcp/dist/index.js"]
}
}
}
console.log。您会看到奇怪的错误消息,如Unexpected token 'a', " at Anthrop"... is not valid JSON。我们已经通过logger自动处理了这种转换。console.error。使用npm run dev,前往工具,列出它们并触发,这是最佳体验。
若要实时测试日志,请使用Claude桌面版并在其中连接MCP。它们的日志文件会在您的机器上报告错误。您可以通过在VSCode中打开或运行tail命令来查看它们。
如果您看到类似这样的信息:
Error: 服务器不支持日志(通知/消息所需)
at Server.assertNotificationCapability
您需要向您的new MCPServer添加此功能。使用这个永久链接了解应添加哪个键。
此包使用由CI/CD管理的自动化版本控制。package.json中的版本是一个占位符,在发布过程中会自动更新。请检查git标签以获取实际发布的版本。
非常感谢Arabold开源了docs-mcp-server。此代码的部分灵感来源于该库。如果您需要其他文档服务器,请使用它!