Local documentation fetcher and processor for GitHub repositories via STDIO
About • Features • Getting Started • How It Works • Development • License
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.
- 🔒 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
- Bun (v1.2.5 or later)
- Node.js (v18 or later, though Bun is recommended)
- Git
-
Clone the repository:
git clone https://github.com/yourusername/airgitdoc.git cd airgitdoc
-
Install dependencies:
bun install
-
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
andread:org
scopes.
Run AirGitDoc in development mode:
bun run dev
Or build and run the production version:
bun run build
bun run start
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
)
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:
- Repository Configuration: Configure which repositories to fetch documentation from using the MCP interface.
- Documentation Fetching: AirGitDoc fetches documentation files from the specified GitHub repositories.
- Local Processing: Documentation is processed and cached locally for faster access.
- Semantic Search: Use semantic search to find relevant documentation based on natural language queries.
- MCP Integration: AI tools can query the documentation through the MCP interface.
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
# Install dependencies
bun install
# Build the project
bun run build
# Run tests
bun test
Contributions are welcome! Please open an issue or submit a pull request with your proposed changes.
This project is licensed under the MIT License - see the LICENSE file for details.
For detailed documentation on how to use AirGitDoc, please refer to the following resources:
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.
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.
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.
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
We welcome contributions to AirGitDoc! Here's how you can help:
- Report bugs - Open an issue if you find a bug or have a feature request.
- Submit fixes - Fork the repository and submit a pull request with your changes.
- Improve documentation - Help us improve the documentation for other users.
- Spread the word - Star the repository and share it with others who might find it useful.
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ for developers
## 📄 LicenseThis project is licensed under the MIT License - see the LICENSE file for details.