mcp-file-context-server
Developer Tools
Description
A Model Context Protocol (MCP) server that provides file system context to Large Language Models (LLMs), enabling them to read, search, and analyze code files with advanced caching and real-time file watching capabilities.
Author
bsmi021
Created Date
2024-12-01
Tutorial
Learn how to use this MCP server
Step 1: Install the File Context Server
bash npm install @modelcontextprotocol/file-context-server
Step 2: Start the Server
bash npx file-context-server
Step 3: Use Available Tools
List Context Files
{ "path": "./src", "recursive": true, "includeHidden": false }
Read Context
{ "path": "./src/index.ts", "encoding": "utf8", "maxSize": 1000000, "recursive": true, "fileTypes": ["ts", "js"] }
Search Context
{ "pattern": "function.*", "path": "./src", "options": { "recursive": true, "contextLines": 2, "fileTypes": ["ts"] } }
Analyze Code
{ "path": "./src", "recursive": true, "metrics": ["complexity", "dependencies", "quality"] }
Cache Stats
{ "detailed": true }

