ai-git
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LEANTIME_API_KEY | No | Your Leantime API key. Required for ticket tools. | |
| LEANTIME_USER_ID | No | Your Leantime user ID (numeric). Recommended. | |
| LEANTIME_BASE_URL | No | Your Leantime base URL, e.g. https://leantime.example.com. Required for ticket tools. | |
| LEANTIME_PICK_LIMIT | No | Max tickets listed (default 30). Optional. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| leantime_list_my_ticketsA | List Leantime tickets assigned to the configured user (LEANTIME_USER_ID), newest first. Use this to let the user pick a ticket before creating a branch (the aibranch workflow). Read-only. Args:
Returns JSON: { count, tickets: [{ id, headline, statusLabel, projectName, dueDate, url }] } |
| leantime_get_ticketA | Fetch one Leantime ticket's full detail, including an HTML-stripped description and a PR-ready markdown block. Use this for context when writing a commit/PR, or to preview the markdown that gets embedded in a PR body. Read-only. Args:
Returns JSON: { id, headline, description, statusLabel, dueDate, url, markdown } or { found: false } |
| git_statusA | Report the current branch, upstream ahead/behind counts, and staged/unstaged/untracked files. Use to orient before committing or opening a PR, and to parse a ticket id from a branch named Args:
Returns JSON: { branch, ahead, behind, staged[], unstaged[], untracked[] } |
| git_staged_diffA | Return the staged diff ( This is the first step of the aicommit workflow: read the diff, write a Conventional Commit message, then call git_commit. Read-only. Args:
Returns JSON: { diff, files: [{ path, status }], isEmpty, truncated } |
| git_log_for_prA | List commits on the current branch since the base branch, for writing a PR title/body (the aipr workflow). If base is omitted, it is auto-detected (origin/HEAD, else main/master). Read-only. Args:
Returns JSON: { base, count, commits: [{ sha, subject, body }] } |
| git_commitA | Commit the currently staged changes with the given message (the agent-authored Conventional Commit). Fails with an actionable message if nothing is staged. Args:
Returns JSON: { sha, shortStat } |
| git_create_branchA | Create (or switch to) a branch named If slug is omitted, the ticket headline is fetched from Leantime and slugified (Vietnamese diacritics handled). Args:
Returns JSON: { branch, created } |
| git_create_or_update_prA | Push the current branch and create or update its GitHub PR (the aipr workflow). Requires The agent supplies title and body. If ticket_id is given, the Leantime ticket markdown block is appended to the body. Detects an existing PR for the branch and edits it, otherwise creates a new one. Args:
Returns JSON: { url, number, action: "created" | "updated" } |
| git_undo_last_commitA | Soft-reset the last commit ( Args:
Returns JSON: { undoneSha, message } |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| aicommit | Read the staged diff, write a Conventional Commit message, and commit. |
| aibranch | Pick a Leantime ticket and create a branch type/<id>-<slug>. |
| aipr | Push the branch and open/update a GitHub PR with an AI-written title and body. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BenBen2109/ai-git-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server