Thanks to visit codestin.com
Credit goes to github.com

Skip to content
forked from idosal/git-mcp

Put an end to code hallucinations! A better GitMCP-inspired, open-source, local MCP server for any GitHub project

License

Notifications You must be signed in to change notification settings

SkrOYC/airgitdoc

 
 

AirGitDoc

Local documentation fetcher and processor for GitHub repositories via STDIO

AboutFeaturesGetting StartedHow It WorksDevelopmentLicense

📝 About

AirGitDoc is a local, STDIO-based tool that fetches and processes documentation from GitHub repositories. It implements the Model Context Protocol (MCP) to provide AI tools with access to up-to-date documentation and code, eliminating hallucinations and improving code generation accuracy.

Unlike cloud-based solutions, AirGitDoc runs entirely locally, giving you full control over your data and queries.

✨ Features

  • 🔒 Local-First: Runs entirely on your machine - no data leaves your environment
  • Fast & Efficient: Built with Bun for optimal performance
  • 🔄 MCP-Compatible: Implements the Model Context Protocol for seamless integration with AI tools
  • 📚 Documentation Processing: Fetches and processes documentation from GitHub repositories
  • 🗃️ Local Caching: Caches documentation locally to reduce API calls
  • 🔍 Semantic Search: Find relevant documentation using semantic search capabilities
  • 🛠️ Extensible: Easy to extend with custom documentation processors
  • 📦 Zero Dependencies: Minimal runtime dependencies for a lightweight footprint

🚀 Getting Started

Prerequisites

  • Bun (v1.2.5 or later)
  • Node.js (v18 or later, though Bun is recommended)
  • Git

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/airgitdoc.git
    cd airgitdoc
  2. Install dependencies:

    bun install
  3. Create a .env file in the project root with your GitHub token:

    GITHUB_TOKEN=your_github_token_here

    Note: The GitHub token is required to access GitHub's API. You can create a personal access token here with the repo and read:org scopes.

Usage

Run AirGitDoc in development mode:

bun run dev

Or build and run the production version:

bun run build
bun run start

Configuration

AirGitDoc can be configured using environment variables:

  • GITHUB_TOKEN: Your GitHub personal access token (required)
  • CACHE_DIR: Directory to store cached documentation (default: ~/.airgitdoc/cache)
  • LOG_LEVEL: Logging level (default: info)
  • PORT: Port to run the MCP server on (default: 3000)

🤔 How It Works

AirGitDoc implements the Model Context Protocol (MCP) to provide AI tools with access to GitHub repository documentation. Here's a high-level overview of how it works:

  1. Repository Configuration: Configure which repositories to fetch documentation from using the MCP interface.
  2. Documentation Fetching: AirGitDoc fetches documentation files from the specified GitHub repositories.
  3. Local Processing: Documentation is processed and cached locally for faster access.
  4. Semantic Search: Use semantic search to find relevant documentation based on natural language queries.
  5. MCP Integration: AI tools can query the documentation through the MCP interface.

🛠 Development

Project Structure

airgitdoc/
├── src/                    # Source code
│   ├── api/                # API clients and utilities
│   ├── mcp/                # MCP server implementation
│   ├── services/           # Core services
│   ├── types/              # TypeScript type definitions
│   └── utils/              # Utility functions
├── tests/                  # Test files
├── .env.example            # Example environment variables
├── bun.lockb               # Bun lockfile
├── package.json            # Project configuration
└── tsconfig.json           # TypeScript configuration

Building the Project

# Install dependencies
bun install

# Build the project
bun run build

# Run tests
bun test

Contributing

Contributions are welcome! Please open an issue or submit a pull request with your proposed changes.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

📚 Documentation

For detailed documentation on how to use AirGitDoc, please refer to the following resources:

❓ FAQ

What is the Model Context Protocol?

The Model Context Protocol is a standard that allows AI assistants to request and receive additional context from external sources in a structured manner, enhancing their understanding and performance.

Does AirGitDoc work with any AI assistant?

Yes, AirGitDoc is compatible with any AI assistant that supports the Model Context Protocol (MCP). It's designed to work seamlessly with tools that can communicate via STDIO.

Is a GitHub token required?

Yes, a GitHub token is required to access GitHub's API. You can create a personal access token with the repo and read:org scopes from your GitHub settings.

🔒 Privacy

AirGitDoc is designed with privacy in mind:

  • Runs entirely locally on your machine
  • Doesn't send your data to any external services
  • Respects GitHub's rate limits and API terms of service
  • Caches data locally to minimize API calls

👥 Contributing

We welcome contributions to AirGitDoc! Here's how you can help:

  1. Report bugs - Open an issue if you find a bug or have a feature request.
  2. Submit fixes - Fork the repository and submit a pull request with your changes.
  3. Improve documentation - Help us improve the documentation for other users.
  4. Spread the word - Star the repository and share it with others who might find it useful.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❤️ for developers

## 📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Put an end to code hallucinations! A better GitMCP-inspired, open-source, local MCP server for any GitHub project

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%