Code of Paper

io.github.isagelswann由 GitHub 账号 isagelswann 发布v0.3.2更新于 Oct 24, 2026

Find GitHub implementations of arXiv research papers — paper lookup, ranked code, search.

已验证STDIO仅桌面知识与记忆开发者工具

概览

AI 生成的概览

Code of Paper 让助手查询 arXiv 论文并找到对应的 GitHub 实现,提供论文查看、排序后的代码仓库与全文搜索。

可以做什么
查询论文:用 arXiv ID 或完整网址获取论文元数据与高置信度的实现仓库。
适用场景
当你需要从 arXiv 论文找到对应的 GitHub 实现、比较同一篇论文的候选仓库,或按主题、年份、会议筛选带代码的论文时使用。适合文献综述、复现实验前挑选仓库,以及需要结构化 JSON 输出的自动化流程。
运行要求
在本地通过 uvx 运行 PyPI 包 codeofpaper(需 Python 3.10 以上),使用 stdio 连接。默认连接 api.codeofpaper.com,可用环境变量 CODEOFPAPER_API_URL 覆盖;匿名使用每分钟 60 次请求,无需 API 密钥。需要网络访问。
安装前请注意
工具均为只读,不会修改数据。查询内容与论文 ID 会发送到第三方 API(默认 api.codeofpaper.com),若用 CODEOFPAPER_API_URL 指向自建端点则发送到该端点。匿名额度有限,超出会遇到速率限制。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Code of Paper,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Code of Paper CLI

Maintenance mode. This CLI and MCP server are not actively developed. They keep working as long as api.codeofpaper.com is up; issues may go unanswered.

Discover GitHub implementations of research papers — from the terminal.

Search 181k+ arXiv papers and find their code on GitHub. Works for humans and AI agents alike.

[PyPI] [Python 3.10+] [License: MIT]

Install

bash
pip install codeofpaper

Or with pipx for isolated installs:

bash
pipx install codeofpaper

Requires Python 3.10+. No API key needed — works anonymously at 60 requests/minute.

Quick Start

bash
# Search for paperscodeofpaper search "vision transformers"
# Get paper details (arXiv IDs or full URLs both work)codeofpaper paper 2010.11929codeofpaper paper https://arxiv.org/abs/2010.11929
# Find code implementationscodeofpaper code 1706.03762
# Browse trending papers with codecodeofpaper trending --has-code
# JSON output for scripts and agentscodeofpaper -o json trending | jq '.trending[] | {title, stars: .max_stars}'
# One-shot reproducibility context for an agent: paper + confident repos# (with tier + framework + license) + fork-graph in a single JSON payload.codeofpaper -o json paper 2010.11929 | jq '{title, repos: [.repos[] | {full_name, tier}], forks: [.fork_graph[] | .full_name]}'
# Literature review in one commandcodeofpaper research "reinforcement learning" --depth deep

Output Formats

Use -o / --output before the subcommand:

bash
codeofpaper -o json paper 2010.11929codeofpaper -o quiet search "attention" | head -5codeofpaper -o csv trending --has-code > papers.csv
FormatFlagUse case
Table-o tableHuman reading (default)
JSON-o jsonScripts, jq pipelines, full response data
Quiet-o quietIDs only, one per line — pipe into other commands
JSONL-o jsonlStreaming, append to files, batch processing
BibTeX-o bibtexCitation managers, LaTeX bibliographies
CSV-o csvSpreadsheets, pandas, data analysis

The shorthand -q is equivalent to -o quiet:

bash
codeofpaper -q search "transformers" | head -3

You can set a default format via config so you don't need -o every time:

bash
codeofpaper auth setup    # then edit ~/.config/codeofpaper/config.json

Commands

Discovery

CommandDescriptionExample
searchFull-text paper searchcodeofpaper search "vision transformers" --has-code
paperPaper details by arXiv ID or URLcodeofpaper paper 2010.11929
codeGitHub repos implementing a papercodeofpaper code 1706.03762
similarSemantically similar paperscodeofpaper similar 2010.11929
suggestAutocomplete / quick lookupcodeofpaper suggest "attention"
randomRandom interesting papercodeofpaper random --quality high

Browsing

CommandDescriptionExample
trendingTrending papers by categorycodeofpaper trending --category cs.CV --sort hot
categoriesList categories or get detailscodeofpaper categories cs.AI
conferencesList all conference seriescodeofpaper conferences
conferencePapers from a specific conferencecodeofpaper conference neurips_2024 --has-code
code-dropsRecent conference papers with new codecodeofpaper code-drops --days 7
repoReverse lookup: repo → papercodeofpaper repo google-research/vision_transformer
openOpen paper or repo in browsercodeofpaper open 2010.11929 --code

Bulk Operations

CommandDescriptionExample
researchStructured research overviewcodeofpaper research "RL" --depth deep
batchProcess multiple IDs from stdin/filecat ids.txt | codeofpaper batch paper
exportPaginated bulk exportcodeofpaper export trending -o csv > out.csv

Configuration

CommandDescriptionExample
authManage API key (setup/status/clear)codeofpaper auth status
statusCheck API health and statscodeofpaper status

Command Details

search

bash
codeofpaper search "reinforcement learning" --sort has_code --has-codecodeofpaper search "GAN" --limit 20 --offset 10

Options: --limit, --offset, --sort (relevant, recent, has_code), --has-code, --category.

research

Multi-step orchestrated overview of a research topic:

bash
codeofpaper research "vision transformers" --depth deep
DepthStepsAPI calls
shallowSearch only + landscape statistics1
mediumSearch + repos for top papers (default)~6
deepSearch + repos + similar papers from #1~8

batch

Process multiple queries or IDs from a file or stdin. Always outputs JSONL regardless of -o:

bash
# From a filecodeofpaper batch paper ids.txt
# From stdinecho -e "2010.11929\n1706.03762" | codeofpaper batch paper
# Pipe from another commandcodeofpaper -q similar 2010.11929 | codeofpaper batch code

Supported commands: paper, search, code, similar, suggest.

Each line produces one JSON object:

json
{"input": "2010.11929", "status": "ok", "data": {...}}{"input": "9999.99999", "status": "error", "error": "Not found"}

Options: --delay (seconds between calls, default 0.5).

export

Paginated bulk export from trending, conference, or search:

bash
codeofpaper export trending --category cs.CV --has-code -o csv > cv.csvcodeofpaper export conference neurips_2024 --has-code -o bibtex > neurips.bibcodeofpaper export search "transformers" --max 500 -o jsonl > data.jsonl

Auto-paginates through results (100 per page, 0.5s delay). Options: --max (default 200), --has-code, --category, --days.

Agent Integration

The CLI is designed for AI agent consumption. Key features:

Stable Exit Codes

Agents can branch on exit codes without parsing error messages:

Exit CodeMeaningAgent Action
0SuccessParse stdout
1General errorLog and report
2Connection errorRetry with backoff
3Not found (404)Skip or try different ID
4Rate limited (429)Wait and retry
5Auth required (401/403)Run codeofpaper auth setup

Machine-Readable Output

bash
# JSON for structured parsingcodeofpaper -o json paper 2010.11929 | jq '.title'
# Quiet mode for ID listscodeofpaper -q search "attention" | head -5
# JSONL for streamingcodeofpaper -o jsonl trending --has-code | while read -r line; do  echo "$line" | jq -r '.arxiv_id'done

HTTP Cache

Responses are cached on disk for 30 minutes (~/.cache/codeofpaper/http/), so repeated calls are instant and free.

MCP Server (optional)

Code of Paper ships an optional Model Context Protocol server that exposes paper / code lookup as tools to any MCP-compatible agent — Claude Desktop, Cursor, Continue, Cline, Zed, etc.

Install with the mcp extra:

bash
pip install 'codeofpaper[mcp]'# or, with uv:uv tool install 'codeofpaper[mcp]'

This adds a codeofpaper-mcp entry point that speaks MCP over stdio.

Wire into Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS), %APPDATA%\Claude\claude_desktop_config.json (Windows), or ~/.config/Claude/claude_desktop_config.json (Linux):

json
{  "mcpServers": {    "codeofpaper": {      "command": "uvx",      "args": ["--from", "codeofpaper[mcp]", "codeofpaper-mcp"]    }  }}

This pulls + runs the server on demand — no global install needed. If you've already pip install'd the package, you can replace the command with just "codeofpaper-mcp" and drop args.

Wire into Cursor / Continue / Cline

Most MCP clients accept the same shape:

json
{  "mcpServers": {    "codeofpaper": {      "command": "codeofpaper-mcp",      "env": {        "CODEOFPAPER_API_URL": "https://api.codeofpaper.com"      }    }  }}

Tools exposed

ToolPurpose
paper_lookup(paper_id_or_url)Paper metadata + confident-tier repos
code_for_paper(paper_id_or_url, limit, include_possible)Ranked GitHub repos implementing a paper
search_papers(query, limit, year, venue, has_code)Free-text paper search with filters

All tools are read-only, return plain JSON, and surface API errors as {"error": "...", "status": N} rather than throwing — agents get structured output either way.

Common Workflows

Core Discovery

bash
# Find papers with code about a topiccodeofpaper search "reinforcement learning" --sort has_code --has-code
# Get the best repo for a specific papercodeofpaper code 1706.03762
# Accepts arXiv URLs — no need to extract the IDcodeofpaper paper https://arxiv.org/abs/2010.11929
# Reverse lookup: what paper does this repo implement?codeofpaper repo google-research/vision_transformer
# Open a paper in the browser, or jump straight to its codecodeofpaper open 2010.11929codeofpaper open 2010.11929 --code

Browsing & Monitoring

bash
# What's trending in computer vision?codeofpaper trending --category cs.CV --sort hot
# Conference papers that just got new codecodeofpaper code-drops --days 7
# NeurIPS 2024 oral papers with codecodeofpaper conference neurips_2024 --track oral --has-code
# Daily monitoring: what's new in my field?codeofpaper trending --category cs.CV --days 1 -o json >> ~/research/daily_cv.jsonl

Composable Pipelines

bash
# Find implementations of a paper's related workcodeofpaper similar 2010.11929 -o quiet | codeofpaper batch code
# Batch process a reading listcat reading_list.txt | codeofpaper batch paper > enriched.jsonl
# Cross-reference with GitHub CLIcodeofpaper code 1706.03762 -o quiet | head -1 | xargs gh repo view
# Export conference papers as BibTeXcodeofpaper export conference neurips_2024 --has-code -o bibtex > neurips2024_code.bib
# Bulk export a category for meta-analysiscodeofpaper export trending --category cs.CV --has-code --days 365 -o csv > cv_with_code.csv

Multi-Step Scripts

bash
# Find a paper → get top repo → clone itREPO=$(codeofpaper search "attention is all you need" -o quiet | head -1 | \  xargs codeofpaper code -o json | jq -r '.top_repos[0].full_name')gh repo clone "$REPO"
# Discover a random paper and explore its neighborhoodID=$(codeofpaper random --quality high -o quiet)codeofpaper paper "$ID"codeofpaper similar "$ID"codeofpaper code "$ID"
# Quick paper lookup in a scriptARXIV_ID="2010.11929"TITLE=$(codeofpaper -o json paper "$ARXIV_ID" | jq -r '.title')echo "Paper: $TITLE"

Configuration

Config is stored as JSON via platformdirs:

OSPath
Linux~/.config/codeofpaper/config.json
macOS~/Library/Application Support/codeofpaper/config.json
Windows%APPDATA%\codeofpaper\config.json

Fields:

json
{  "api_url": "https://api.codeofpaper.com",  "api_key": null,  "default_format": "table",  "ca_bundle": null}

No config file needed — everything works out of the box with sensible defaults.

Priority Chain

Options are resolved in this order (first wins):

  1. CLI flag (--api-url, --api-key, --ca-bundle, -o)
  2. Environment variable (CODEOFPAPER_API_URL, CODEOFPAPER_API_KEY, CODEOFPAPER_CA_BUNDLE, CODEOFPAPER_OUTPUT, CODEOFPAPER_TIMEOUT)
  3. Config file
  4. Built-in defaults

Corporate Proxies / Custom TLS Certificates

If you're behind a corporate proxy that performs TLS inspection (man-in-the-middle), you'll see an SSL error like:

Cannot reach API: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain

To fix this, point the CLI at your corporate CA certificate bundle (PEM file). Three equivalent ways, in priority order:

bash
# 1. CLI flag (per-invocation)codeofpaper --ca-bundle /path/to/corporate-ca.pem search "transformers"
# 2. Environment variable (per-session or in .bashrc/.zshrc)export CODEOFPAPER_CA_BUNDLE=/path/to/corporate-ca.pem
# 3. Config file (permanent — set once, forget)# Add to ~/.config/codeofpaper/config.json:#   {"ca_bundle": "/path/to/corporate-ca.pem"}

Ask your IT department for the CA certificate file if you don't have it.

Tip: If you've already set SSL_CERT_FILE for other tools (pip, curl, etc.), httpx respects that variable automatically — no extra configuration needed.

Alias: cop

Both codeofpaper and cop are installed as entry points:

bash
cop search "transformers"cop -o json trending | jq '.'

Note: If cop conflicts with another tool on your system, use codeofpaper instead.

Shell Completion

Install tab completion for your shell:

bash
codeofpaper --install-completion

Supports bash, zsh, fish, and PowerShell. After installing, restart your shell or source the completion file.

Help

bash
codeofpaper --help          # List all commandscodeofpaper search --help   # Help for a specific commandcodeofpaper -v              # Print version

Links

License

MIT

来源:README.md,提交 f4d05fd

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.3.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分