MCP Server -- Read Papers in the local Specified Directory

by sirix-v

208 downloads
Not rated
GitHub

About

It is an MCP server that exposes PDF files stored in a user-specified local directory through MCP tools. It is built in Go and designed to be used with MCP-compatible clients such as Cursor, allowing them to list and read papers from a given folder.

Details

Author
sirix-v
Downloads
208
Categories
Other

- Compiled from Go source code to a single binary.
- Serves PDF files from a local directory specified via -pdfdir.
- Provides MCP tools find_pdf and read_pdf.
- Communicates over HTTP SSE at http://127.0.0.1:8080/sse.
- Easy integration with Cursor’s MCP server settings.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Server -- Read Papers in the local Specified Directory
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Compile the source code with go build -o pdf-mcp-server main.go, then add the binary’s path to your environment variable (e.g., on macOS, update PATH in .zshrc). Start the server with pdf-mcp-server -pdfdir=your_paper_directory (e.g., -pdfdir=/Users/sirix/lunwen). In Cursor, configure the MCP server with URL http://127.0.0.1:8080/sse and set Cursor rules to call the find_pdf and read_pdf tools.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp server -- read papers in the local specified directory": {
            "pdf-mcp-server": {
                "url": "http://127.0.0.1:8080/sse"
            }
        }
    }
}

McpServers

{
    "pdf-mcp-server": {
        "url": "http://127.0.0.1:8080/sse"
    }
}

MCP Server -- Read Papers in the local Specified Directory

中文文档

Compile

go build -o pdf-mcp-server main.go

Installation

Add the path where the pdf-mcp-server binary is located to your environment variable.

Take macOS as an example:

export PATH=$PATH:/your/path/pdf-mcp-server
source ~/.zshrc

Start the MCP Server

pdf-mcp-server -pdfdir=your_paper_directory
For example: pdf-mcp-server -pdfdir=/Users/sirix/lunwen

Cursor Settings

{
  "mcpServers": {
    "pdf-mcp-server": {
      "url": "http://127.0.0.1:8080/sse"
    }
  }
}

Set Cursor Rules

Example:
When handling PDF-related requests, call the find_pdf tool of the mcp server named "pdf-mcp-server" to list all papers in the /Users/sirix/lunwen directory, search for the paper with the corresponding file name in this directory, and use the read_pdf tool of the pdf-mcp-server to read it.
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.