Local Code MCP Server
Click on "Deploy 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 Server Find 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: Code Search, Read & PR Analysis
π 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
Inputs: name (required).
list_filesB
List all files in the cal.com project
Inputs: no named parameters.
read_fileC
Read a file from the project
Inputs: path (required).
search_codeC
Search text in project source code
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 4 tools
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
Related MCP Connectors
Read and search folders on your own computer with explicit consent. Files are never uploaded.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Safe folder access for ChatGPT and Claude: read, write and search files, risky tools opt-in.
Securely search and manage workspace context files for AI agents and teams.
Related MCP Servers
- AlicenseNot 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.1MIT
- 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.17 PyPI5MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to securely browse, search, inspect, and understand local project files through Model Context Protocol tools.1MIT