ts-index
by 0x5457
Overview
Indexes TypeScript code for semantic and symbol search, with Language Server Protocol (LSP) and Model Context Protocol (MCP) integration, enabling advanced code analysis and interaction.
Installation
bin/ts-index mcp --project /path/to/your/typescript/project --db /path/to/your/index.dbSecurity Notes
CRITICAL: The `read_file` MCP tool allows reading arbitrary files on the server's filesystem if `file_path` is provided as an absolute path, potentially leading to sensitive data disclosure. This is a severe vulnerability if the MCP server is exposed to untrusted network clients. HIGH: The `ast_grep_search` tool passes user-supplied patterns and globs directly to the `ast-grep` executable. While `exec.CommandContext` is generally safer, a complex or malicious pattern could potentially exploit vulnerabilities in `ast-grep` itself. MEDIUM: The system relies on external executables (`npm`, `node`, LSP servers like `vtsls`, `ast-grep`) and an external embedding API. Vulnerabilities in these third-party components or misconfiguration of the `--embed-url` could lead to supply chain attacks or data leakage. LOW: Temporary files are created in `/tmp` by the `ast-grep` client which, if the server crashes, could be left behind and potentially expose sensitive information to other local users.
Similar Servers
mcp-language-server
Serves as an MCP (Model Context Protocol) gateway, enabling LLMs to interact with Language Servers (LSPs) for codebase navigation, semantic analysis, and code editing operations.
cclsp
Integrate LLM-based coding agents with Language Server Protocol (LSP) servers to enable robust code navigation, symbol resolution, and refactoring across various programming languages.
codegraph-rust
Transforms codebases into a semantically searchable knowledge graph, enabling AI agents to reason about code relationships, architecture, and impact rather than just performing text-based searches.
context-engine
Provides an agent-agnostic local context engine via Model Context Protocol (MCP) for coding agents, enabling semantic search, planning, code review, and prompt enhancement with AI integration.