qdrant-financial-docs
Uses Google Gemini's multimodal embedding API to embed text chunks and images into a shared vector space, enabling semantic search across both text and charts in financial PDFs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@qdrant-financial-docs Compare NVIDIA's Q2 and Q3 gaming revenue from the charts"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Claude Financial Intelligence System
Equip Claude Desktop with custom tools to search both text and images in financial PDFs using multimodal embeddings, vector search, and the Model Context Protocol (MCP).
๐ฌ ยฟHablas espaรฑol? Join our Spanish-speaking Telegram community to discuss AI, ML, and data science projects!
The Problem: Traditional search systems only index text, missing 50%+ of information locked in charts, graphs, and visualizations.
The Solution: This system embeds both text chunks AND images into the same 3072-dimensional vector space using Google Gemini's multimodal embeddings, then exposes search tools to Claude Desktop via MCP.

๐ฏ Key Features
Multimodal Search: Query charts, graphs, and text using multimodal embeddings
Hybrid Search: Combine semantic similarity with metadata filtering
Custom Tools: 4 custom MCP tools for semantic search, filtering, comparisons, and discovery
Local Development: Runs entirely on your laptop via Dockerโno cloud required
Production Ready: Seamless migration to Qdrant Cloud when you need scale
Related MCP server: Enterprise Knowledge MCP Server
๐๏ธ Architecture
Ingestion Pipeline
Extract text AND images from PDFs, embed both modalities using Gemini API, and store in Qdrant with rich metadata (ticker, quarter, year, document type).

Query Flow
Hybrid search combines metadata filtering with semantic similarity to return multimodal results (text + charts).

๐ ๏ธ Tech Stack
Component | Technology | Purpose |
LLM Interface | Claude Desktop | Natural language queries via MCP |
Bridge | Model Context Protocol (MCP) | Exposes custom tools to Claude |
Tools | LangChain Community | Semantic search, filtering, comparisons |
Vector DB | Qdrant | Local/cloud vector storage |
Embeddings | Google Gemini Embeddings 2 | Multimodal embeddings (3072-dim, text + images) |
PDF Parsing | LangChain + PyPDF | Extract text + images from PDFs |
Package Manager | uv | Fast Python dependency management |
๐ Quick Start
Prerequisites
Docker (for Qdrant)
Python 3.10+
Claude Desktop
Google Gemini API key (free tier available)
1. Clone & Install
git clone <your-repo-url>
cd agent-tools-claude2. Set Up Environment
Copy the example environment file and fill in your API key:
cp .env.example .env
# Edit .env and add your GEMINI_API_KEY3. Start Qdrant
docker compose up -dQdrant will be available at http://localhost:6333 (Web UI at /dashboard)
4. Ingest Documents
# Install dependencies (using uv)
uv sync
# Ingest PDFs using Justfile
just ingest data/nvidia/
# Or ingest a single PDF
just ingest data/nvidia/NVDA-Q3-2025.pdfAlternatively, run the ingestion script directly:
uv python scripts/ingest_pdf.py data/nvidia/5. Configure Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"qdrant-financial-docs": {
"command": "/path/to/uv",
"args": [
"--directory",
"/path/to/agent-tools-claude",
"run",
"servers/mcp_server.py"
]
}
}
}6. Restart Claude Desktop
Quit Claude Desktop completely (โ+Q) and reopen. You should see the ๐ icon indicating MCP tools are connected.
7. Start Querying!
Try these queries in Claude Desktop:
"What was NVIDIA's Q3 2025 data center revenue?"
"Compare Q2 and Q3 gaming revenue"
"Show me all Q4 documents"
"What risks were mentioned in the earnings call?"
๐ Project Structure
agent-tools-claude/
โโโ servers/
โ โโโ mcp_server.py # MCP server implementation
โ โโโ tool_definitions.yaml # Declarative tool descriptions
โโโ src/
โ โโโ config.py # Configuration (loads .env)
โ โโโ models/
โ โ โโโ embedder.py # Gemini embedder wrapper
โ โโโ helpers/
โ โ โโโ logs.py # Logging utilities
โ โ โโโ qdrant_utils.py # Qdrant operations
โ โโโ tools/
โ โ โโโ qdrant_tools.py # LangChain tool definitions
โ โโโ scripts/
โ โโโ pdf_ingestion.py # Multimodal ingestion pipeline
โโโ scripts/
โ โโโ ingest_pdf.py # CLI for PDF ingestion
โ โโโ delete_collection.py # Utility to reset database
โโโ examples/
โ โโโ list_qdrant_tools.py # List all MCP tools
โ โโโ test_qdrant_tools.py # Test tools directly
โโโ data/ # Your PDF documents (gitignored)
โโโ docker-compose.yml # Qdrant local setup
โโโ pyproject.toml # Python dependencies
โโโ .env.example # Environment variable template
โโโ README.md # This file๐ง Configuration
Environment Variables
Variable | Description | Default |
| Google Gemini API key | Required |
| Qdrant instance URL |
|
| Qdrant Cloud API key (optional) | None |
| Collection name in Qdrant |
|
| Gemini embedding model |
|
| Vector dimensions |
|
PDF Metadata Extraction
The ingestion pipeline automatically extracts metadata from filenames:
Pattern: {TICKER}-{Quarter}-{Year}-{Type}.pdf
Examples:
NVDA-Q3-2025-Transcript.pdfโ ticker: NVDA, quarter: Q3, year: 2025AMD-Q4-2024-Presentation.pdfโ ticker: AMD, quarter: Q4, year: 2024
Metadata enables fast filtering: "Get all Q3 2025 documents" (20ms vs 500ms semantic search)
๐ก Usage Examples
CLI: Ingest Documents
# Single file
just ingest data/nvidia/NVDA-Q3-2025.pdf
# Entire folder (recursive)
just ingest data/nvidia/๐จ MCP Tools
The system exposes 4 custom tools to Claude Desktop:

1. search_documents
Purpose: Semantic search by meaning (not exact keywords)
Use Case: "What did Jensen say about AI chips?"
2. filter_by_metadata
Purpose: Fast retrieval of all documents matching filters
Use Case: "Get all Q3 2025 documents"
3. compare_quarters
Purpose: Cross-period trend analysis
Use Case: "Compare Q2 vs Q3 revenue"
4. get_available_data
Purpose: Discover available tickers, quarters, years
Use Case: "What data do you have?"
๐งช Development
Run MCP Server Directly
# Test the MCP server
uv run servers/mcp_server.pyTest Tools Without Claude
# List available tools
python examples/list_qdrant_tools.py
# Test semantic search
python examples/test_qdrant_tools.pyReset Database
# Delete collection and start fresh
just delete-collectionView Qdrant UI
Open http://localhost:6333/dashboard to:
Explore collections
View vector points
Test queries manually
๐ฎ Future Enhancements
Multi-Company Support: Ingest AMD, Intel, etc. for competitive analysis
REST API: Webhook endpoint for automatic ingestion
Audio Transcription: Add earnings call audio via Whisper
Multi-Language: Leverage Gemini's 100+ language support
Cloud Migration: Scale to Qdrant Cloud for millions of vectors
๐ค Contributing
Contributions welcome! This is a learning project showcasing:
Building custom Claude Desktop tools via MCP
Multimodal search implementation
Vector database optimization
Hybrid search strategies
๐ License
MIT License - see LICENSE file for details
๐ Resources
๐ฌ Join the Community
Interested in AI, machine learning, and data science? Join our community to learn and share:
๐ฌ Telegram Community (Spanish) - Discuss AI, ML, data science, and build cool projects together (Spanish-speaking community)
๐ผ LinkedIn - Let's connect and stay in touch
Found this project helpful? Give it a โญ on GitHub!
Available Tools
5 toolscompare_quartersA
Compare financial information across multiple quarters for trend analysis. Returns documents grouped by quarter so you can show side-by-side comparisons.
WHEN TO USE:
"Compare Q3 vs Q4 revenue"
"How did data center revenue change quarter over quarter?"
"Show me YoY comparison"
Any question with "compare", "vs", "versus", "difference between"
EXAMPLES:
"Compare NVIDIA Q3 and Q4 2025 AI chip revenue" โ Use this tool
"What's the trend in gaming revenue?" โ Use this tool
Inputs: year (required), ticker (required), quarters (required), query, +1 more.
filter_by_metadataA
Retrieve ALL documents for a complete quarter/year using metadata filters only. No semantic search - returns the entire dataset you need for comprehensive analysis.
โ ๏ธ CRITICAL: After calling this tool, you have everything needed. DO NOT call search_documents next. Just analyze what you received.
USE THIS FOR:
General summaries: "Summarize Q3 earnings" "Analyze Q2 performance"
Getting complete data: "Show me Q3 data" "Give me all Q4 documents"
Full quarter analysis where you need ALL information
NEVER USE THIS FOR:
Specific questions about one topic (use search_documents instead)
Finding particular information (use search_documents instead)
WORKFLOW:
Optional: Call get_available_data first to check document counts
Set appropriate limit (20-50 for complete data)
Call this tool to get all documents
Analyze/summarize the results yourself - STOP here, no more tool calls
EXAMPLES: โ "Summarize NVIDIA Q3 2025 earnings" โ ticker="NVDA", quarter="Q3", year="2025", limit=30 โ "Analyze Q2 performance" โ ticker="NVDA", quarter="Q2", year="2025", limit=30 โ "Show me all Q4 docs" โ ticker="NVDA", quarter="Q4", year="2025", limit=50 โ "What was Q3 revenue number?" โ Use search_documents (specific question) โ "What did Jensen say about AI?" โ Use search_documents (specific topic)
Inputs: year, limit, ticker, quarter.
get_available_dataA
USE THIS FIRST when user asks about data availability or when you're unsure if you have information. Discovers what tickers, quarters, and years are in the database.
โก RETURNS: Document counts by ticker/quarter/year - USE THESE COUNTS to choose intelligent limits!
SMART USAGE PATTERN:
Call this FIRST to see: "NVDA Q4 2026 has 67 documents"
Then call filter_by_metadata with appropriate limit (e.g., 15-20 for that query)
Avoids multiple calls with different limits!
WHEN TO USE:
"What data do you have?"
"Do you have Tesla earnings?" โ Check first!
"What quarters are available for NVIDIA?"
At the START of a conversation to know what you can answer
BEFORE calling filter_by_metadata - check counts first to choose smart limits!
BEFORE saying "I don't have that data" - always check here first!
CRITICAL: If user asks about a company/quarter, use this to verify data exists before searching.
Inputs: ticker.
get_collection_statsA
Get database statistics (total documents, collection health). Use for technical debugging or when user asks "how much data do you have?"
WHEN TO USE:
"How many documents are stored?"
"Is the database working?"
Technical troubleshooting
Inputs: no named parameters.
search_documentsA
Find specific information about ONE TOPIC using semantic vector search. Returns only the most relevant chunks matching your search query.
โ ๏ธ CRITICAL: If you already called filter_by_metadata, DO NOT use this tool. You already have all the data - just analyze what you received.
USE THIS FOR:
Specific questions: "What was Q3 revenue?" "What risks were mentioned?"
Topic-focused queries: "What did Jensen say about AI chips?"
Finding particular information within documents
NEVER USE THIS FOR:
General summaries: "Summarize Q3 earnings" (use filter_by_metadata ONLY)
After calling filter_by_metadata (you already have the data)
Getting all documents (use filter_by_metadata instead)
EXAMPLES: โ "What was NVIDIA's Q3 revenue number?" โ query="revenue", ticker="NVDA", quarter="Q3" โ "What did Jensen say about AI chips?" โ query="Jensen Huang AI chips" โ "What risks were mentioned in Q2?" โ query="risks", quarter="Q2" โ "Summarize Q3 earnings" โ Use filter_by_metadata ONLY, not this tool โ "Show me Q3 data" โ Use filter_by_metadata ONLY, not this tool
Inputs: query (required), year, limit, ticker, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 5 tools
The descriptions work hard to separate search_documents (specific topic) from filter_by_metadata (whole-quarter summaries), but compare_quarters is essentially filter_by_metadata run across multiple quarters, so the boundary is thin. Similarly, get_collection_stats and get_available_data both answer 'how much data do you have?' using document counts, differentiated only by 'technical debugging' vs. 'discovery' framing. The explicit WHEN/NEVER guidance helps, but several tool pairs still tempt misselection.
All five tools use snake_case verb-first names (get_collection_stats, search_documents, filter_by_metadata, compare_quarters, get_available_data). The verb choice reflects the action (get/search/filter/compare) and the noun reflects the target resource, making the set highly predictable.
Five tools is a tight, well-scoped set for a read-only financial document QA server, and each one has an identifiable role. However, compare_quarters is arguably an aggregate variant of filter_by_metadata, so one tool is somewhat redundant, leaving the set a touch thin on genuinely distinct operations.
The read-only surface covers discovery (get_available_data, get_collection_stats), targeted retrieval (search_documents), full retrieval (filter_by_metadata), and trend analysis (compare_quarters) โ a coherent lifecycle for document QA. Minor gaps exist, such as fetching a single document by ID or listing distinct tickers without counts, but agents can work around these.
Maintenance
Related MCP Connectors
Your investing research inside Claude: watchlists, financial ratios, reverse-DCF valuations, investment theses, notes, portfolio, earnings calendar and news for the companies you follow. 70 read and write tools; ask what's on your morning desk, rank a watchlist by ROE, log a trade or save a thesis. OAuth sign-in. Free to start.
Primary-source SEC filing intelligence and financial/disclosure reconciliation for AI agents.
Interactive data visualization and executive PDF dashboards for ChatGPT, Claude, and Cursor.
SEC-filed company financials with filing citations, plus market data, for AI agents
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude Desktop to search and query personal document collections (PDF, Word, Markdown, text) using semantic search and conversational AI with full context preservation across exchanges.MIT
- AlicenseNot gradedqualityDmaintenanceEnables querying enterprise documents (DOCX, PDF, PPTX) using natural language, with hybrid search and MCP integration for Claude Desktop and other agents.MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude Desktop to perform local-first semantic search, ingest documents, and manage a private knowledge base with hybrid search, PII redaction, and multi-format support.1MIT
- -licenseNot gradedqualityNot gradedmaintenanceTurn SEC EDGAR filings into a searchable vector database, enabling natural language queries over company filings through Claude Desktop.-