Git and GitHub MCP server built with FastMCP
Project description
Mooring — Git & GitHub MCP Server
Mooring lines for your code — Git and GitHub operations for AI tools.
Mooring is an MCP server that gives AI assistants structured access to local Git repositories and the GitHub API. Local operations use GitPython (no subprocess calls). GitHub operations use the PyGithub library with token masking and rate limit handling built in.
Tools
Local Git
| Tool | Description | Key Parameters |
|---|---|---|
repo_status |
Branch, ahead/behind, stash count, staged/unstaged/untracked files | repo_path |
repo_log |
Commit log with optional filters | repo_path, max_count, author, since, path, search |
repo_diff |
Unified diff — working tree, staged, or between refs | repo_path, staged, from_ref, to_ref |
repo_blame |
Git blame with optional line range | repo_path, file_path, start_line, end_line |
repo_branches |
All branches with tracking info, last commit, ahead/behind | repo_path |
repo_stash |
Stash operations: list, push, pop, apply | repo_path, action, message |
GitHub
| Tool | Description | Key Parameters |
|---|---|---|
gh_pr_list |
List pull requests | repo, state, author, label |
gh_pr_detail |
PR detail with reviews, comments, and check runs | repo, number |
gh_pr_create |
Create a pull request | repo, title, body, head, base, labels, reviewers |
gh_issues |
List, create, or update issues | repo, state, action, title, body, number |
gh_actions |
List recent GitHub Actions workflow runs | repo, workflow, status |
Utility
| Tool | Description | Key Parameters |
|---|---|---|
health |
Server version and status check | (none) |
Installation
# PyPI
pip install mooring-mcp
# Isolated install
pipx install mooring-mcp
Usage
Run the server directly:
mooring
Claude Code
claude mcp add mooring -- mooring
Claude Desktop
Add to your Claude Desktop configuration (claude_desktop_config.json):
{
"mcpServers": {
"mooring": {
"command": "mooring",
"env": {
"GITHUB_TOKEN": "your-github-personal-access-token"
}
}
}
}
The GITHUB_TOKEN environment variable is required for all GitHub tools (gh_*). Local Git tools work without it.
Security
- Path traversal protection — file paths are resolved and validated against the repository root before any operation
- Symlink escape detection — symlinks that resolve outside the repository are rejected
- Ref validation — Git refs are checked against a safe character pattern and verified to exist before use
- Token masking — error messages are scrubbed for GitHub token patterns (
ghp_*,gho_*,github_pat_*) before being returned - Rate limit handling — GitHub 403 responses are caught and surfaced as clear messages instead of raw exceptions
Development
git clone https://github.com/seayniclabs/mooring.git
cd mooring
python -m venv .venv && source .venv/bin/activate
pip install -e ".[test]"
python -m pytest tests/ -q
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mooring_mcp-0.1.1.tar.gz.
File metadata
- Download URL: mooring_mcp-0.1.1.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d06d5136895445ead0138dbaf88e81e44b819fbbd2f3c899dba4d97731785060
|
|
| MD5 |
0cb310ce54fe28fe14284bd16f3cfa0e
|
|
| BLAKE2b-256 |
3e944bc8ef6891302357251fda51886b3e88a39a371bece0057914289a83f914
|
File details
Details for the file mooring_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mooring_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c782a6ed3364f649ccb7ca297405e7209199d370eabdc36672f2f9d69efd844b
|
|
| MD5 |
1e6f773c720376e040a8934671a65c2e
|
|
| BLAKE2b-256 |
7a05cc2d188f2e21177a1362657a032500af827b5675a4a2d0bded29cc3b876e
|