Semantic 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., "@Semantic Code MCP Server Find the definition of 'calculateTotal' in src/utils.ts"
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.
Semantic Code MCP Server
This is a Model Context Protocol (MCP) server that provides semantic code analysis capabilities using the Language Server Protocol (LSP).
Features
Semantic Navigation: Go to definition, find references, hover info.
Relationship Analysis: Check if function A calls function B (using LSP references).
Related MCP server: lsp-tools-mcp
Architecture
This server acts as a bridge between MCP and LSP. It spawns a typescript-language-server instance and translates MCP tool calls into LSP JSON-RPC requests.
Tools
get_definition: Find where a symbol is defined.get_references: Find all usages of a symbol.search_in_file: Search for a string in a file to find its line and character position.check_function_call: Analyze if one function calls another.
Usage
Installation
Clone the repository:
git clone git@github.com:thousandmiles/lsp-mcp-server.git cd lsp-mcp-serverRun the setup script to build the project and generate the configuration:
./setup.shCopy the output JSON and paste it into your MCP client configuration file.
Manual Setup
Install dependencies and build:
npm install npm run buildConfigure your MCP client (e.g. Claude Desktop) to run this server:
{ "mcpServers": { "semantic-code": { "command": "node", "args": ["/path/to/code_node/build/index.js"] } } }
Available Tools
4 toolscheck_function_callB
Check if one function calls another (direct call). Analyzes if 'sourceFunction' (defined in sourceFile) contains any references to 'targetFunction' (defined in targetFile).
Inputs: sourceFile (required), targetFile (required), sourceFunction (required), targetFunction (required).
get_definitionA
Get the definition location of a symbol. Returns the file path, line, and character where the symbol is defined. Tip: Use 'search_in_file' to find the exact line and character of the symbol you are interested in.
Inputs: line (required), filePath (required), character (required).
get_referencesA
Find all references to a symbol. Returns a list of locations where the symbol is used. Tip: Use 'search_in_file' to find the exact line and character of the symbol definition or usage.
Inputs: line (required), filePath (required), character (required).
search_in_fileA
Search for a string in a file to find its line and character position. Useful for finding the arguments for get_definition.
Inputs: query (required), filePath (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
Tools are mostly distinct: get_definition, get_references, and search_in_file each serve clearly different lookup purposes, while check_function_call is a specialized relationship query. However, check_function_call could overlap conceptually with get_references since call relationships are a type of reference, though the descriptions provide enough clarity to avoid serious confusion.
All tool names use snake_case and follow a verb-first style, with get_definition and get_references matching the verb_noun pattern exactly. search_in_file and check_function_call deviate slightly by including prepositions or compound objects, but the overall pattern remains predictable and readable.
Four tools is well-scoped for a semantic code navigation server. Each tool provides a distinct, non-redundant capability without feeling sparse or overwhelming.
The set covers core symbol workflows: finding definitions, references, string locations, and direct call relationships. Missing features like finding implementations or broader call-graph traversal are reasonable omissions for a focused utility set, and agents can complete common navigation tasks without major dead ends.
Maintenance
Related MCP Connectors
Lean 4 MCP server: compile, prove theorems, and formalize math with Mathlib.
The official Svelte MCP server providing docs and autofixing tools for Svelte development
Repository knowledge graph MCP server for codebase understanding and debugging.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceExposes Language Server Protocol (LSP) features as MCP tools, enabling IDE-grade semantic navigation including go-to-definition, find references, hover info, and symbols across multiple programming languages (Python, Rust, C/C++, TypeScript/JavaScript, React, HTML, CSS).4MIT
- AlicenseNot gradedqualityDmaintenanceExposes Language Server Protocol (LSP) tools such as diagnostics, goto definition, find references, symbols, and rename as a stdio MCP server.8MIT
- AlicenseNot gradedqualityCmaintenanceConnects VSCode with MCP to provide AI assistants real-time access to LSP diagnostics, symbol info, and code navigation, enabling efficient code analysis without slow build commands.105ISC
- FlicenseNot gradedqualityDmaintenanceProvides code intelligence by indexing source code into SQLite and offering MCP tools for symbol search, flow tracing, and context retrieval to assist with code navigation and understanding.-