Skip to main content
Glama
NCCN Guidelines MCP Server

NCCN Guidelines MCP Server

by gscfwid

πŸ₯ NCCN Guidelines MCP Server

Python MCP License Version

PyPDF HTTPX NCCN

A Model Context Protocol (MCP) server that provides access to NCCN (National Comprehensive Cancer Network) clinical guidelines.

πŸ”¬ How It Works

This project follows a systematic approach to provide accurate medical guidance:

  1. 🧠 Problem Analysis: Understands the clinical question or scenario

  2. πŸ“‹ Guidelines Retrieval: Searches the NCCN index for relevant guidelines

  3. πŸ“„ Page-by-Page Reading: Downloads and extracts specific pages from guidelines

  4. 🎯 Evidence-Based Response: Provides answers based on the extracted content

πŸ’‘ Note: This system does not use RAG (Retrieval-Augmented Generation) to ensure accuracy. Instead, it reads guidelines directly, which may result in longer response times during index initialization and PDF downloading/reading, but provides more reliable and precise medical guidance.

Related MCP server: Mutation Clinical Trial Matching MCP

✨ Features

  • πŸ“š Guidelines Index: Automatically fetches and maintains an up-to-date index of NCCN guidelines

  • ⬇️ PDF Download: Downloads NCCN guideline PDFs with authentication support

  • πŸ“ Content Extraction: Extracts specific pages from PDF documents with layout preservation

  • πŸš€ Smart Caching: Index is cached for 7 days to minimize server load

πŸ› οΈ Installation

  1. Clone the repository:

git clone https://github.com/gscfwid/NCCN_guidelines_MCP
cd NCCN_guidelines_MCP
  1. Install dependencies using uv:

uv sync

βš™οΈ Configuration

πŸ”§ Configure Client (Note: Supports only agents, such as Cursor, Cline, Claude desktop, etc.)

⚠️ Important: Claude desktop may warn about insufficient context length when running this MCP.

Add this to your Client configuration:

Configuration with Environment Variables

{
  "mcpServers": {
    "nccn-guidelines": {
      "command": "uv",
      "args": ["--directory", "<abslute_direction_of_NCCN_guidelines_MCP>", "run", "server.py"],
      "env": {
        "NCCN_USERNAME": "<your_nccn_username>",
        "NCCN_PASSWORD": "<your_nccn_password>"
      }
    }
  }
}

⚠️ Important Notes

  • πŸ‘€ NCCN Account Registration: Please note that the NCCN username and password mentioned above must be registered on the official NCCN website.

  • πŸš€ First-time Setup: When you first start the MCP server, it needs to generate the YAML index of NCCN guidelines. This process takes 1-2 minutes, so please wait before attempting to use the server.

  • ⏱️ Response Times: Due to the non-RAG approach for accuracy, expect longer response times during guideline downloading and PDF reading processes.

πŸ’¬ Prompts

To have better response, please add the prompt in the file of prompt.md to the instruction of your Agent Client before your Question.

πŸ› οΈ Available Tools

  1. πŸ“Š get_index: Get the raw contents of the NCCN guidelines index YAML file.

  2. πŸ“₯ download_pdf: Download NCCN guideline PDFs

    • url: PDF URL to download

    • filename (optional): Custom filename

    • username (optional): NCCN login username (defaults to NCCN_USERNAME env var)

    • password (optional): NCCN login password (defaults to NCCN_PASSWORD env var)

  3. πŸ“– extract_content: Extract content from PDF pages

    • pdf_path: Path to PDF file

    • pages (optional): Comma-separated page numbers (e.g., "1,3,5-7")

πŸ’‘ Usage Example

Here are some example questions you can ask:

  1. πŸ”¬ What are the available first-line immunotherapy options for ES-SCLC?

  2. 🎯 What is the initial chemotherapy for triple-negative breast cancer?

  3. 🧬 What are the immunotherapy options for neuroendocrine tumors?

Available Tools

3 tools
download_pdfB
Download a PDF file from the specified URL, with optional NCCN login credentials.

Args:
    url: The URL of the PDF file to download
    filename: Optional custom filename for the downloaded file
    username: Optional NCCN username/email for authentication (defaults to NCCN_USERNAME env var)
    password: Optional NCCN password for authentication (defaults to NCCN_PASSWORD env var)

Returns:
    String indicating success/failure and the path to the downloaded file

Inputs: url (required). Returns: result

extract_contentA
Extract content from specific pages of a PDF file.

Args:
    pdf_path: Path to the PDF file (relative to the downloads directory or absolute path)
    pages: Comma-separated page numbers to extract (e.g., "1,3,5-7"). 
           If not specified, extracts all pages. Supports negative indexing (-1 for last page).

Returns:
    Extracted text content from the specified pages

Inputs: pdf_path (required), pages. Returns: result

get_indexA
Get the raw contents of the NCCN guidelines index YAML file.

Returns:
    String containing the raw YAML content of the guidelines index

Inputs: no named parameters. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: download_pdf handles file retrieval, extract_content processes PDF pages for text, and get_index fetches metadata. The descriptions clearly differentiate these operations, eliminating any potential for misselection.

    Naming Consistency5/5

    All three tools follow a consistent verb_noun pattern (download_pdf, extract_content, get_index) with clear, descriptive names. There are no deviations in style or convention, making the set predictable and easy to understand.

    Tool Count3/5

    With only 3 tools, the set feels thin for a guidelines server, potentially lacking operations like search, filtering, or guideline-specific queries. While the tools cover basic PDF handling and index access, the scope suggests more could be needed for comprehensive agent workflows.

    Completeness3/5

    The tools provide core PDF download and content extraction, plus index access, but there are notable gaps for a guidelines domain: no tools to search, list, or retrieve specific guidelines by criteria, and no update or management functions. This limits agent capabilities beyond basic file operations.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers