mcp-file-roots-demo

mcp-file-roots-demo

Enables interactive chat with AI models via Anthropic API, with controlled file system access to specified directories and video conversion capabilities.

Category
Visit Server

README

MCP Chat with File System Access

MCP Chat is a command-line interface application that enables interactive chat capabilities with AI models through the Anthropic API. The application supports file system operations with controlled access to specified directories, video conversion capabilities, and extensible tool integrations via the MCP (Model Control Protocol) architecture.

Prerequisites

  • Python 3.10–3.13 (Python 3.14+ is not supported — dependencies lack pre-built wheels for it)
  • Anthropic API Key
  • FFmpeg (for video conversion features)

Setup

You must have FFmpeg already installed to convert a video file. To install FFmpeg on MacOS run:

brew install ffmpeg

Step 1: Configure the environment variables

  1. Copy the .env.example file to create a new .env file:
cp .env.example .env
  1. Edit the .env file and set your environment variables:
CLAUDE_MODEL="claude-sonnet-4-6"  # Or your preferred Claude model
ANTHROPIC_API_KEY=""  # Enter your Anthropic API secret key

Step 2: Install dependencies

Setup with uv

uv is a fast Python package installer and resolver.

  1. Install uv, if not already installed:
pip install uv
  1. Pin Python to a supported version (3.13 recommended) and install dependencies:
uv python pin 3.13
uv sync
  1. Run the project

When running the project, you must specify one or more root directories that the MCP server will have access to. Only files and directories within these roots can be accessed by the server.

uv run main.py <root1> [root2] [root3] ...

Examples:

# Single directory
uv run main.py /path/to/videos

# Multiple directories
uv run main.py /home/user/videos /mnt/storage/media ~/Documents

# Current directory
uv run main.py .

Features

File System Access

The server can only access files and directories within the specified root paths. This provides security by limiting file system access to approved locations.

Available Tools

  • list_roots: List all accessible root directories
  • read_dir: Read contents of a directory (must be within a root)
  • convert_video: Convert MP4 videos to other formats (avi, mov, webm, mkv, gif)

Video Conversion

The video conversion tool uses FFmpeg to convert MP4 files to various formats:

  • Standard video formats: AVI, MOV, WebM, MKV
  • GIF conversion with optimized settings
  • Medium quality preset for balanced file size and quality

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured