开发人员到 MCP 服务器
该存储库包含 Dev.to 的模型上下文协议服务器实现,允许 AI 助手访问并与 Dev.to 内容交互。
什么是 MCP?
模型上下文协议 (MCP) 是一项标准,用于支持 AI 助手与外部服务、工具和数据源进行交互。此服务器实现了 MCP 规范,以提供对 Dev.to 内容的访问。要了解更多关于 MCP 的信息,请观看此视频
特征
从 Dev.to 获取最新和热门文章
按不同标准搜索文章
获取特定文章的详细信息
获取有关用户的详细信息。
通过标签或用户名访问文章
创建并发布新文章到 Dev.to
更新现有文章
缓存机制以提高性能并减少 API 调用
安装
克隆此存储库
连接到 MCP 服务器
使用适当的 {{PATH}} 值复制以下 json:
{ "mcpServers": { "devto": { "command": "{{PATH_TO_UV}}", // Run `which uv` and place the output here "args": [ "--directory", "{{PATH_TO_SRC}}",// cd into the repo, run `pwd` and enter the output here "run", "server.py" ], "env": { "DEV_TO_API_KEY":"Your Dev.to API Key" // Get it from https://dev.to/settings/extensions. } } } }您可以从Dev.to 设置页面获取 Dev.to API 密钥。
对于Claude ,将其保存为
claude_desktop_config.json
并保存在 Claude Desktop 配置目录中:~/Library/Application Support/Claude/claude_desktop_config.json对于Cursor ,将其保存为
mcp.json
并保存在 Cursor 配置目录中:~/.cursor/mcp.json重启 Claude Desktop/Cursor
打开 Claude Desktop,您现在应该看到 Devto 是一个可用的集成。
或者重新启动 Cursor。
可用工具
该服务器提供以下工具:
get_latest_articles()
- 从 Dev.to 获取最新文章get_top_articles()
- 从 Dev.to 获取最受欢迎的文章get_articles_by_tag(tag)
- 通过标签获取文章get_article_by_id(id)
- 通过 ID 获取特定文章search_articles(query, page=1)
- 通过标题/描述中的关键词搜索文章get_article_details(article_id)
- 获取特定文章的完整内容和元数据get_articles_by_username(username)
- 获取特定作者撰写的文章create_article(title, body_markdown, tags, published)
- 创建并发布新文章update_article(article_id, title, body_markdown, tags, published)
- 更新现有文章
示例查询
以下是您可以向连接到该服务器的 AI 助手询问的一些示例:
“在 Dev.to 上查找有关 Python 的文章”
“向我展示最新的 Dev.to 文章”
“获取文章 1234 的详细信息”
“用户‘ben’写了哪些文章?”
“搜索有关机器学习的文章”
“创建一篇题为‘Python 入门’的新文章”
“更新我的 ID 为 5678 的文章,以修复内容中的拼写错误”
高级功能
自定义提示
服务器提供了可供AI助手使用的预定义提示:
search_prompt
- 创建格式化的搜索提示analyze_article
- 创建提示来分析特定文章
验证
服务器需要 Dev.to API 密钥才能执行某些操作,尤其是创建和更新文章。API 密钥应设置为环境变量DEV_TO_API_KEY
。
贡献
欢迎贡献代码!欢迎提交 Pull 请求。
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
MCP 服务器实现允许 AI 助手访问、搜索和与 Dev.to 内容交互,包括获取文章、检索用户信息和发布新内容。
Related MCP Servers
- AsecurityFlicenseAqualityAn MCP server that supercharges AI assistants with powerful tools for software development, enabling research, planning, code generation, and project scaffolding through natural language interaction.Last updated -113978
- -securityFlicense-qualityA MCP server that allows AI assistants to interact with the browser, including getting page content as markdown, modifying page styles, and searching browser history.Last updated -82
- AsecurityAlicenseAqualityA MCP server that enables human-in-the-loop workflow in AI-assisted development tools by allowing users to run commands, view their output, and provide textual feedback directly to the AI assistant.Last updated -11,579MIT License
- AsecurityAlicenseAqualityA powerful MCP server that provides interactive user feedback and command execution capabilities for AI-assisted development, featuring a graphical interface with text and image support.Last updated -139MIT License