Atlas / MCP servers / bsmi021 / File Context

File ContextSAFE

mcp/bsmi021/file-context

A Model Context Protocol (MCP) server that provides file system context to Large Language Models (LLMs). This server enables LLMs to read, search, and analyze code files with advanced caching and real-time file watching capabilities.

Verdict
SAFE
Grade
B
Trust score
86 /100
Exposed tools
8 7r · 1w · 0d
Transport
stdio · streamable-http
License
MIT
Stars
39
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

[](https://smithery.ai/server/@bsmi021/mcp-file-context-server)

A Model Context Protocol (MCP) server that provides file system context to Large Language Models (LLMs). This server enables LLMs to read, search, and analyze code files with advanced caching and real-time file watching capabilities.

Features

  • File Operations
  • Read file and directory contents
  • List files with detailed metadata
  • Real-time file watching and cache invalidation
  • Support for multiple file encodings
  • Recursive directory traversal
  • File type filtering
  • Code Analysis
  • Cyclomatic complexity calculation
  • Dependency extraction
  • Comment analysis
  • Quality metrics:
  • Duplicate lines detection
  • Long lines detection (>100 characters)
  • Complex function identification
  • Line counts (total, non-empty, comments)
  • Smart Caching
  • LRU (Least Recently Used) caching strategy
  • Automatic cache invalidation on file changes
  • Size-aware caching with configurable limits
  • Cache statistics and performance metrics
  • Last read result caching for efficient searches
  • Advanced Search
  • Regex pattern matching
  • Context-aware results with configurable surrounding lines
  • File type filtering
  • Multi-pattern search support
  • Cached result searching
  • Exclusion patterns

Installation

Installing via Smithery

To install File Context Server for Claude Desktop automatically via Smithery:

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

Manual Installation

npm install @modelcontextprotocol/file-context-server

Usage

Starting the Server

npx file-context-server

Available Tools

  1. list_context_files
  2. Lists files in a directory with detailed metadata
{
"pat
Read from source at commit adca4f899abbOBSERVED · 2026-10-08
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.

claude-code
claude mcp add file-context-server -- npx -y [email protected]
claude-desktop
{
  "mcpServers": {
    "file-context-server": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ]
    }
  }
}
03

Exposed tools (8)

7 read · 1 write · 0 destructive.

ToolRiskDescription
generate_outlinereadGenerate a code outline for a file, showing its structure (classes, functions, imports, etc). Supports TypeScript/JavaScript and Python files.
getFilesreadRetrieve multiple files by their paths, returning content and metadata for each file
get_chunk_countreadGet the total number of chunks that will be returned for a read_context request.\nUse this tool FIRST before reading content to determine how many chunks you need to request.\nThe parameters should match what you\
get_profile_contextreadGet repository context based on current profile settings
lc-get-filesreadRetrieve specific file contents
lc-list-modified-filesreadTrack file changes since context generation
search_contextreadSearch for patterns in files
set_profilewriteSet the active profile for context generation
04

Trust audit

SAFEgrade B · trust 86/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeWARN
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
none-observed
Network
declared (1 observation(s))
Shell
none-observed
Dependencies
not all pinned
Secrets in source
none-found

Findings (13)

MEDIUMNetwork egress · net.raw_ip · CWE-200, CWE-319
src/index.ts:1787
console.log(`[HTTP] MCP server listening on http://0.0.0.0:${port}/mcp`);
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
src/index.ts:838
const hash = createHash('md5').update(content).digest('hex');
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
src/index.ts:886
const hash = createHash('md5').update(content).digest('hex');
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
@modelcontextprotocol/sdk, @typescript-eslint/parser, @typescript-eslint/types, chokidar, express, glob, handlebars, lru-cache
Why it matters. 17 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWPrompt injection · prompt.credential_read · CWE-94, CWE-1427
PRPs/EXAMPLE_multi_agent_prp.md:165
- Load environment variables with defaults
Why it matters. asks the agent to read credentials
LOWPrompt injection · prompt.credential_read · CWE-94, CWE-1427
docs/llms-full.txt:4450
load_dotenv()  # load environment variables from .env
Why it matters. asks the agent to read credentials
LOWPrompt injection · prompt.credential_read · CWE-94, CWE-1427
docs/llms-full.txt:5828
This creates the beginnings of a .NET console application that can read the API key from user secrets.
Why it matters. asks the agent to read credentials
LOWSupply chain · prompt.pipe_to_shell · CWE-829, CWE-1357
docs/llms-full.txt:6048
curl -LsSf https://astral.sh/uv/install.sh | sh
LOWPrompt injection · prompt.transfer_instruction · CWE-94, CWE-1427
docs/llms-full.txt:8491
MCP clients **MUST NOT** send tokens to the MCP server other than ones issued by the MCP server's authorization server.
Why it matters. an instruction to move sensitive data to an outside destination
Fix. remove; a skill never needs the user's secrets off the machine
LOWPrompt injection · prompt.transfer_instruction · CWE-94, CWE-1427
docs/llms-full.txt:9445
Client->>+Server: POST InitializedNotification<br>Mcp-Session-Id: 1868a90c...
Why it matters. an instruction to move sensitive data to an outside destination
Fix. remove; a skill never needs the user's secrets off the machine
LOWPrompt injection · prompt.transfer_instruction · CWE-94, CWE-1427
docs/llms-full.txt:9449
Client->>+Server: POST ... request ...<br>Mcp-Session-Id: 1868a90c...
Why it matters. an instruction to move sensitive data to an outside destination
Fix. remove; a skill never needs the user's secrets off the machine
LOWPrompt injection · prompt.transfer_instruction · CWE-94, CWE-1427
docs/llms-full.txt:9462
Client->>+Server: POST ... notification/response ...<br>Mcp-Session-Id: 1868a90c...
Why it matters. an instruction to move sensitive data to an outside destination
Fix. remove; a skill never needs the user's secrets off the machine
INFOInventory / provenance · inv.oversize · CWE-1104
cache/4b648882430d8aad657e9165c33c42a605e7b408d335749f5f401b1eacb7e484.cache
cache/4b648882430d8aad657e9165c33c42a605e7b408d335749f5f401b1eacb7e484.cache
Why it matters. 1950422 bytes not read

Gates applied: no_behavioural_pass.

Audited 2026-10-08 · audit v0.4.1 · source sha adca4f899abbfull audit observations/trust-audit/mcp-server/bsmi021__file-context.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-08adca4f899abbSAFEB86first audit
06

Questions

What is the File Context MCP server?

A Model Context Protocol (MCP) server that provides file system context to Large Language Models (LLMs). This server enables LLMs to read, search, and analyze code files with advanced caching and real-time file watching capabilities.

What tools does File Context expose?

8 in total: 7 read-only, 1 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is File Context safe to connect to an agent?

The audit found nothing in the source that contradicts what it says it does, and graded it B (86/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.

What credentials does File Context need?

No credential environment variables were found in its source, so it appears to need none.

How does File Context run?

It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as file-context-server at 1.0.0.

How current is this page?

The grade is for one exact copy of the source (adca4f899abb), read on 2026-10-08. The repository is watched and re-audited when it changes.

Advertisement