KnowledgeBaseMCP

by mehmetozcan-zz

Not rated
GitHub

About

Extract text content from local PDF, DOCX, and PPTX files to build a knowledge base.

Details

Author
mehmetozcan-zz
Categories
File Management, Other, Knowledge Base

Setup

Install KnowledgeBaseMCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/mehmetozcan-zz/KnowledgeBaseMCP

Follow the installation instructions in the repository README, then restart your MCP client.

A powerful Model Context Protocol (MCP) server for extracting text content from various document formats including PDF, DOCX, PPTX, and XLSX files. This tool enables AI assistants like Claude to read and analyze document contents from your local knowledge base, and also create new Excel spreadsheets.

- Multi-format support: Extract text from PDF, DOCX, PPTX, and XLSX files
- Directory processing: Process entire directories of documents
- Recursive scanning: Optionally scan subdirectories
- File metadata: Get detailed information about document files
- Error handling: Robust error handling with clear error messages
- Async processing: Efficient asynchronous document processing

- XLSX workbook creation: Create Excel files with multiple sheets
- DataFrame support: Convert pandas DataFrames to Excel
- Data formatting: Apply professional formatting and styling
- Report generation: Create structured reports with summaries
- Data appending: Add data to existing Excel files
- Template support: Use predefined templates for consistent formatting

- Easy integration: Simple setup with Claude Desktop
- MCP protocol: Built on the Model Context Protocol standard

- PDF(.pdf) - Portable Document Format (using pdfplumber)
- DOCX(.docx) - Microsoft Word documents
- PPTX(.pptx) - Microsoft PowerPoint presentations
- XLSX(.xlsx) - Microsoft Excel spreadsheets (using openpyxl and pandas)

- DOCX(.docx) - Create Word documents with formatting
- XLSX(.xlsx) - Create Excel workbooks with multiple sheets, formatting, and charts

- Python 3.8 or higher
- Claude Desktop application

git clone https://github.com/mehmetozcan-zz/KnowledgeBaseMCP.git cd KnowledgeBaseMCP

Add this server to your Claude Desktop configuration file:

Windows:%APPDATA%\\Claude\\claude_desktop_config.json
macOS:~/Library/Application Support/Claude/claude_desktop_config.json

{ "mcpServers": { "knowledgebase": { "command": "python", "args": ["path/to/KnowledgeBaseMCP/launch_mcp.py"] } } }

Replacepath/to/KnowledgeBaseMCPwith your actual installation path.

Once configured, you can use these tools in Claude:

Extract text content from a single document file.

- file_path(string): Path to the document file

Extract text content from all supported documents in a directory.

- directory_path(string): Path to the directory containing documents
- recursive(boolean, optional): Whether to search subdirectories recursively

List all supported document files in a directory with metadata.

- directory_path(string): Path to the directory to scan

Create a new Word document with text content.

- content(string): Document content
- file_path(string): Output file path (.docx extension)
- title(string, optional): Document title

Create a structured Word report with formatting.

- report_data(object): Report data structure
- file_path(string): Output file path (.docx extension)

Create a new Excel workbook with multiple sheets.

- data(object): Dictionary with sheet names as keys and data as values
- file_path(string): Output file path (.xlsx extension)
- apply_formatting(boolean, optional): Apply default formatting

Create Excel workbook from pandas DataFrames.

- dataframes(object): Dictionary with sheet names and DataFrame data
- file_path(string): Output file path (.xlsx extension)
- include_index(boolean, optional): Include DataFrame index

- file_path(string): Path to existing XLSX file
- sheet_name(string): Target sheet name
- data(any): Data to append (list, dict, or DataFrame)

Create a formatted Excel report with multiple sections.

- report_data(object): Report structure with title, description, and data sections
- file_path(string): Output file path (.xlsx extension)

Please analyze all the documents in my Documents/Reports folder using your KnowledgeBaseMCP tools.
Create an Excel report with sales data for Q1 2025. Include a summary sheet and detailed transaction data.
Read the data from 'financial_report.xlsx' and create a new Excel file with a summary analysis.
Extract content from all PDF files in my research folder and create a consolidated Excel workbook with the findings.

Claude will then use the MCP server to extract and analyze the content from your documents or create new Excel files as requested.

KnowledgeBaseMCP/ ├── src/ │ ├── __init__.py # Package initialization │ ├── main.py # Main MCP server │ ├── extractors.py # Document reading classes │ ├── docx_writer.py # Word document creation │ └── xlsx_writer.py # Excel spreadsheet creation ├── requirements.txt # Python dependencies ├── setup.py # Package setup ├── README.md # This file ├── LICENSE # MIT License ├── launch_mcp.py # Server launcher ├── run_server.py # Alternative launcher ├── test.py # Basic test script └── test_xlsx.py # XLSX functionality tests

To add support for additional document formats:
- Add the file extension toSUPPORTED_EXTENSIONSinextractors.py
- Install the required library
- Add the library check tocheck_dependencies()
- Implement the extraction method (e.g.,_extract_xlsx())
- Add the format handling toextract_from_file()
- Check Claude Desktop logs
- Ensure the server starts without errors:

python launch_mcp.py

- mcp>=0.9.0- Model Context Protocol framework

- python-docx>=1.1.0- For DOCX file processing
- pdfplumber>=0.9.0- For PDF file processing
- python-pptx>=0.6.23- For PPTX file processing
- openpyxl>=3.1.0- For XLSX file reading/writing
- pandas>=2.0.0- For advanced data manipulation and analysis

Contributions are welcome! Please feel free to submit pull requests or open issues.
- Fork the repository
- Create your feature branch (git checkout -b feature/AmazingFeature)
- Commit your changes (git commit -m 'Add some AmazingFeature')
- Push to the branch (git push origin feature/AmazingFeature)
- Open a Pull Request

This project is licensed under the MIT License - see theLICENSEfile for details.

- Built with theModel Context Protocol
- Uses
pdfplumberfor PDF processing
- Uses
python-docxfor Word documents
- Uses
python-pptxfor PowerPoint presentations

If you encounter any issues or have questions, please open an issue on GitHub.

Made with ❤️ for the Claude AI community

Provides an MCP interface for the LDIMS document management system.

An intelligent structured document management system designed for large language models.

Provides comprehensive access to an Obsidian vault, allowing AI agents to read, write, search, and manage notes via the Local REST API plugin.

Local-first MCP server that indexes folders, PDFs, code, and past AI conversations — and exposes them as a single grounded-search tool. Runs fully offline.

Manage notes and files in an Obsidian vault. Requires the Obsidian Local REST API plugin.

Interact with The Drive AI files directly from AI assistants like ChatGPT or Claude using the Model Context Protocol (MCP).

An MCP server for viewing, editing, and creating text files, based on the Claude built-in text editor tool.

A server for processing PDF files, allowing text and table extraction, metadata retrieval, and file listing within a specific directory.

A server providing comprehensive file system operations, automatically downloaded and built on first use.

A simple utility to combine multiple files into a single file.

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.