Skip to main content
Glama
udittripathi

Local Code MCP Server

by udittripathi

Local Code MCP Server (TypeScript)

A Model Context Protocol (MCP) server that provides LLMs with safe, read-only access to a local codebase.
It allows AI assistants to answer questions like:

  • Where is this functionality implemented?

  • Which file contains this function?

  • Search for usages of a specific API or keyword

All source code remains local β€” nothing is uploaded or shared externally.


✨ Features

  • πŸ”’ Local-only, read-only access to files

  • πŸ“‚ List files in a project

  • πŸ“„ Read file contents safely

  • πŸ” Search code across the repository

  • 🧭 Find function definitions

  • 🧠 Zod-based schemas for reliable tool calls

  • πŸ”Œ Compatible with any MCP-enabled LLM client


Related MCP server: MCP Smart Filesystem Server

πŸ— Architecture

LLM Client (Claude / Cursor / Custom UI)
            β”‚
            β”‚  MCP (stdio)
            β–Ό
     MCP Server (Node + TypeScript)
            β”‚
            β–Ό
     Local Project Files (read-only)


🧰 Available Tools

Tool Name

Description

list_files

List all files in the project

read_file

Read a file by relative path

search_code

Search text across source files

find_function

Locate function definitions


βš™οΈ Prerequisites

  • Node.js 18+

  • npm 9+


πŸš€ Setup

1️⃣ Install Dependencies

npm install

2️⃣ Configure Project Root

Edit src/config.ts and set the absolute path of the project you want to query:

export const PROJECT_ROOT = "ABSOLUTE_PATH_TO_YOUR_PROJECT";

3️⃣ Build & Run

npm run build
npm start

πŸ”Œ Connecting an MCP Client

Example (Claude Desktop):

{
  "mcpServers": {
    "local-code": {
      "command": "node",
      "args": ["<absolute-path>/dist/index.js"]
    }
  }
}

πŸ” Security Model

  • Read-only access

  • Explicit project root allowlist

  • Path traversal protection

  • No network access

  • No code upload

Available Tools

4 tools
find_functionC

Find function definition in project

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesFunction name

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states what the tool does but lacks behavioral details such as search scope (e.g., current directory vs. entire project), case sensitivity, return format, or error handling. This is inadequate for a tool with no annotation support.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It's front-loaded and efficiently conveys the core purpose, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is too minimal. It doesn't explain what the tool returns (e.g., code snippet, file path, line numbers) or behavioral aspects like search limitations. For a tool with one parameter and no structured support, this leaves significant gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'name' documented as 'Function name'. The description adds no additional parameter details beyond what the schema provides, such as examples or constraints, so it meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('find') and target ('function definition in project'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'search_code' or 'read_file', which might have overlapping functionality, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'search_code' or 'list_files'. There's no mention of context, prerequisites, or exclusions, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_filesB

List all files in the cal.com project

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states it lists files but doesn't mention any behavioral traits such as pagination, sorting, filtering, permissions needed, or what 'all files' entails (e.g., recursive, hidden files). This leaves significant gaps for an agent to understand how the tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It's front-loaded and appropriately sized for a simple tool, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate but incomplete. It states what the tool does but lacks details on behavior, output format, or context compared to siblings. For a list operation, more guidance on scope and results would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so there are no parameters to document. The description doesn't need to add parameter semantics, and it correctly doesn't mention any. Baseline is 4 for zero parameters, as the schema fully covers the absence of inputs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List') and resource ('files in the cal.com project'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'search_code' or 'find_function', which might also involve file operations, so it's not fully specific to sibling context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'search_code' or 'find_function'. It lacks any context about use cases, prerequisites, or exclusions, leaving the agent to infer usage based on tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_fileC

Read a file from the project

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesRelative path from project root

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Read' implies a read-only operation, the description doesn't specify error handling (e.g., if the file doesn't exist), performance considerations (e.g., file size limits), or the return format (e.g., text content, binary data). For a tool with no annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence ('Read a file from the project') that directly states the tool's purpose without unnecessary words. It's front-loaded and appropriately sized for a simple tool, with zero wasted content, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, no output schema, no annotations), the description is incomplete. It lacks details on behavioral aspects like error cases, return values, or usage context relative to siblings. While the schema covers the parameter, the overall description doesn't provide enough information for an agent to confidently invoke the tool without additional assumptions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'path' parameter documented as 'Relative path from project root'. The description adds no additional parameter semantics beyond this, as it doesn't elaborate on path formats, examples, or constraints. Given the high schema coverage, the baseline score of 3 is appropriate, as the schema handles the heavy lifting without extra value from the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Read a file from the project' clearly states the verb ('Read') and resource ('a file'), specifying it operates within the project context. However, it doesn't explicitly differentiate from sibling tools like 'list_files' (which might list files without reading content) or 'search_code' (which might search within files), leaving some ambiguity about when this specific tool is preferred.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention scenarios like reading specific file content versus listing files (with 'list_files') or searching within files (with 'search_code'), nor does it specify prerequisites such as file existence or permissions. This lack of contextual direction leaves the agent to infer usage based on the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_codeC

Search text in project source code

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesText to search for

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't describe how it behavesβ€”such as whether it searches recursively, respects case sensitivity, returns partial matches, handles large codebases, or has performance considerations. This leaves significant gaps for a search operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasteβ€”it directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a search tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the search returns (e.g., file names, line numbers, snippets), how results are structured, or any limitations. This leaves the agent with insufficient context for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'query' parameter documented as 'Text to search for'. The description adds no additional meaning beyond this, as it doesn't clarify syntax, formatting, or examples. Baseline 3 is appropriate since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Search text') and resource ('in project source code'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'find_function' or 'list_files', which might also involve searching or listing code-related items.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'find_function' or 'list_files'. It lacks context about specific use cases, prerequisites, or exclusions, leaving the agent to infer usage based on the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv1.0.0
    • First observedfind_function
    • First observedlist_files
    • First observedread_file
    • First observedsearch_code

TDQS

B3.3/5.0
Disambiguation4/5

The tools have mostly distinct purposes: find_function locates specific function definitions, list_files enumerates files, read_file accesses file content, and search_code performs text searches. There is some potential overlap between find_function and search_code, as both involve searching code, but find_function is specialized for function definitions while search_code is general text search, making them distinguishable with careful reading of descriptions.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case: find_function, list_files, read_file, and search_code. This uniformity makes the tool set predictable and easy to understand, with no deviations in naming conventions.

Tool Count4/5

With 4 tools, the count is reasonable for a local code exploration server, covering basic file and code operations. It might be slightly thin for broader code management tasks, but it aligns well with the focused scope of navigating and reading a project like cal.com, without feeling overloaded or insufficient.

Completeness3/5

The tool set covers core read-only operations for code exploration: listing files, reading content, and searching. However, it lacks update, create, or delete capabilities, which might be expected for a full code management server. There are no obvious dead ends, but the surface is incomplete for more advanced workflows like modifying code or handling dependencies.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables Large Language Models to safely browse and interact with local file systems through secure directory listing, file reading, and content search capabilities. Built with comprehensive security controls and high-performance handling of large directories and files.
    -
  • A
    license
    A
    quality
    D
    maintenance
    Provides LLM-optimized filesystem access with intelligent file pagination for large files, lightning-fast ripgrep-powered code search with regex support, and security sandboxing to safely explore and search codebases.
    7
    9
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides AI agents with secure, read-only file system access to analyze and understand project codebases, enabling multi-repository context aggregation and cross-project code tracing.
    5
    MIT

Latest Blog Posts

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/udittripathi/MCPServer'

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