Local Code MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Local Code MCP ServerFind the definition of the handleRequest function"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 all files in the project |
| Read a file by relative path |
| Search text across source files |
| Locate function definitions |
βοΈ Prerequisites
Node.js 18+
npm 9+
π Setup
1οΈβ£ Install Dependencies
npm install2οΈβ£ 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 toolsfind_functionC
Find function definition in project
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Function name |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Relative path from project root |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Text to search for |
TDQS
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.
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.
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.
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.
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.
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.
4 tool updates
v1.0.0- First observed
find_function - First observed
list_files - First observed
read_file - First observed
search_code
TDQS
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.
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.
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.
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
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
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Securely search and manage workspace context files for AI agents and teams.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables 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.-
- AlicenseAqualityDmaintenanceProvides 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.791MIT
- FlicenseBqualityDmaintenanceEnables LLMs to search and read files in local and GitHub repositories, analyze pull request diffs, and grep code content with built-in security protections.6-
- AlicenseNot gradedqualityDmaintenanceProvides 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.5MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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