MCP Catalogs
Home

mcp-file-context-server

by bsmi021·36·Score 43

A robust MCP server providing file system context to LLMs with advanced caching and code analysis capabilities.

file-systemdeveloper-toolsai-llm
6
Forks
3
Open issues
10 mo ago
Last commit
2d ago
Indexed

Overview

This MCP server enables LLMs to read, search, and analyze code files with comprehensive file operations and code analysis tools. It implements advanced caching with LRU strategy and real-time file watching capabilities. The server offers multiple tools for listing files, reading contents, searching patterns, analyzing code quality metrics, and managing cache statistics, making it particularly valuable for code review and understanding large codebases.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Code review and analysis in LLM-powered development environments
you:Understanding file structure and dependencies of complex projects
you:Real-time code monitoring with automatic cache updates
you:What file types are supported?
you:How does caching work?

When to choose this

Choose this MCP server when you need comprehensive file system access with caching for LLMs, particularly for code analysis and real-time file monitoring in development environments.

When NOT to choose this

Don't choose this if you need write access to files (it's read-only) or if you require authentication for accessing restricted file systems.

Tools this server exposes

5 tools extracted from the README
  • list_context_files({ path: string, recursive?: boolean, includeHidden?: boolean }) => Promise<{files: Array}>

    Lists files in a directory with detailed metadata

  • read_context({ path: string, encoding?: string, maxSize?: number, recursive?: boolean, fileTypes?: string[] }) => Promise<{content: string, metadata: Object}>

    Reads file or directory contents with metadata

  • search_context({ pattern: string, path: string, options?: { recursive?: boolean, contextLines?: number, fileTypes?: string[] } }) => Promise<{matches: Array}>

    Searches for patterns in files with context

  • analyze_code({ path: string, recursive?: boolean, metrics?: string[] }) => Promise<{analysis: Object}>

    Analyzes code files for quality metrics

  • cache_stats({ detailed?: boolean }) => Promise<{stats: Object}>

    Gets cache statistics and performance metrics

Comparable tools

nomic-mcp-embed-textfilesystem-mcpgithub-mcp

Installation

Installing via Smithery

npx -y @smithery/cli install @bsmi021/mcp-file-context-server --client claude

Manual Installation

npm install @modelcontextprotocol/file-context-server

Claude Desktop Configuration

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "file-context": {
      "command": "npx",
      "args": ["file-context-server"]
    }
  }
}

FAQ

What file types are supported?
The server supports multiple file encodings and can filter by file type. Common code files like TypeScript, JavaScript are supported, with the ability to specify custom file types.
How does caching work?
The server uses an LRU (Least Recently Used) caching strategy with automatic cache invalidation when files change. Cache size and TTL can be configured via environment variables.

Compare mcp-file-context-server with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.