mcp_server_code_extractor
🎯 Precise code extraction for AI assistants - MCP server using tree-sitter to extract functions, classes & snippets from 30+ languages without manual parsing
How to use
The mcp_server_code_extractor is a powerful Model Context Protocol (MCP) server designed to streamline code extraction for AI assistants. Utilizing the tree-sitter parsing library, this server allows you to extract functions, classes, and code snippets from over 30 programming languages without the need for manual parsing, saving you time and enhancing the accuracy of your AI-driven projects.
Once connected to the mcp_server_code_extractor, you can send requests to extract specific code elements from various programming languages. Utilize commands that specify the language and the type of code construct you want to retrieve, such as function definitions or class structures. This server is particularly efficient when you provide clear queries, allowing you to quickly obtain the precise code snippets required for your AI applications.
How to install
To install mcp_server_code_extractor, ensure you have the following prerequisites:
- Node.js (version 14 or later)
- Python (version 3.6 or later)
Option A: Quick start with npx
If you prefer a quick start, you can use the following command to run it directly without installation:
npx -y mcp_server_code_extractor
Option B: Global install alternative
For a global installation, run:
npm install -g mcp_server_code_extractor
Additional notes
When configuring the mcp_server_code_extractor, ensure you set the appropriate environment variables to specify the default language for parsing, as it can significantly impact extraction results. A common gotcha is not properly configuring tree-sitter grammars for less common languages, which may lead to incomplete data extraction. Refer to the GitHub repository for additional configuration options and troubleshooting tips.
Related MCP Servers
lc2mcp
Convert LangChain tools to FastMCP tools
fal
MCP server for Fal.ai - Generate images, videos, music and audio with Claude
mcp-config-manager
Manage MCP server configs across Claude, Gemini & other AI systems. Interactive CLI for server enable/disable, preset management & config sync.
rlm-claude
Recursive Language Models for Claude Code - Infinite memory solution inspired by MIT CSAIL paper
web-research-assistant
MCP server for SearXNG with 13 production-ready tools for web search, package info, GitHub integration, error translation, API docs, and more
gmail
A robust Model Context Protocol server for Gmail integration with intelligent authentication and comprehensive email operations