Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
4e7bf67
refactor: Use GitPython instead of git in command line
iburel Aug 8, 2025
67c1ec3
fix: properly use GitPython subcommands
NicolasIRAGNE Aug 8, 2025
e143f24
fix: properly use GitPython subcommands
NicolasIRAGNE Aug 8, 2025
b5a1af3
feat: add MCP (Model Context Protocol) server support
iburel Aug 8, 2025
3fa790e
test: add comprehensive MCP server testing and documentation
iburel Aug 8, 2025
cac4faf
test: add comprehensive MCP server testing and documentation
NicolasIRAGNE Aug 9, 2025
4a64fb4
fix: use mcp==1.12.4 instead of mcp>=1.0.0
Aug 12, 2025
81fdf80
drop support for Python 3.8/3.9, require 3.10+
Aug 12, 2025
2baa72b
fix: update test assertions to match GitPython implementation
Aug 12, 2025
61c4bb0
style: apply pre-commit fixes
Aug 12, 2025
b672b8f
style: apply additional pre-commit fixes
Aug 12, 2025
0d419d4
fix: prevent exception information exposure in MCP server
Aug 12, 2025
cee4735
fix: remove problematic docs and fix markdown formatting
Aug 12, 2025
3072551
fix: remove problematic files to fix CI
Aug 12, 2025
642f930
fix: resolve CodeQL security issues and pre-commit hook violations
Aug 12, 2025
289a642
fix: update mcp_server tests to match changed logging calls
Aug 12, 2025
577f6de
fix: disable pylint import-error for optional MCP dependency
Aug 12, 2025
83f0ecd
fix: correct token value in test to match expected value
Aug 12, 2025
f599bfa
fix: suppress remaining dynamic import violations
Aug 12, 2025
46e9749
fix: resolve all pre-commit hook violations
Aug 12, 2025
9869051
refactor to run with --mcp and add metrics
NicolasIRAGNE Aug 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.13"]
python-version: ["3.10", "3.13"]
include:
- os: ubuntu-latest
python-version: "3.13"
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ".[dev,server]"
python -m pip install ".[dev,server,mcp]"

- name: Cache pytest results
uses: actions/cache@v4
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## [Unreleased]

### Features

* **mcp:** Add Model Context Protocol (MCP) server support
- New `--mcp` CLI option to start MCP server
- `ingest_repository` tool for LLM integration
- Full MCP protocol compliance with stdio transport
- Enhanced MCP client examples for stdio transport

## [0.3.1](https://github.com/coderamp-labs/gitingest/compare/v0.3.0...v0.3.1) (2025-07-31)


Expand Down
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ You can also replace `hub` with `ingest` in any GitHub URL to access the corresp
- Token count
- **CLI tool**: Run it as a shell command
- **Python package**: Import it in your code
- **MCP Server**: Model Context Protocol server for LLM integration

## 📚 Requirements

Expand All @@ -74,6 +75,12 @@ pip install gitingest[server]

to include server dependencies for self-hosting.

For MCP (Model Context Protocol) support:

```bash
pip install gitingest[mcp]
```

However, it might be a good idea to use `pipx` to install it.
You can install `pipx` using your preferred package manager.

Expand Down Expand Up @@ -150,6 +157,47 @@ See more options and usage details with:
gitingest --help
```

## 🤖 MCP (Model Context Protocol) Server

Gitingest includes an MCP server that allows LLMs to directly access repository analysis capabilities through the Model Context Protocol.

### Starting the MCP Server

```bash
# Start the MCP server with stdio transport
python -m mcp_server
```

### Available Tools

The MCP server provides the following tools:

- **`ingest_repository`**: Ingest a Git repository or local directory and return a structured digest

### Example MCP Client

See `examples/mcp_client_example.py` for a complete example of how to use the MCP server.

### Configuration

Use the provided `examples/mcp-config.json` to configure the MCP server in your MCP client:

#### Stdio Transport (Default)

```json
{
"mcpServers": {
"gitingest": {
"command": "python",
"args": ["-m", "mcp_server"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
}
}
}
}
```

## 🐍 Python package usage

```python
Expand Down
Loading
Loading