med-paper-assistant

mcp
Security Audit
Warn
Health Warn
  • License Ò€” License: Apache-2.0
  • Description Ò€” Repository has a description
  • Active repo Ò€” Last push 0 days ago
  • Low visibility Ò€” Only 6 GitHub stars
Code Warn
  • fs module Ò€” File system access in .github/workflows/evolution-health.yml
Permissions Pass
  • Permissions Ò€” No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

πŸ”¬ AI-powered medical paper writing toolkit β€” from PubMed search to Word export, all inside VS Code

README.md

Medical Paper Assistant

Python
MCP
Copilot
License

Windows
Linux
macOS

πŸ”¬ An Integrated AI Toolkit for Medical Paper Writing

3 MCP Servers Β· ~138 Tools Β· 26 Skills Β· 15 Prompt Workflows β€” All in VS Code

πŸ“– ηΉι«”δΈ­ζ–‡η‰ˆ
πŸ€– Auto-Paper: Fully Autonomous Paper Writing Guide β€” 11-Phase Pipeline, 78 Quality Hooks, Structured Review Loop


πŸ“¦ What's in the Box

This is a monorepo toolkit that bundles everything a medical researcher needs β€” from literature search to Word/LaTeX export β€” into one integrated VS Code environment.

Component Type Tools Description
mdpaper Core MCP Server 88 Paper writing: 88 tools, plus 3 MCP prompts and 3 MCP resources
pubmed-search MCP Server (submodule) 37 PubMed/Europe PMC/CORE search, PICO, citation metrics, session mgmt
CGU MCP Server (submodule) 13 Creative generation: brainstorm, deep think, spark collision
VS Code Extension Extension 5 cmds + 10 chat MCP auto-registration, workspace setup, @mdpaper chat participant
Dashboard Next.js Web App β€” Project management UI, diagram editor
Foam VS Code Extension β€” [[wikilink]] citation linking, hover preview, graph view
Skills Agent Workflows 26 Guided multi-tool workflows (literature review, draft writing...)
Prompts Prompt Files 15 /mdpaper.search, /mdpaper.draft, etc.

External MCP Servers (optional, installed via uvx):

  • drawio β€” CONSORT/PRISMA flowchart generation
  • zotero-keeper β€” Import references from Zotero library

VSX note: The MedPaper VS Code extension installs Python MCP tools persistently per machine via uv tool install, attempts uv tool upgrade on later activations, and skips duplicate PubMed Search / Zotero Keeper registration when another installed VS Code extension already provides those MCP servers. CI smoke now covers ubuntu-latest, windows-latest, macos-13, and macos-14, including official MCP client checks plus VSX validation smoke.

How the Pieces Fit Together

flowchart LR
    subgraph IDE["VS Code"]
        Agent["Copilot Agent<br/>26 Skills Β· 15 Prompts"]
        Foam[Foam Plugin]
        Ext[MedPaper Extension]
        Dash[Dashboard]
    end

    subgraph MCP["MCP Servers (~138 tools)"]
      mdpaper["mdpaper<br/>88 tools + 3 prompts + 3 resources<br/>Draft Β· Export Β· Validate Β· Review"]
        pubmed["pubmed-search<br/>37 tools<br/>Search Β· Metrics"]
        cgu["CGU<br/>13 tools<br/>Deep Think Β· Ideas"]
    end

    subgraph Data["Project Data"]
        proj[("projects/{slug}/<br/>Β· .memory/<br/>Β· references/<br/>Β· drafts/")]
    end

    Agent <-->|MCP| mdpaper
    Agent <-->|MCP| pubmed
    Agent <-->|MCP| cgu
    mdpaper -->|HTTP API| pubmed
    Foam <-->|Wikilinks| proj
    mdpaper <--> proj
    Ext --> mdpaper
    Dash --> proj

🎯 Why This Tool?

Traditional paper writing tools require you to know exactly what you want before you start. But research is rarely that linear.

Medical Paper Assistant is different:

  • πŸ” Explore First, Decide Later β€” Browse literature freely, save interesting papers, then decide your research direction
  • πŸ’¬ Conversational Workflow β€” Chat naturally with AI to refine your ideas, not fight with forms
  • 🧭 Guided Process β€” Step-by-step prompts guide you from concept to publication-ready manuscript
  • πŸ”— All-in-One β€” Search, write, cite, analyze, export β€” all integrated inside VS Code
Traditional Tools Medical Paper Assistant
Fixed templates, rigid workflow Flexible, exploratory approach
Separate apps for search/write/cite All-in-one: ~138 tools in VS Code
Manual reference management Auto-save with verified PubMed data
Export then format Direct Word export with journal styles
Learn complex UI Natural language conversation

πŸš€ Quick Start

Prerequisites

Requirement Version Check
Python 3.12+ python3 --version
Git Any recent git --version
VS Code Latest Help β†’ About
GitHub Copilot Extension Extensions panel

Install

# Clone with submodules
git clone --recursive https://github.com/u9401066/med-paper-assistant.git
cd med-paper-assistant

# Run setup script
./scripts/setup.sh          # Linux/macOS
.\scripts\setup.ps1         # Windows PowerShell

The script will:

  1. βœ… Create Python virtual environment (.venv/)
  2. βœ… Initialize pinned Git submodules from this repository
  3. βœ… Install all dependencies (via uv)
  4. βœ… Create .vscode/mcp.json configuration for mdpaper, pubmed-search, cgu, zotero-keeper, asset-aware, and drawio
  5. βœ… Verify MedPaper and CGU startup paths

Important installation notes:

  • The setup script uses pinned submodule commits for reproducible installs. It does not auto-track the latest upstream submodule HEAD.
  • If you intentionally want newer submodule code, run git submodule update --remote --merge yourself and test before committing.
  • drawio uses npx -y @drawio/mcp, so Node.js/npm must be available on the machine.
  • zotero-keeper and pubmed-search are launched via uvx in the repo workflow. In the VSX workflow they may be provided either by MedPaper itself or by separate installed VS Code extensions.

Verify: In Copilot Chat, type /mcp β€” you should see mdpaper listed πŸŽ‰

Optional Integrations

# Foam for reference linking (highly recommended)
code --install-extension foam.foam-vscode

# Draw.io for diagram generation
./scripts/setup-integrations.sh && ./scripts/start-drawio.sh

Windows PowerShell:

.\scripts\setup-integrations.ps1
.\scripts\start-drawio.ps1

πŸ’¬ MCP Prompts β€” Just Type and Go

In Copilot Chat, type these prompts to trigger guided workflows:

Prompt Description
/mdpaper.search πŸ” Start here! Explore literature, save papers
/mdpaper.concept πŸ“ Develop research concept with novelty validation
/mdpaper.draft ✍️ Write manuscript with auto-citations
/mdpaper.analysis πŸ“Š Analyze CSV data, generate figures & Table 1
/mdpaper.format πŸ“„ Export to Word with journal formatting
/mdpaper.clarify πŸ”„ Refine specific sections through conversation
/mdpaper.project πŸ“ Create or switch research projects
/mdpaper.strategy βš™οΈ Configure search strategy (dates, filters)
/mdpaper.help ❓ Show all available commands

πŸ’‘ Recommended Workflow: /mdpaper.search β†’ /mdpaper.concept β†’ /mdpaper.draft β†’ /mdpaper.format


🧠 Skill System + Project Memory

Our core differentiator: We don't just provide tools β€” we provide guided workflows that know how to combine tools effectively, AND project memory that remembers your research journey across sessions.

What is a Skill?

Tool  = Single capability (search, save, analyze...)
Skill = Complete knowledge (how to combine tools to accomplish tasks)

26 Skills covering the full research lifecycle:

Category Skills Triggers
πŸ”¬ Research literature-review, concept-development, concept-validation, parallel-search "ζ‰Ύθ«–ζ–‡", "search", "concept", "validate"
✍️ Writing draft-writing, reference-management, word-export "寫草稿", "draft", "citation", "export"
πŸ“ Management project-management, memory-updater, memory-checkpoint "ζ–°ε°ˆζ‘ˆ", "εˆ‡ζ›", "存ζͺ”"
πŸ› οΈ Development git-precommit, code-refactor, test-generator, code-reviewer "commit", "refactor", "test"

Project Memory

Each project maintains its own .memory/ folder, so the AI continues previous research coherently:

projects/{slug}/
β”œβ”€β”€ .memory/
β”‚   β”œβ”€β”€ activeContext.md   ← Agent's working memory
β”‚   └── progress.md        ← Research milestones
β”œβ”€β”€ concept.md             ← Research concept (with πŸ”’ protected sections)
β”œβ”€β”€ references/            ← Foam-compatible literature library
β”œβ”€β”€ drafts/                ← Markdown drafts with [[citations]]
β”œβ”€β”€ data/                  ← CSV data files
└── results/               ← Figures, .docx exports

✨ Key Features

Literature & References

  • PubMed + Europe PMC + CORE search (37 search tools)
  • PICO parsing for clinical questions
  • MCP-to-MCP verified data β€” PMID sent directly, no agent hallucination
  • Layered trust: πŸ”’ VERIFIED (PubMed) Β· πŸ€– AGENT (AI notes) Β· ✏️ USER (your notes)
  • Foam wikilinks: [[author2024_12345678]] with hover preview & backlinks

Writing & Editing

  • AI draft generation per section (Introduction, Methods, Results, Discussion)
  • Citation-Aware Editing β€” patch_draft validates all [[wikilinks]] before saving
  • Auto-fix citation format β€” [[12345678]] β†’ [[author2024_12345678]]
  • Novelty validation β€” 3-round independent scoring (threshold: 75/100)
  • Anti-AI writing rules β€” Evidence funnel structure, no clichΓ©s

Data Analysis

  • CSV dataset analysis with descriptive statistics
  • Statistical tests (t-test, ANOVA, chiΒ², correlation, Mann-Whitney, Fisher's)
  • Table 1 generator β€” Baseline characteristics with automatic variable detection
  • Publication-ready figures (matplotlib/seaborn)

Export & Submission

  • Word export with journal template support
  • Cover letter + highlights generation
  • Manuscript consistency checker
  • Reviewer response generator (point-by-point format)
  • Submission checklist (word count, figure format, etc.)

Infrastructure

  • DDD Architecture (Domain-Driven Design) with clean layer separation
  • 15 pre-commit hooks (ruff, mypy, bandit, pytest, prettier, doc-update...)
  • Workspace State recovery for cross-session continuity
  • uv for all Python package management
  • MCP SDK features in active use β€” tools, elicitation, and progress notifications for long-running audit/review operations

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                          πŸ‘€ User Layer                                    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚   VS Code        β”‚    β”‚  Foam Extension               β”‚  β”‚Dashboard β”‚  β”‚
β”‚  β”‚   Editor         β”‚    β”‚  [[wikilinks]] autocomplete    β”‚  β”‚(Next.js) β”‚  β”‚
β”‚  β”‚                  β”‚    β”‚  hover preview Β· backlinks     β”‚  β”‚          β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    β”‚
                                    β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚               πŸ€– Copilot Agent (Orchestrator)                             β”‚
β”‚      26 Skills + 15 Prompt Workflows + Agent Customization               β”‚
β”‚   /mdpaper.search β†’ /mdpaper.concept β†’ /mdpaper.draft β†’ export          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚                  β”‚                  β”‚                  β”‚
        β–Ό                  β–Ό                  β–Ό                  β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ πŸ“ mdpaper    β”‚  β”‚πŸ” pubmed-     β”‚  β”‚πŸ’‘ cgu         β”‚  β”‚πŸ”Œ External    β”‚
β”‚  88 tools     β”‚  β”‚  search       β”‚  β”‚  13 tools     β”‚  β”‚   MCPs (uvx)  β”‚
β”‚               β”‚  β”‚  37 tools     β”‚  β”‚               β”‚  β”‚               β”‚
β”‚ β€’ projects    β”‚  β”‚ β€’ PubMed      β”‚  β”‚ β€’ brainstorm  β”‚  β”‚ 🎨 drawio     β”‚
β”‚ β€’ references  β”‚  β”‚ β€’ Europe PMC  β”‚  β”‚ β€’ deep_think  β”‚  β”‚ β€’ diagrams    β”‚
β”‚ β€’ drafts      β”‚  β”‚ β€’ CORE        β”‚  β”‚ β€’ spark       β”‚  β”‚               β”‚
β”‚ β€’ validation  β”‚  β”‚ β€’ PICO        β”‚  β”‚ β€’ methods     β”‚  β”‚ πŸ“– zotero     β”‚
β”‚ β€’ analysis    β”‚  β”‚ β€’ Gene/Chem   β”‚  β”‚               β”‚  β”‚ β€’ import refs β”‚
β”‚ β€’ export      β”‚  β”‚ β€’ Session     β”‚  β”‚               β”‚  β”‚               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚
        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                          πŸ’Ύ Local Storage                                 β”‚
β”‚  projects/{slug}/                                                        β”‚
β”‚  β”œβ”€β”€ concept.md          ← Research concept with πŸ”’ protected sections   β”‚
β”‚  β”œβ”€β”€ references/{pmid}/  ← Foam-compatible .md + metadata.json           β”‚
β”‚  β”œβ”€β”€ drafts/             ← Markdown drafts with [[citations]]            β”‚
β”‚  β”œβ”€β”€ data/               ← CSV data files                                β”‚
β”‚  └── results/            ← Figures, .docx exports                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

MCP-to-MCP Direct Communication

When saving references, data flows directly between MCP servers β€” the Agent only passes a PMID, never full metadata:

Agent: "save PMID:24891204"
     β”‚
     β–Ό
mdpaper.save_reference_mcp(pmid="24891204")
     β”‚  Direct HTTP call (not through Agent)
     β–Ό
pubmed-search: GET /api/cached_article/24891204
     β”‚  Returns verified PubMed data
     β–Ό
Saved with layered trust:
  πŸ”’ VERIFIED: PubMed data (immutable)
  πŸ€– AGENT:    AI notes (marked source)
  ✏️ USER:     Your notes (editable)

πŸ› οΈ mdpaper MCP Tools

88 active tools organized into 7 groups, plus 3 MCP prompts and 3 MCP resources for official MCP clients.

πŸ“ Project Management (17 tools)

Projects, exploration mode, workspace state recovery, diagram management.

Key Tools Description
create_project / switch_project / delete_project Project lifecycle
start_exploration / convert_exploration_to_project Explore-first workflow
get_workspace_state / sync_workspace_state Cross-session recovery
save_diagram / list_diagrams Draw.io integration
setup_project_interactive Interactive paper type configuration
update_authors Manage structured author metadata

πŸ“š Reference Management (12 tools)

Save, search, format, and manage references with Foam integration.

Key Tools Description
save_reference_mcp Recommended β€” Save by PMID via MCP-to-MCP (verified data)
list_saved_references / search_local_references Browse & search library
format_references / set_citation_style Vancouver / APA / Nature
sync_references Sync [[wikilinks]] to numbered references

✍️ Draft & Editing (13 tools)

Write, edit, cite β€” with built-in validation.

Key Tools Description
draft_section / write_draft Create and write sections
list_drafts / read_draft / delete_draft Draft lifecycle
get_available_citations List all valid [[citation_key]] before editing
patch_draft Citation-aware partial edit with wikilink validation
insert_citation / suggest_citations Smart citation insertion
scan_draft_citations / sync_references Citation management
count_words Section and manuscript word-count checks

βœ… Validation (3 tools)

Tool Description
validate_concept Full novelty scoring against the active concept
validate_wikilinks Auto-fix [[12345678]] β†’ [[author2024_12345678]]
compare_with_literature Compare the current idea against saved references

πŸ“Š Data Analysis (10 tools)

Tool Description
analyze_dataset Descriptive statistics for CSV
run_statistical_test t-test, ANOVA, chiΒ², correlation, etc.
generate_table_one Baseline characteristics with auto variable detection
create_plot Publication-ready figures
insert_figure Insert figure into draft with archive validation
insert_table Insert table into draft with archive validation
list_assets List figures and tables in project results

πŸ” Review & Audit (23 tools)

Category Key Tools
Pipeline Gates validate_phase_gate, pipeline_heartbeat, validate_project_structure
Review Loop start_review_round, submit_review_round, request_section_rewrite
Pipeline Control pause_pipeline, resume_pipeline, approve_section
Audit & Hooks run_quality_audit, run_writing_hooks, record_hook_event
Self-Evolution run_meta_learning, verify_evolution, apply_pending_evolutions
Domain Constraints check_domain_constraints, evolve_constraint
Data & Health validate_data_artifacts, diagnose_tool_health, check_formatting

πŸ“„ Export & Submission (10 tools)

Category Key Tools
Word Export export_word, list_templates, start_document_session, verify_document
Pandoc Export export_docx, export_pdf, preview_citations, build_bibliography
Submission generate_cover_letter, generate_highlights

🧩 MCP Prompts & Resources

Capability Names / URIs Purpose
Prompts project_bootstrap, draft_section_plan, word_export_checklist Materialize guided prompt workflows through the official MCP prompt API
Resources medpaper://workspace/state, medpaper://workspace/projects, medpaper://templates/catalog Surface live workspace state, project lists, and template metadata via MCP resources

πŸ” pubmed-search MCP Tools (37 tools)

Category Key Tools
Search search_literature, generate_search_queries, parse_pico
Databases PubMed, Europe PMC (fulltext + text mining), CORE (200M+ open access)
Gene/Chem search_gene, get_gene_details, search_compound, search_clinvar
Exploration find_related_articles, find_citing_articles, get_article_references
Export prepare_export (RIS/BibTeX/CSV), get_citation_metrics (iCite RCR)
Session get_session_pmids, list_search_history (survives AI memory limits)

πŸ’‘ CGU Creative Tools (13 tools)

Category Key Tools
Ideation generate_ideas, spark_collision, spark_collision_deep
Analysis deep_think, multi_agent_brainstorm
Methods list_methods, select_method, apply_method

CGU runtime notes:

  • In the repository workflow, CGU is started from the pinned submodule with uv run --directory integrations/cgu python -m cgu.server.
  • In the VSX workflow, MedPaper registers CGU when bundled code or the workspace submodule is available; otherwise CGU is simply skipped.
  • CGU itself supports Python >=3.11, but this repository currently requires Python >=3.12, so cross-platform repo setup should be treated as Python 3.12 baseline on macOS, Linux, and Windows.
  • The default repo MCP example uses CGU_THINKING_ENGINE=simple, which is the low-friction mode. Advanced LLM-backed modes still depend on CGU-side model/provider configuration.

πŸ”— Foam Integration

Feature How to Use Benefit
Wikilinks [[greer2017_27345583]] Link references in drafts
Hover Preview Mouse over any [[link]] See abstract without opening file
Backlinks Panel Open reference file See which drafts cite this paper
Graph View Ctrl+Shift+P β†’ Foam: Show Graph Visualize paper connections
Project Isolation Auto-switches on switch_project Only see current project's references

Citation Autocomplete

Type [[ in any draft to trigger the autocomplete menu:

According to previous studies [[    ← Type [[ here
                              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                              β”‚ πŸ” greer2017_27345583       β”‚
                              β”‚    smith2020_12345678       β”‚
                              β”‚    chen2019_87654321        β”‚
                              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Search by author ([[greer), year ([[2017), PMID ([[27345583), or keyword ([[sedation).


πŸ“š Reference File Structure

References are stored with Foam-optimized, layered-trust structure:

references/{pmid}/
β”œβ”€β”€ {citation_key}.md   ← YAML frontmatter + abstract (human-readable)
└── metadata.json       ← Full metadata (programmatic access)
---
# πŸ”’ VERIFIED (from PubMed, immutable)
title: "Complications of airway management"
author:
  - { family: Pacheco-Lopez, given: Paulette C }
year: 2014
journal: Respiratory Care
pmid: "24891204"
_source:
  mcp: pubmed-search
  verified: true

# πŸ€– AGENT (AI-generated, marked)
_agent:
  notes: "Key review on airway complications"
  relevance: high

# Foam
aliases: [pachecolopez2014, "PMID:24891204"]
tags: [reference, airway, review]
---

πŸ“‚ Project Structure

med-paper-assistant/
β”œβ”€β”€ src/med_paper_assistant/       # Core MCP server (DDD architecture)
β”‚   β”œβ”€β”€ domain/                    #   Business logic, entities, value objects
β”‚   β”œβ”€β”€ application/               #   Use cases, services
β”‚   β”œβ”€β”€ infrastructure/            #   DAL, external services
β”‚   └── interfaces/mcp/            #   MCP server, 88 tools + 3 prompts + 3 resources
β”‚
β”œβ”€β”€ integrations/                  # Bundled MCP servers
β”‚   β”œβ”€β”€ pubmed-search-mcp/         #   PubMed/PMC/CORE search (37 tools)
β”‚   └── cgu/                       #   Creative generation (13 tools)
β”‚
β”œβ”€β”€ vscode-extension/              # VS Code Extension
β”‚   β”œβ”€β”€ src/                       #   Extension source
β”‚   β”œβ”€β”€ skills/                    #   Agent skill definitions
β”‚   └── prompts/                   #   Quick-action prompts
β”‚
β”œβ”€β”€ dashboard/                     # Next.js project management UI
β”‚   └── src/
β”‚
β”œβ”€β”€ projects/                      # Research projects (isolated workspaces)
β”‚   └── {slug}/
β”‚       β”œβ”€β”€ .memory/               #   Cross-session AI memory
β”‚       β”œβ”€β”€ concept.md             #   Research concept
β”‚       β”œβ”€β”€ references/            #   Local reference library
β”‚       β”œβ”€β”€ drafts/                #   Markdown drafts
β”‚       └── results/               #   Figures, exports
β”‚
β”œβ”€β”€ .claude/skills/                # 26 Agent skill definitions
β”œβ”€β”€ .github/prompts/               # 15 Prompt workflow files
β”œβ”€β”€ templates/                     # Journal Word templates
β”œβ”€β”€ memory-bank/                   # Global project memory
└── tests/                         # pytest test suite

πŸ—ΊοΈ Roadmap

Status Feature Description
βœ… 3 MCP Servers mdpaper (88) + pubmed-search (37) + CGU (13)
βœ… Foam Integration Wikilinks, hover preview, backlinks, project isolation
βœ… Project Memory .memory/ for cross-session AI context
βœ… Table 1 Generator Auto-generate baseline characteristics
βœ… Novelty Validation 3-round scoring with 75/100 threshold
βœ… Citation-Aware Editing patch_draft with wikilink validation
βœ… MCP-to-MCP Trust Verified PubMed data via direct HTTP
βœ… Pre-commit Hooks 15 hooks (ruff, mypy, bandit, pytest, prettier...)
πŸ”œ Full VSX Extension TreeView, CodeLens, Diagnostics (Direction C)
πŸ”œ Pandoc Export Word + LaTeX dual export with CSL citations
πŸ“‹ Systematic Review PRISMA flow, Risk of Bias, meta-analysis
πŸ“‹ AI Writing Intelligence Citation intelligence, coherence engine
πŸ“‹ REST API Mode Expose tools as REST API

Architecture Direction: Direction C β€” Full VSX + Foam + Pandoc

Legend: βœ… Complete | πŸ”œ In Progress | πŸ“‹ Planned


🀝 Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

  • πŸ› Report bugs β€” Open an issue
  • πŸ’‘ Suggest features β€” Share your ideas
  • πŸ”§ Submit code β€” Fork β†’ Branch β†’ PR

οΏ½ Citation

If you use Medical Paper Assistant in your research, please cite our paper:

@article{medpaper2025,
  title   = {MedPaper Assistant: A Self-Evolving, MCP-Based Framework for
             AI-Assisted Medical Paper Writing with Closed-Loop Quality Assurance},
  author  = {[Authors]},
  year    = {2025},
  note    = {Submitted to medRxiv},
  url     = {https://github.com/u9401066/med-paper-assistant}
}

Note: This paper was produced entirely by the MedPaper Assistant's autonomous pipeline as a self-referential demonstration. The manuscript, audit trail, and all quality metrics are available in projects/self-evolving-ai-paper-writing-framework/. The preprint is being submitted to medRxiv β€” this section will be updated with the DOI once available.


οΏ½πŸ“„ License

Apache License 2.0 β€” See LICENSE

Reviews (0)

No results found