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

Uploaded Python 3

File details

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

File metadata

  • Download URL: files_vector_mcp_server-0.1.2.tar.gz
  • Upload date:
  • Size: 26.8 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.2.tar.gz
Algorithm Hash digest
SHA256 f4a3ea15ac22117a841c16a6b276d188e44527abe9ac04e863d365f2c9df1138
MD5 d4d627683a2d8b022f335adee5a05712
BLAKE2b-256 a65fd54426d17106deecc78556b5e45a6a0cb7ec0986539320a63f7d0e95a066

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for files_vector_mcp_server-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d73a43f40744c9765969981f4c4327c8696010296c7eba4ea71435aee9ca3d7b
MD5 5ac87abb5158f208ed3b46aca974b904
BLAKE2b-256 c4714b6d151ebfaa5d68797863c90b8d166db8aaf57cc66cb97aaa7549e2a849

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