mcp-file-context-server

mcp-file-context-server

3.5

If you are the rightful owner of mcp-file-context-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A Model Context Protocol (MCP) server that provides file system context to Large Language Models (LLMs).

The File Context Server is a robust Model Context Protocol (MCP) server designed to enhance the capabilities of Large Language Models (LLMs) by providing them with comprehensive file system context. This server allows LLMs to perform operations such as reading, searching, and analyzing code files with advanced features like caching and real-time file watching. It supports various file operations, code analysis, smart caching, and advanced search functionalities, making it an essential tool for developers working with LLMs. The server is equipped with error handling mechanisms and is configurable through environment variables, ensuring a seamless and efficient user experience.

Features

  • File Operations: Includes reading file and directory contents, real-time file watching, and support for multiple file encodings.
  • Code Analysis: Offers cyclomatic complexity calculation, dependency extraction, and quality metrics like duplicate lines detection.
  • Smart Caching: Utilizes LRU caching strategy with automatic cache invalidation and size-aware caching.
  • Advanced Search: Features regex pattern matching, context-aware results, and multi-pattern search support.

Tools

  1. list_context_files

    Lists files in a directory with detailed metadata.

  2. read_context

    Reads file or directory contents with metadata.

  3. search_context

    Searches for patterns in files with context.

  4. analyze_code

    Analyzes code files for quality metrics.

  5. cache_stats

    Gets cache statistics and performance metrics.