Skip to main content
Glama

MCP File Context Server

by bsmi021

read_context

Analyze and filter code files efficiently by ignoring common artifact directories, chunking large files for manageable processing, and supporting recursive directory reading with customizable file types.

Instructions

Read and analyze code files with advanced filtering and chunking. The server automatically ignores common artifact directories and files:

  • Version Control: .git/
  • Python: .venv/, pycache/, *.pyc, etc.
  • JavaScript/Node.js: node_modules/, bower_components/, .next/, dist/, etc.
  • IDE/Editor: .idea/, .vscode/, .env, etc.

For large files or directories, use get_chunk_count first to determine total chunks, then request specific chunks using chunkNumber parameter.

Input Schema

NameRequiredDescriptionDefault
chunkNumberNoWhich chunk to return (0-based). Use with get_chunk_count to handle large files/directories.
encodingNoFile encoding (e.g., utf8, ascii, latin1)utf8
fileTypesNoFile extension(s) to include WITHOUT dots (e.g. ["ts", "js", "py"] or just "ts"). Empty/undefined means all files.
maxSizeNoMaximum file size in bytes. Files larger than this will be chunked.
pathYesPath to file or directory to read
recursiveNoWhether to read directories recursively (includes subdirectories)

Input Schema (JSON Schema)

{ "properties": { "chunkNumber": { "default": 0, "description": "Which chunk to return (0-based). Use with get_chunk_count to handle large files/directories.", "type": "number" }, "encoding": { "default": "utf8", "description": "File encoding (e.g., utf8, ascii, latin1)", "type": "string" }, "fileTypes": { "default": [], "description": "File extension(s) to include WITHOUT dots (e.g. [\"ts\", \"js\", \"py\"] or just \"ts\"). Empty/undefined means all files.", "items": { "type": "string" }, "type": [ "array", "string" ] }, "maxSize": { "default": 1048576, "description": "Maximum file size in bytes. Files larger than this will be chunked.", "type": "number" }, "path": { "description": "Path to file or directory to read", "type": "string" }, "recursive": { "default": true, "description": "Whether to read directories recursively (includes subdirectories)", "type": "boolean" } }, "required": [ "path" ], "type": "object" }
Install Server

Other Tools from MCP File Context Server

Related Tools

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/bsmi021/mcp-file-context-server'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server