repo-to-txt-mcp
Repo-to-txt-mcp is a server for analyzing GitHub repositories and converting them into text files for integration with large language models. It expands the repo-to-txt CLI tool by offering a web API and simplified integration with Cursor's MCP system.
repo-to-txt-mcp
An MCP server for analyzing and converting Git repositories to text files for LLM context.
Overview
repo-to-txt-mcp is a Machine Code Protocol (MCP) server that allows you to analyze GitHub repositories or local folders and convert them into structured text files. This is particularly useful for providing context about repositories to large language models (LLMs) like GPT-4.
Features
- Repository Analysis: Analyze both local and remote Git repositories
- Structured Output: Generate formatted text with folder structure and concatenated file contents
- File Filtering: Include or exclude files based on extensions
- Token Management: Limit output size by token count
- Easy Integration: Designed to work seamlessly with Cursor's MCP system
- Cross-Platform: Works on Windows, macOS, and Linux
Installation
See the for detailed instructions on: direct installation, Docker installation, and GitHub Container Registry usage.
Quick Start
- Install the required packages.
- Start the server. The server will be available at
http://localhost:8000
.
API Usage
See the for complete details.
Cursor Integration
This server is designed to integrate with Cursor for providing repository context to language models during conversations.
Docker Support
A Dockerfile is included to facilitate containerized deployment.
Smithery Integration
This project includes configuration for Smithery, a tool for managing MCPs.
Contributing
Contributions are welcome! Please see for guidelines.
License
This project is licensed under the MIT License - see the file for details.