fulltext-mode

fulltext-mode is a cursor rule for Cursor from hhx465453939/mcp-pubmed-server. It costs 0 tokens per session (2,017 once invoked), scanned A, original, Apache-2.0.

A configuration guide for finding and downloading the full text of research papers, usually as PDF files. It supports disabled, manual-download, and automatic-download modes for openly available papers.

In plain words
What is it for?
Use it to detect open-access papers through PMC, Unpaywall, or publisher websites, download available PDFs, and manage cached full-text files through environment settings.
Why use it?
It avoids treating every paper as an abstract-only record and gives clear control over when files are downloaded. It also checks several sources for free legal access and keeps downloaded PDFs in a cache.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to detect open-access papers through PMC, Unpaywall, or publisher websites, download available PDFs, and manage cached full-text files through environment settings.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/hhx465453939/mcp-pubmed-server/fulltext-mode
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/hhx465453939/mcp-pubmed-server

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fulltext-mode

README.md
[![agentmods](https://agentmods.dev/badge/rules/hhx465453939/mcp-pubmed-server/fulltext-mode.svg)](https://agentmods.dev/rules/hhx465453939/mcp-pubmed-server/fulltext-mode)
Your own site
<a href="https://agentmods.dev/rules/hhx465453939/mcp-pubmed-server/fulltext-mode"><img src="https://agentmods.dev/badge/rules/hhx465453939/mcp-pubmed-server/fulltext-mode.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,017 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.02017
Opus 5 $0.00000 $0.01009
Sonnet 5 $0.00000 $0.00403
Haiku 4.5 $0.00000 $0.00202

Measured 8d ago against content hash d1d4471f02f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

fulltext-mode scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const response = await fetch(downloadUrl, {
.cursor/rules/fulltext-mode.mdc · 279 lines

How it starts

The opening of the file, as written. The whole thing — 279 lines — stays where its author put it; the contents beside it link to each section on GitHub.

全文模式开发规范

全文模式架构

环境变量配置

// 全文模式配置
const FULLTEXT_MODE = (process.env.FULLTEXT_MODE || 'disabled').toLowerCase();
const FULLTEXT_ENABLED = FULLTEXT_MODE === 'enabled' || FULLTEXT_MODE === 'auto';
const FULLTEXT_AUTO_DOWNLOAD = FULLTEXT_MODE === 'auto';

模式说明

  • disabled: 禁用全文功能(默认)
  • enabled: 启用全文检测,手动下载
  • auto: 启用全文检测,自动下载可用的OA论文

全文检测流程

1. 开放获取检测

// 检测OA论文和全文可用性
async detectOpenAccess(article) {
    const oaInfo = {
        isOpenAccess: false,
        sources: [],
        downloadUrl: null,
        pmcid: null,
        doi: article.doi
    };
    
    // 1. 检查PMC免费全文
    // 2. 检查DOI的Unpaywall
    // 3. 检查出版商直接OA
    
    return oaInfo;
}

2. 多源检测策略

// PMC检测
async checkPMCContent(pmid) {
    const pmcUrl = `${PMC_BASE_URL}/?term=${pmid}`;
    // 检查PMC免费全文可用性
}

// Unpaywall检测
async checkUnpaywall(doi) {
    const unpaywallUrl = `${UNPAYWALL_API_URL}/${doi}?email=${email}`;
    // 检查Unpaywall数据库
}

// 出版商直接检测
async checkPublisherOA(doi) {
    const doiUrl = `https://doi.org/${doi}`;
    // 检查出版商网站免费PDF
}

PDF下载和缓存

下载配置

// PDF下载配置
const FULLTEXT_CACHE_DIR = path.join(CACHE_DIR, 'fulltext');
const PDF_CACHE_EXPIRY = 90 * 24 * 60 * 60 * 1000; // 90天过期
const MAX_PDF_SIZE = 50 * 1024 * 1024; // 50MB最大PDF大小

下载流程

// PDF下载方法
async downloadPDF(pmid, downloadUrl, oaInfo) {
    const response = await fetch(downloadUrl, {
        timeout: 60000, // 60秒超时
        headers: {
            'User-Agent': 'Mozilla/5.0 (compatible; PubMed-MCP-Server/2.0)',
            'Accept': 'application/pdf,text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
        }
    });
    
    // 检查文件大小限制
    // 保存PDF文件
    // 更新全文索引
}

缓存管理

// 检查PDF是否已缓存
isPDFCached(pmid) {
    const pdfPath = path.join(FULLTEXT_CACHE_DIR, `${pmid}.pdf`);
    if (fs.existsSync(pdfPath)) {
        const stats = fs.statSync(pdfPath);
        const age = Date.now() - stats.mtime.getTime();
        if (age < PDF_CACHE_EXPIRY) {
            return { cached: true, filePath: pdfPath, fileSize: stats.size };
        }
    }
    return { cached: false };
}

Read the full file on GitHub · 279 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 279 lines · 2,017 tokens per session scan A d1d4471f02f7

Subscribe to this mod's changes

fulltext-mode is a cursor rule published in the GitHub repository hhx465453939/mcp-pubmed-server (6 stars, last pushed 6mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,017 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other cursor rules, from other repositories

sumatrapdf-official-toc

Official PDF TOC — a numbering gap means an item was dropped; salvage or reject, never skip the hole.

dengxibo/sumatrapdf-plus · 4,262 tokens

pro-deck-builder

Create polished HTML slide decks and PDF-ready documents for consulting deliverables. Uses the RRBC design system with warm light mode, dark mode cover pages, Lora/Inter/Roboto Mono typography, and data visualization palette. Trigger on 'deck', 'slides', 'presentation', 'pitch deck', 'keynote', 'report', or 'PDF'.

thatrebeccarae/claude-marketing · 70 tokens

sigma-reports

Build, validate, retrieve, and safely update Sigma report code representations through /v2/reports/spec. Use for fixed-layout or pixel-perfect reports, invoices, statements, regulatory documents, and PDF delivery. Covers report pages, absolute pixel layout, header/footer panels, common elements, verification…

twells89/sigma-skills · 92 tokens

document-skills

A rule for handling academic papers, Nature-style editing, patents, software documentation, grant materials, presentations, and technical records. It says to choose an installed skill from the /.agents/skills folder and read its instructions first.

lamia482/claude-in-cursor · 59 tokens

ponytail

Ponytail, lazy senior dev mode. Always pick the simplest solution that works.

DietrichGebert/ponytail · 576 tokens

angular-20

This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.

angular/angular · 0 tokens