tree-sitter-mcp

Public

This is an LM Studio Plugin that provides tree-sitter code analysis capabilities

20 Downloads

README

Magical thread weaver

tree-sitter-mcp

This is an LM Studio Plugin that provides tree-sitter code analysis capabilities. It acts as a bridge between the LM Studio Plugin SDK and the mcp-server-tree-sitter Python server.

Features

  • Deep Code Analysis: Leverage tree-sitter to understand code structure.
  • Custom Queries: Build specific patterns to find functions, variables, or complex logic.
  • Multi-Language Support: Analyze various programming languages.

Development Process

This plugin was migrated from the original Python-based MCP server to the LM Studio Plugin TypeScript SDK.

  • Porting: Dynamic tool registration was implemented to automatically expose all tools from the Python server.
  • Environment Management: Automated setup script handles the creation of a Python virtual environment and installation of dependencies.

Installation

  • Ensure you have python3, pip, and git installed on your system.
  • Run the setup script:
    npm run setup
    
    This will clone the source server, create a .venv, and install all required packages.

Usage

Once installed via LM Studio, the plugin will automatically provide tools for:

  • Code Analysis
  • Query Building
  • Project-wide Search
  • Debugging

The LLM can use these tools to explore your codebase with high precision.

Practical prompt examples:

'prompt_examples/' folder contains 8 practical scenarios of codebase analysis.

Version

  • Current Version: 1.0.0