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
🏗 Architecture
🧰 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
2️⃣ Configure Project Root
Edit src/config.ts and set the absolute path of the project you want to query:
3️⃣ Build & Run
🔌 Connecting an MCP Client
Example (Claude Desktop):
🔐 Security Model
Read-only access
Explicit project root allowlist
Path traversal protection
No network access
No code upload