Navigation
PDF Search for Zed: Seamless MCP Integration, Instant PDF Snippets - MCP Implementation

PDF Search for Zed: Seamless MCP Integration, Instant PDF Snippets

PDF Search for Zed: Seamlessly integrates with MCP servers to pull precise PDF snippets in seconds, saving you time sifting through endless pages.

Research And Data
4.3(72 reviews)
108 saves
50 comments

This tool saved users approximately 5582 hours last month!

About PDF Search for Zed

What is PDF Search for Zed: Seamless MCP Integration, Instant PDF Snippets?

PDF Search for Zed is a document search extension that enables semantic PDF analysis directly within Zed's development environment. It integrates with Zed's AI Assistant to provide instant access to relevant PDF content through a streamlined MCP (Modular Context Provider) interface. The tool allows users to query PDFs and retrieve contextual snippets without leaving the editor, enhancing productivity for developers and researchers working with technical documentation.

How to Use PDF Search for Zed: Seamless MCP Integration, Instant PDF Snippets?

  1. Clone the repository and configure the Python environment for the MCP server using uv.
  2. Build the search database by specifying PDF files or directories, which are automatically chunked and processed.
  3. Configure Zed's context server settings with the extension path.
  4. Access the AI Assistant panel and trigger searches with /pdfsearch [query] to fetch relevant PDF excerpts.

PDF Search for Zed Features

Key Features of PDF Search for Zed: Seamless MCP Integration, Instant PDF Snippets?

  • Semantic search with automatic document chunking and embedding generation (currently via OpenAI).
  • Seamless integration with Zed's AI Assistant for real-time context injection.
  • Support for multiple PDFs and optional file format extensions (e.g., Markdown).
  • Self-contained vector store implementation already deployed.
  • Configurable indexing scope via command-line arguments for fine-grained control.

Use Cases of PDF Search for Zed: Seamless MCP Integration, Instant PDF Snippets?

Developers can leverage this tool to:

  • Quickly reference technical specifications within code editing workflows.
  • Automate legal document reviews by extracting clauses matching specific queries.
  • Build knowledge bases for troubleshooting by indexing error logs and manuals.
  • Accelerate research workflows by contextualizing academic papers during coding sessions.

PDF Search for Zed FAQ

FAQ from PDF Search for Zed: Seamless MCP Integration, Instant PDF Snippets?

Why does it require an OpenAI API key currently?
Embeddings are generated via OpenAI, but a self-contained alternative is under development based on community feedback.
Can I index multiple files at once?
Yes, the build command accepts multiple files/directories as input parameters.
What happens if I update a PDF after indexing?
You must re-run the build process to refresh the embeddings for changed content.
Is there a plan to reduce dependency on external services?
A self-hosted embedding solution is prioritized in upcoming releases to improve offline usability.

Content

PDF Search for Zed

A document search extension for Zed that lets you semantically search through a PDF document and use the results in Zed's AI Assistant.

Prerequisites

This extension currently requires:

  1. An OpenAI API key (to generate embeddings)
  2. uv installed on your system

Note: While the current setup requires an OpenAI API key for generating embeddings, we plan to implement a self-contained alternative in future versions. Community feedback will help prioritize these improvements.

Quick Start

  1. Clone the repository
git clone https://github.com/freespirit/pdfsearch-zed.git
  1. Set up the Python environment for the MCP server:
cd pdfsearch-zed/pdf_rag
uv venv
uv sync
  1. Install Dev Extension in Zed

  2. Build the search db

cd /path/to/pdfsearch-zed/pdf_rag

echo "OPENAI_API_KEY=sk-..." > src/pdf_rag/.env

# This may take a couple of minutes, depending on the documents' size
# You can provide multiple files and directories as arguments.
#  - files would be chunked.
#  - a directory would be considered as if its files contains chunks.
#    E.g. they won't be further split.
uv run src/pdf_rag/rag.py build "file1.pdf" "dir1" "file2.md" ...
  1. Configure Zed
"context_servers": {
    "pdfsearch-context-server": {
        "settings": {
            "extension_path": "/path/to/pdfsearch-zed"
        }
    }
}

Usage

  1. Open Zed's AI Assistant panel
  2. Type /pdfsearch followed by your search query
  3. The extension will search the PDF and add relevant sections to the AI Assistant's context

Future Improvements

  • Self-contained vector store
  • Self-contained embeddings
  • Automated index building on first run
  • Configurable result size
  • Support for multiple PDFs
  • Optional: Additional file formats beyond PDF

Project Structure

  • pdf_rag/: Python-based MCP server implementation
  • src/: Zed extension code
  • extension.toml and Cargo.toml: Zed extension configuration files

Known Limitations

  • Manual index building is required before first use
  • Requires external services (OpenAI)

Related MCP Servers & Clients