Skip to main content

A FastMCP server for file vectorization and similarity search

Project description

files-vector-mcp

Note: This project is entirely generated by coze

A FastMCP server for file vectorization and similarity search with automatic directory monitoring.

Features

  • 🔍 Auto-monitor directories and process new/changed files
  • 📄 Support multiple file types (Markdown, PDF, DOCX, PPTX, images)
  • 🧩 Intelligent chunking with overlap for long documents
  • 🚀 Fast vector search with PostgreSQL+pgvector
  • ⚡ UVX-compatible entry point for quick startup

Installation

With pip

pip install files-vector-mcp-server

With uvx (recommended)

uvx files-vector-mcp-server

Configuration

Environment

# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key
OPENAI_API_URL=https://api.openai.com/v1
EMBEDDING_MODEL=text-embedding-ada-002
EMBEDDING_DIM=1536

# Database Configuration
DB_CONNECTION_STRING=postgres://user:password@localhost:5432/vector_db

# Monitoring Configuration
WATCH_TOPICS={"docs": ["./docs"], "notes": ["./notes"]}

# Optional MinerU API (for advanced OCR and document processing)(Optional & Untested)
MINERU_API_KEY=your_mineru_key
MINERU_API_URL=https://mineru.net/api/v4

# Chunk Configuration
CHUNK_SIZE=4000
CHUNK_OVERLAP=200

Usage

Basic Usage

files-vector-mcp

With Custom Config

files-vector-mcp --config path/to/your/config.toml

File Type Support

File Type Handling Method Requirements
Markdown (.md) Direct text extraction -
PDF MinerU API or PyPDF2 MinerU API or PyPDF2
DOCX python-docx python-docx
PPTX python-pptx python-pptx
Images MinerU OCR MinerU API
Text (.txt) Direct text extraction -

Project Structure

src/files-vector-mcp-server/
├── __init__.py
├── __main__.py       # Entry point
├── main.py           # Main application
├── config/           # Configuration
├── services/         # Business logic
└── utils/            # Helper functions

Development

# Clone repository
git clone https://github.com/yourusername/files-vector-mcp.git
cd files-vector-mcp

# Install dependencies
uv venv
source .venv/bin/activate
pip install -e .[dev]

License

Apache 2.0 License - see LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

files_vector_mcp_server-0.1.0.tar.gz (26.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

files_vector_mcp_server-0.1.0-py3-none-any.whl (28.5 kB view details)

Uploaded Python 3

File details

Details for the file files_vector_mcp_server-0.1.0.tar.gz.

File metadata

  • Download URL: files_vector_mcp_server-0.1.0.tar.gz
  • Upload date:
  • Size: 26.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for files_vector_mcp_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 797e75b2feb6402f8980318e4cb1ffd136ba05aec064b1dfc2e8a314705d0b7c
MD5 733bc537c8353b452380e9707d0231e8
BLAKE2b-256 b2e23d0769588e03a3f0c3afe49a05ecc702ab3f49f31e288845a9b46faa615e

See more details on using hashes here.

File details

Details for the file files_vector_mcp_server-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for files_vector_mcp_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7fc53f2fc7a47cb2fea8369fb83f21c7abb32be2a6b5a1a74241fd918d9ba437
MD5 9c49dcceeefd8e1aeb8e8b8f44f4df5f
BLAKE2b-256 2965d95e01100541f2cbcd79fe64478e525da30cf4d662b1bfc2e567098b52b5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page