MCP File Assistant
MCP server that allows AI agents to read, search, summarize, and answer questions about local PDF, DOCX, XLSX, and TXT files through five tools.
README
AI File Assistant
A document intelligence system that enables AI agents and users to read, search, summarize, and answer questions over local PDF, DOCX, XLSX, and TXT documents.
The project exposes the same core engine through:
- MCP Server for Claude Desktop and other MCP-compatible clients
- Flask Web Application for browser-based interaction
Features
- Read PDF, DOCX, XLSX and TXT documents
- Search keywords across multiple documents
- AI-powered document summarization
- Retrieval-Augmented Document Q&A
- Upload and manage files
- Delete individual or all documents
- Secure file access with path validation
- Claude Desktop MCP integration
Tech Stack
| Category | Technologies |
|---|---|
| Backend | Python, Flask |
| MCP | Model Context Protocol (MCP) |
| AI | Groq Llama / Ollama |
| Document Parsing | PyMuPDF, python-docx, pandas, openpyxl |
| Frontend | HTML, CSS, JavaScript |
| Testing | Pytest |
Architecture
Claude Desktop
│
▼
MCP Server
│
┌──────────────┴──────────────┐
│ │
Shared Core Engine Flask Web App
│
├── File Readers
├── Search Engine
├── Document Processor
└── LLM Client
📸 Screenshots
🖥️ User Interface
Modern web interface for uploading, browsing, and managing supported documents.
<img width="1600" height="884" alt="image" src="https://github.com/user-attachments/assets/1b59456b-2224-430a-8f61-52e47a47d1e7" />
🔗 MCP Server Connected
Claude Desktop successfully connected to the local MCP File Assistant server.
<img width="1600" height="1135" alt="image" src="https://github.com/user-attachments/assets/181a46ee-2609-486e-8e10-c78f686f3a01" />
📄 Read Document
Read PDF, DOCX, XLSX, and TXT documents directly through Claude Desktop using MCP.
<img width="1600" height="935" alt="image" src="https://github.com/user-attachments/assets/6c638b40-4417-4385-989f-2d1485b07ad3" /> <img width="1600" height="936" alt="image" src="https://github.com/user-attachments/assets/adf11f2e-5bba-4b0b-b0f6-3e75a5458552" />
📝 AI Document Summarization
Generate concise AI-powered summaries of lengthy documents using Groq Llama.
<img width="1600" height="920" alt="image" src="https://github.com/user-attachments/assets/a973326b-e272-4d58-b116-c769aeb66af4" />
🔍 Keyword Search
Search keywords across every indexed document with ranked search results.
<img width="1600" height="940" alt="image" src="https://github.com/user-attachments/assets/a6b0323c-4352-46af-95ca-24fd5fa474c6" />
❓ Document Question Answering
Ask natural language questions grounded in document contents using Retrieval-Augmented Generation (RAG).
<img width="1600" height="591" alt="image" src="https://github.com/user-attachments/assets/37fb0755-a70c-4785-b519-5e5c1cc4f8d7" />
🗑️ File Management
Delete individual files or remove all uploaded documents directly from the application.
<img width="1600" height="897" alt="image" src="https://github.com/user-attachments/assets/91548827-f15e-4142-acc0-2ce10f99c229" />
Claude Desktop MCP Integration
Claude Desktop successfully invokes custom MCP tools including Read, Search, Summarize, and Ask Document.
<img width="1600" height="941" alt="image" src="https://github.com/user-attachments/assets/07e29083-a482-4d10-bc97-a623a285a717" />
📁 Project Structure
mcp-file-assistant/
│
├── app.py
├── server.py
├── config.py
├── file_readers.py
├── search_engine.py
├── document_processor.py
├── llm_client.py
├── templates/
├── static/
├── tests/
├── sample_documents/
├── requirements.txt
└── README.md
🚀 Installation
git clone <repository-url>
cd mcp-file-assistant
pip install -r requirements.txt
python app.py
Open:
http://127.0.0.1:5000
To start the MCP server:
python server.py
Configure Claude Desktop with the provided MCP configuration and restart the application.
🔧 MCP Tools
- Read Document
- Search Documents
- Summarize Document
- Ask Document
- List Files
- Delete File
- Delete All Files
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。