lsp-tools-mcp

lsp-tools-mcp

Exposes Language Server Protocol (LSP) tools such as diagnostics, goto definition, find references, symbols, and rename as a stdio MCP server.

Category
Visit Server

README

lsp-tools-mcp

ci license: MIT

Standalone Language Server Protocol tools exposed as a stdio MCP server.

Used By

This repository is the upstream source of truth for two downstream plugins. Both consume it as a git submodule:

Project Path Role
codex-lsp packages/lsp-tools-mcp/ Codex plugin that ships these LSP MCP tools plus a Codex-specific PostToolUse diagnostics hook.
oh-my-openagent (a.k.a. oh-my-opencode) vendor/lsp-tools-mcp/ OpenCode plugin that registers this server as a built-in Tier-1 stdio MCP. Exposes lsp_diagnostics, lsp_goto_definition, lsp_find_references, lsp_symbols, lsp_prepare_rename, lsp_rename, and lsp_status to all agents.

If you fix or extend the LSP runtime here, both downstreams pick up the change by bumping the submodule pointer. Do not fork the runtime into a downstream; land changes here instead.

Quick Start

npm install
npm run check
npm test
npm run build
printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node dist/cli.js mcp

MCP Tools

This server exposes the following tools:

  • lsp.status
  • lsp.diagnostics
  • lsp.goto_definition
  • lsp.find_references
  • lsp.symbols
  • lsp.prepare_rename
  • lsp.rename

Tool aliases are also available for compatibility:

  • lsp_status
  • lsp_diagnostics
  • lsp_goto_definition
  • lsp_find_references
  • lsp_symbols
  • lsp_prepare_rename
  • lsp_rename

When an MCP host registers this server under the name lsp (the default in both downstreams), the tools are exposed to agents as lsp_status, lsp_diagnostics, and so on, matching the alias names above.

Configuration

Default config paths (matches codex-lsp's historical layout):

  • Project: .codex/lsp-client.json
  • User: ~/.codex/lsp-client.json

Path overrides via environment variables:

  • LSP_TOOLS_MCP_PROJECT_CONFIG
  • LSP_TOOLS_MCP_USER_CONFIG

Examples (oh-my-openagent points the project config at .opencode/lsp.json via the env var):

LSP_TOOLS_MCP_PROJECT_CONFIG=.opencode/lsp.json node dist/cli.js mcp
LSP_TOOLS_MCP_USER_CONFIG=.opencode/lsp.json node dist/cli.js mcp

Example config file:

{
	"lsp": {
		"typescript": {
			"command": ["typescript-language-server", "--stdio"],
			"extensions": [".ts", ".tsx", ".js", ".jsx"]
		}
	}
}

Architecture

  • src/lsp/* standalone LSP runtime (process management, JSON-RPC transport, configuration, diagnostics, workspace edits)
  • src/tools.ts MCP tool definitions and handlers
  • src/mcp.ts stdio MCP server entry and registration
  • src/cli.ts standalone CLI entry (mcp subcommand only)

Local Development

npm install
npm run check
npm test
npm pack --dry-run

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured