No description
Find a file
thibaud-lclr 9a52b5dce1
All checks were successful
CI / test (push) Successful in 11s
Release / release (push) Successful in 5s
feat(bootstrap): auto-hide commands with no hook configured
Commands are now hidden from help and return ErrUnknownCommand when
invoked if their hook is nil (and for version, if Version string is
also empty). No explicit DisabledCommands needed for MCPs that don't
use login/setup/config/etc.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 10:37:46 +02:00
.forgejo/workflows fix: rename .forgejo 2026-05-11 11:53:59 +02:00
bootstrap feat(bootstrap): auto-hide commands with no hook configured 2026-05-12 10:37:46 +02:00
cli chore: update module path to forge 2026-05-05 12:23:14 +02:00
cmd/mcp-framework chore: update module path to forge 2026-05-05 12:23:14 +02:00
config feat: add versioned config migrations 2026-04-13 17:28:47 +02:00
docs chore: update module path to forge 2026-05-05 12:23:14 +02:00
generate chore: update module path to forge 2026-05-05 12:23:14 +02:00
manifest chore: update module path to forge 2026-05-05 12:23:14 +02:00
scaffold chore: update module path to forge 2026-05-05 12:23:14 +02:00
secretstore chore: update module path to forge 2026-05-05 12:23:14 +02:00
update fix(update): reject HTML artifacts during self-update 2026-04-15 14:23:15 +02:00
.gitignore update .gitignore 2026-04-13 15:47:20 +02:00
AGENTS.md docs(agents): enforce enhancement branch naming format 2026-04-14 08:31:08 +02:00
go.mod chore: update module path to forge 2026-05-05 12:23:14 +02:00
go.sum feat: add toml manifest loader for mcp projects 2026-04-13 15:52:00 +02:00
README.md chore: update module path to forge 2026-05-05 12:23:14 +02:00

mcp-framework

mcp-framework est une bibliothèque Go et un petit CLI pour construire des binaires MCP avec une base commune : CLI, configuration locale, secrets, manifeste mcp.toml, diagnostic et auto-update.

Installation

Dans un projet Go :

go get forge.lclr.dev/AI/mcp-framework

Pour utiliser le CLI :

go install forge.lclr.dev/AI/mcp-framework/cmd/mcp-framework@latest

Créer un projet MCP

mcp-framework scaffold init \
  --target ./my-mcp \
  --module example.com/my-mcp \
  --binary my-mcp \
  --profiles dev,prod

cd my-mcp
go mod tidy
go run ./cmd/my-mcp help

Le scaffold crée une arborescence prête à adapter :

cmd/<binary>/main.go
internal/app/app.go
mcp.toml
install.sh
README.md

Générer la glue depuis mcp.toml

Dans un projet qui possède un mcp.toml à la racine :

mcp-framework generate

La commande génère un package mcpgen/ avec un loader de manifeste embarqué, des helpers de métadonnées, update, secret store, et des helpers de config si [[config.fields]] est déclaré.

En CI :

mcp-framework generate --check

Utiliser les packages

Les packages peuvent être utilisés séparément :

  • bootstrap : CLI commune (setup, login, mcp, config, update, version).
  • cli : résolution de profil, setup interactif, résolution flag/env/config/secret, doctor.
  • config : stockage JSON versionné dans le répertoire de config utilisateur.
  • manifest : lecture de mcp.toml et fallback embarqué.
  • secretstore : keyring natif, environnement ou Bitwarden CLI.
  • update : téléchargement et remplacement du binaire depuis une release.
  • scaffold : génération d'un squelette de projet.
  • generate : génération de code Go depuis mcp.toml.

Documentation