PaperFlow MCP Server
把 PaperFlow 的论文分析能力封装成 MCP Server,供外部 agent(Claude Desktop / Claude Code / Cursor / OpenClaw 等)调用。
状态
- P0 ✅:stdio 传输,工具
analyze_paper/get_paper,临时 JWT 鉴权。 - P1 ✅:API Key 鉴权(
X-API-Key)+ 管理端点/api/v1/api-keys。 - P2 ✅:综述工具
create_survey/get_survey+ MCP Resources(paperflow://papers/{id}、paperflow://surveys/{id})+ 打包(console 入口paperflow-mcp)。 - P3:正式发布(MCP registry / ClawHub / 官网文档)。
安装
方式一(源码,开发):
cd mcp_server
python -m venv .venv
.venv/bin/pip install -e .
方式二(一键运行,分发给外部用户):
# 已发布到 PyPI 后
uvx paperflow-mcp # 或 pipx run paperflow-mcp
运行配置
环境变量:
| 变量 | 说明 | 默认 |
|---|---|---|
PAPERFLOW_BASE_URL |
PaperFlow 后端地址 | http://localhost:8000 |
PAPERFLOW_TOKEN |
临时 JWT(P0 用) | 必填 |
PAPERFLOW_API_KEY |
API Key(推荐,P1 已完成) | - |
PAPERFLOW_API_KEY_FILE |
从文件读取 API Key(用于不把密钥写进配置) | - |
凭证绝不写入仓库;通过运行 MCP 的客户端注入环境变量。
已配置
PAPERFLOW_API_KEY时优先用X-API-Key认证,否则回落到PAPERFLOW_TOKEN(JWT)。 API Key 通过POST /api/v1/api-keys(携带网页登录凭证)生成,明文仅返回一次。
MCP 客户端接入示例(Claude Desktop / OpenClaw)
{
"mcpServers": {
"paperflow": {
"command": "/absolute/path/to/mcp_server/.venv/bin/python",
"args": ["-m", "paperflow_mcp.server"],
"env": {
"PAPERFLOW_BASE_URL": "http://localhost:8000",
"PAPERFLOW_TOKEN": "<jwt>"
}
}
}
}
工具
analyze_paper(arxiv_url | text, route=quick, wait_seconds=300)— 提交并等待论文分析get_paper(paper_id, include_agents=False)— 查询论文状态 / 结果create_survey(topic, max_papers=50, date_start=0, date_end=0, wait_seconds=600)— 生成研究综述get_survey(survey_id)— 查询综述报告
资源(Resources)
paperflow://papers/{paper_id}— 论文完整分析(markdown)paperflow://surveys/{survey_id}— 综述完整报告(markdown)
说明
- MCP Server 是独立进程,由使用者(MCP 客户端)启动,不影响后端服务。
- 每次调用等同一次普通分析,按现有计费规则扣费(quick ¥0.10 / deep ¥0.30 / full ¥0.50)。
Metadata
Release files for paperflow-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| paperflow_mcp-0.1.0.tar.gz | 8.6 kB | Without provenance | Details for paperflow_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| paperflow_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for paperflow_mcp-0.1.0-py3-none-any.whl |
Total release size: 17.0 kB
Release files / paperflow_mcp-0.1.0.tar.gz
| Download URL | paperflow_mcp-0.1.0.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
359c428d9f7b60ab9a9918f35ef3ac4a62643d26d21d093bca38ebdedacb1c17
|
|
BLAKE2b-256 checksum How to use checksums |
98a8007c9078590198bf3572a145b1a5dc014c53833ee977a177193f3169dc5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / paperflow_mcp-0.1.0-py3-none-any.whl
| Download URL | paperflow_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e8a40183f21776fb9464dd64022669b95a8b01ca5fa7322bbeae5ff5be3f0d0
|
|
BLAKE2b-256 checksum How to use checksums |
4b16a086d817fc08391a1282bc338fb0e13e921d4ad8e1cf303df78181d34142
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for paperflow-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.