fracta config mcp is the entry point for catalog management and per-mode
server wiring. It is part of the broader fracta config umbrella for
project-config commands.
Command tree
fracta mcp <verb> form is preserved as a deprecation alias for one
minor release — see fracta mcp (deprecated alias) for the
remapping table and a sed one-liner.
fetch
Populates <root>/mcp-servers/ from a catalog source. Operators commit the
result.
Pre-flight summary
--yes.
Last-source memoization
After a successful plain (non-merge)fetch, the source spec used is
written to <root>/mcp-servers/.fracta-source. Subsequent fetch
invocations without a positional argument default to that recorded value
rather than the global default. To re-establish the canonical source:
--merge does NOT update .fracta-source — it’s a one-shot overlay.
list
Lists every MCP server in the local catalog, grouped by deployment mode.
<root>/mcp-servers/ is missing or empty:
--target-deployment all):
--remote
Compares the local catalog against the canonical remote (github:darkquasar/fracta@main).
Read-only — never writes to the project tree. Output uses catalog.yaml’s
version: for the REMOTE column:
"remote unavailable: <error>" on stderr and
exits 0 with the local-only view.
inspect <server>
Full per-server metadata.
add <server>
Performs the per-mode hand-edits operators do today, deterministically and
idempotently, after explaining what running/building/pulling will be needed.
By default add operates on the surrounding fracta project (walks up for
.fracta/) and derives the target mode from which scaffolds are enabled. To
run outside a fracta project — adding a backend to a remote deployment from a
non-project directory — supply --target-deployment plus the relevant
standalone-mode path flag(s) listed below.
Per-mode write contract
| Mode | Files touched |
|---|---|
local | <root>/fracta.yaml (mcp_servers.servers.<id>.local) |
docker-compose | <root>/fracta.yaml (.remote), <root>/deployment/docker-compose.yml (services.<id>-mcp), <root>/.env.example |
k8s | <root>/fracta.yaml (.remote), <root>/deployment/k8s/manifests/<id>-mcp.yaml (Deployment+Service), <root>/deployment/k8s/manifests/<id>-mcp-secret.yaml (Secret stub — only if auth.env_required non-empty) |
fracta.yaml and docker-compose.yml mutations are atomic, idempotent,
and comment-preserving. Reads decode to *yaml.Node; writes round-trip
through gopkg.in/yaml.v3; commits are temp+fsync+rename.
add is a strict layer on top of fracta init --scaffold <mode>. It
refuses to mutate a project that hasn’t scaffolded the chosen mode, with an
explicit error pointing at the prereq command.
Rollback
For multi-file mutations (compose/k8s), each mutation writes a transient.bak immediately before applying, then removes it on success. On any
failure, the rollback restores from .bak and removes newly-written files.
Successful add leaves no .bak files.
Standalone mode
When any of--config, --compose-file, --k8s-manifest-dir, or
--catalog-dir is supplied, add runs in standalone mode: no project
walk-up happens, and the project’s scaffold state isn’t consulted.
In standalone mode:
-
--target-deploymentis required (no project state to infer from). -
The relevant path flag for the chosen mode must be supplied:
Mode Required flag local--config <fracta.yaml path>docker-compose--compose-file <docker-compose.yml path>(--configis also accepted for thefracta.yamlblock)k8s--k8s-manifest-dir <dir>(and--configfor thefracta.yamlblock) -
The
.env.exampleside-effect (compose mode) is dropped — the operator owns env-var declaration when running standalone.
fracta-test-server to a k8s deployment whose ConfigMap and
manifests live in a separate directory:
add falls back to the project-walk-up
behaviour — useful when you’re inside a fracta project and want the default
paths.
manifest <server>
Renders the deployment artifacts for an MCP backend from the catalog to
stdout. Does not require a fracta project directory and does not
write any files — pipe to kubectl apply -f -, paste into a compose file,
or capture for review.
Output formats
-o value | Emits | Variant must declare |
|---|---|---|
k8s (default) | Deployment + Service YAML, ready for kubectl apply -f - | image |
compose | A single docker-compose services.<id>-mcp: block | image |
fracta-yaml | An mcp_servers.servers.<id>: snippet for fracta.yaml | image or url |
Examples
Render a Deployment+Service for the bundled test server and apply it:fracta.yaml snippet to add to an existing project by hand:
When to use manifest vs add
manifest | add | |
|---|---|---|
| Side effects | None — stdout only | Writes files; can be rolled back |
| Project required | No | No (with standalone flags); yes (without) |
| Idempotency | Trivial (pure function) | Yes — re-running is a no-op |
| Use for | Inspection, CI templating, ad-hoc deploys | Committing config to a fracta project |
manifest output into your editor repeatedly,
that’s a sign add (or add with standalone flags) is the right tool.
tool
Per-tool enable/disable + policy inspection. See Gateway Tool Policy
for the operator narrative.
enable / disable write to the registry store (postgres or sqlite,
depending on the backend) — they’re the imperative override for individual
tools. The declarative path is tool_policy: in fracta.yaml; see the
gateway tool policy guide.
remove <server>
Reverse of add.
add then remove --yes returns the project byte-identical to pre-add
state (modulo filesystem timestamps).
auth
Identical semantics to the old fracta mcp group; only the path moved and
auth-status was renamed to status. See the auth reference page
for full credential-store and OAuth-flow details.
The --config <yaml> flag (required for in-cluster OAuth)
fracta config mcp auth login and fracta config mcp auth export read the
target server’s definition from a YAML file rather than introspecting a
running gateway. Pass --config <path> to point them at one.
- In deployments where the in-cluster gateway ConfigMap is the source of
truth (Kubernetes, Docker Compose), the host’s
fracta.yamltypically describes only the thin-client control-plane connection — it does NOT list the OAuth servers. Without--config, the CLI errors withserver "<name>" not found in config. - The recommended pattern is a tiny throwaway
<server>-login.yamlper server, describing only the OAuth endpoint shape (no token file paths). The CLI uses it to drive the OAuth dance; the tokens land in your OS keyring, andfracta config mcp auth export --format k8s-secret --config <server>-login.yamlrenders them as a Kubernetes Secret you can apply.
Authoring contract
The catalog at<root>/mcp-servers/ is operator-owned, git-tracked
configuration — first-class checked-in config, not a runtime cache.
Operators commit it and review changes in PRs.
Trust model
| Source | Trust boundary |
|---|---|
Default (github:darkquasar/fracta@main) | darkquasar/fracta GitHub repo. Use --source-checksum for tarball pinning. |
| Custom github source | The org/user that owns the repo. |
| HTTPS tarball | The host serving it. --source-checksum recommended. |
| Local directory | The operator. |
add is interactive and surfaces image refs in the pre-flight
summary — operators audit before writing.
catalog.yaml version:
The version: field at the top of catalog.yaml is the catalog’s own
version, independent of fracta releases. Maintainers bump it on
additions/removals/promotions. list --remote surfaces it in the REMOTE
column. fracta config mcp reads but does not write this field.

