从关键词到中国知网CSSCI论文链接的MCP服务
Project description
words2links (关键词到论文链接)
一个基于MCP协议的服务,用于将搜索关键词转换为中国知网CSSCI来源的论文链接列表。
功能特点
- 基于关键词搜索中国知网(CNKI)学术资源
- 自动筛选CSSCI来源的学术论文
- 返回格式化的论文标题和链接列表
- 支持流式进度反馈
- 兼容Claude和其他支持MCP协议的AI助手
技术实现
本服务基于以下技术栈:
- Python 3.12+
- MCP (Model Context Protocol) 1.6.0+
- Playwright 用于网页自动化
- Chrome/Chromium 浏览器作为后端渲染引擎
快速开始
系统要求
- Python 3.12 或更高版本
- Chrome 或 Chromium 浏览器
- Windows/MacOS/Linux 操作系统
安装
- 从PyPI安装(推荐):
pip install words2links
- 或从源码安装:
git clone https://github.com/yourusername/words2links.git
cd words2links
pip install -e .
配置Claude桌面版
Windows
编辑 %APPDATA%/Claude/claude_desktop_config.json
MacOS
编辑 ~/Library/Application\ Support/Claude/claude_desktop_config.json
添加以下配置:
已发布版本配置
"mcpServers": {
"words2links": {
"command": "uvx",
"args": [
"words2links"
]
}
}
开发版本配置
"mcpServers": {
"words2links": {
"command": "uv",
"args": [
"--directory",
"C:\\Users\\ptelegion\\1st_cursor_proj\\kwds2rslt\\words2links",
"run",
"words2links"
]
}
}
使用方法
启动Claude桌面版后,在对话中可以使用以下工具:
搜索论文工具
- 工具名称:
search_papers - 参数:
keyword- 搜索关键词 - 返回格式:
关键词\n论文1\n@URL1\n论文2\n@URL2...
示例提示词:
请使用words2links服务搜索关于"数字经济"的CSSCI论文,并列出前5篇论文的标题和链接。
开发
构建与发布
- 同步依赖并更新锁文件:
uv sync
- 构建包分发:
uv build
- 发布到PyPI:
uv publish
调试
由于MCP服务器通过标准输入输出运行,调试可能比较困难。推荐使用MCP Inspector进行调试。
使用npm启动MCP Inspector:
npx @modelcontextprotocol/inspector uv --directory C:\Users\ptelegion\1st_cursor_proj\kwds2rslt\words2links run words2links
启动后,Inspector会显示一个可在浏览器中访问的URL,开始调试。
常见问题
-
问题: 服务无法连接到知网 解决方案: 检查网络连接,确保能够正常访问知网网站
-
问题: 浏览器自动化失败 解决方案: 确保已安装Chrome浏览器,并检查浏览器版本与Playwright兼容性
许可证
贡献指南
欢迎贡献代码、提交问题或功能建议。请通过GitHub Issues或Pull Requests参与项目改进。
致谢
- 感谢MCP协议团队提供的开发框架
- 感谢Playwright团队的出色浏览器自动化工具
- 感谢中国知网提供的学术资源平台
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file words2links-0.1.2.tar.gz.
File metadata
- Download URL: words2links-0.1.2.tar.gz
- Upload date:
- Size: 19.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9566c2dc01838a7e8be8a4a3d652521341c4a80bf1b7f963d4c3f747257004f7
|
|
| MD5 |
a086a9ffa5bbbe436190f984c17b648c
|
|
| BLAKE2b-256 |
7cd5d1fd4a9947255164612bbd154894b17a9d3508f927bc62b619b400846bac
|
File details
Details for the file words2links-0.1.2-py3-none-any.whl.
File metadata
- Download URL: words2links-0.1.2-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dafddb36c14a2e0cc0dc7b3efe0af7130721bcae35a30723c969cc6f70b8e0cd
|
|
| MD5 |
e7f0e9719886db9990e766735b1d963d
|
|
| BLAKE2b-256 |
f9c95977f243ba6e6d777ebb66476a14daace0d7fa77cc9e8ce24876d5b7f8b6
|