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.4.tar.gz (26.9 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.4-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: files_vector_mcp_server-0.1.4.tar.gz
  • Upload date:
  • Size: 26.9 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.4.tar.gz
Algorithm Hash digest
SHA256 5a60b1c6350889b4975b5f42269d2eaae87211d070d2b3aff627c034ae768f68
MD5 4e017f81e430bc84273c42c2470aef9d
BLAKE2b-256 29e34015ad2bebec2e611ef495c460122ebcf5b7866c8941e1b14cdcdf82a942

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for files_vector_mcp_server-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 823f66e2c8753b1f7c13beb074ec0c0bb34dd0228c2a175d6f7a8130daa0ca80
MD5 0e525967b1f63c5d603b24b1a5121028
BLAKE2b-256 fb7efe9e69024a54c00000129db9b17afa65f470ccf5924aaf45873684aee820

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