Skip to content

feat(add gitconfig MCP tools) - #2

Merged
dcharles525 merged 1 commit into
mainfrom
feat/epinio-679-gitconfigs
Aug 31, 2026
Merged

dcharles525 merged 1 commit into
mainfrom
feat/epinio-679-gitconfigs

Conversation

@psanghvi17

@psanghvi17 psanghvi17 commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Added full git configuration management to the MCP core tier, mirroring the existing Epinio CLI/API surface.

New MCP tools (5):

list_gitconfigs — list git configs the caller can access
show_gitconfig — fetch one git config by id
match_gitconfigs — prefix-match git config ids (empty prefix = all; useful before bulk delete)
create_gitconfig — register credentials/settings for a git host (supports global, provider types, certs, skip SSL)
delete_gitconfig — batch-delete one or more git configs
Client layer: new types and REST methods in client/types.go and client/client.go for GET /gitconfigs, GET /gitconfigs/:id, GET /gitconfigsmatch, POST /gitconfigs, and batch DELETE /gitconfigs?gitconfigs[]=....

Registration: wired via RegisterGitconfigTools in tools/register.go.

Docs (in-repo): updated README.md and AGENTS.md to mention git configurations.

Intentionally omitted: no update_gitconfig tool. Epinio has no PATCH /gitconfigs/:id route; EPINIO-343 "updates" meant explicit gitconfig selection at deploy time, the global create flag, and enterprise provider fixes — not edit-in-place. Comments in tools/gitconfigs.go and client/types.go document this.

Passwords and certificates are write-only on create; list/show never return them.

Why

EPINIO-679 — git configuration functionality did not exist in the MCP server. Epinio already supports git configs via CLI, API, and UI (EPINIO-343); agents using MCP had no way to manage them.

Closes Epinio 679

What to test

Against an Epinio cluster where the caller has gitconfig_read / gitconfig_write as appropriate:

list_gitconfigs — returns git configs visible to the caller; no password/cert fields in the response.
show_gitconfig — returns details for a known id; 404/error for unknown id.
match_gitconfigs — with a prefix returns matching ids; with empty prefix returns all ids the caller can see.
create_gitconfig — creates a config with name, url, provider (e.g. github), optional username/password, skipssl, global (admin only). Confirm it appears in list_gitconfigs / show_gitconfig.
delete_gitconfig — deletes one id; batch-deletes multiple ids via names: ["a", "b"]. Confirm removed from list.
Permissions — non-admin global: true on create should fail with Epinio 403; read-only user should list/show but not create/delete.
Tests: no new unit tests in this PR. go test ./... passes locally. Dedicated client tests for gitconfig path/query encoding were descoped.

Possible regressions

None identified for existing tools. This is additive: one new tool file, client methods, and registration in RegisterCore. No changes to elevated tier, push flow, or existing CRUD tools.

Adjacent areas worth a quick smoke check: tool registration order and server startup (RegisterCore still completes without error).

Type

feature

Checklist

  • make check passes (fmt-check, vet, lint, test)
  • New or changed behavior has tests, or the test impact is noted above
  • Tool names, inputs, or outputs changed? The MCP server reference is updated
  • New or changed capability sits in the right tier: core (Epinio API only, runs as the caller) vs elevated (EPINIO_MCP_ELEVATED, reaches directly into Kubernetes and needs the standard-elevated RBAC)
  • Touches auth, credentials, or the RBAC/appchart surface? Flagged for security review
  • User-facing behavior changed? A matching PR is opened in epinio/docs
  • No secrets, tokens, or real cluster credentials committed

Expose git configuration management in the MCP server so agents can list, inspect, match, create, and delete git configs through the Epinio API.
@dcharles525
dcharles525 merged commit 2d09159 into main Aug 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants