bsmi021_mcp-file-context-server

bsmi021_mcp-file-context-server

3.1

If you are the rightful owner of bsmi021_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 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 a powerful tool for developers and AI systems that require detailed file system insights. The server is equipped with error handling mechanisms and is highly configurable through environment variables, ensuring robust performance and adaptability to different use cases.

Features

  • File Operations: Read file and directory contents, list files with metadata, real-time file watching, support for multiple encodings, recursive traversal, and file type filtering.
  • Code Analysis: Calculates cyclomatic complexity, extracts dependencies, analyzes comments, and provides quality metrics like duplicate lines detection and complex function identification.
  • Smart Caching: Implements LRU caching strategy, automatic cache invalidation, size-aware caching, and provides cache statistics and performance metrics.
  • Advanced Search: Supports regex pattern matching, context-aware results, file type filtering, multi-pattern search, and exclusion patterns.

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.