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.1.tar.gz (26.7 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.1-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: files_vector_mcp_server-0.1.1.tar.gz
  • Upload date:
  • Size: 26.7 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.1.tar.gz
Algorithm Hash digest
SHA256 b91ef2e22318cc9c2fb9fc150cbffa95ead079eab2a11f5750c6d5c68306fe93
MD5 2477621b5e5040621e4f3999548ee340
BLAKE2b-256 2e7da907c29160437a120078a42d68d2f74bdbf26c189bc898663fc93d019c9f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for files_vector_mcp_server-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 89974b92c6649ccd540f0555ee27a32798e92f5696f7374e8bf444a46e2b6b8b
MD5 0e6f6675f57e2f47c053ef4d578a0e16
BLAKE2b-256 97f776f2ed1702aaa5efcf48e62d835ba022b6a441e61657ceca5b2b71a7a54c

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