Skip to content

feat(init): register the redis MCP server per agent and unhide the command - #1104

Draft
VaskoAtanasovRedis wants to merge 2 commits into
feat/init/6-project-skillfrom
feat/init/7-mcp
Draft

feat(init): register the redis MCP server per agent and unhide the command#1104
VaskoAtanasovRedis wants to merge 2 commits into
feat/init/6-project-skillfrom
feat/init/7-mcp

Conversation

@VaskoAtanasovRedis

@VaskoAtanasovRedis VaskoAtanasovRedis commented Aug 13, 2026

Copy link
Copy Markdown

Stacked on #1103. MCP registration per agent - and the slice that unhides redisctl init.

  • Writes .mcp.json / .cursor/mcp.json / .vscode/mcp.json (servers + type: stdio); codex is user-scoped and skipped, the skills cover it.
  • Credential-free by construction: a sh -c 'set -a; . ./.env ...' launcher sources .env when the agent starts the server; tests assert no URL value ever lands in a committed config.
  • Runner: uvx preferred, else a docker run mcp/redis bridge with ://-anchored host.docker.internal rewrites; with neither, the config is written for uvx and a note points at installing uv.
  • Merges preserve foreign servers; a different existing redis entry is replaced with its old command masked in the note; invalid JSON is kept untouched (the PoC crashed here).
  • The command unhides and gets a docs page; the generated skill gains its MCP tooling line.

Deviation: rewritten config files come out key-sorted (serde_json without preserve_order; enabling it would change ordering workspace-wide). Only files we actually modify are affected.

Verify: redisctl init --agent claude,vscode --no-install-cli; grep -c 'redis://' .mcp.json prints 0; re-run reads unchanged.

…mmand

Each targeted agent's project config (.mcp.json, .cursor/mcp.json,
.vscode/mcp.json with type stdio) gains a credential-free redis server:
a sh launcher sources .env at start, so the URL never lands in a
committed file. The runner prefers uvx and falls back to a Docker
bridge (host.docker.internal rewrite); with neither, the config is
still written for uvx and a note says so. Codex is user-scoped and
reported skipped. Existing configs are merged, foreign servers survive,
a replaced redis entry is reported with its old command masked, and
invalid JSON is left untouched.

The default onboarding path is now complete end to end, so the command
leaves hiding and gets its docs page.
The launcher gains --add-host=host.docker.internal:host-gateway (Linux
Engine does not define that name; Docker Desktop has it built in), and
the URL rewrites anchor on :// so a password or a foo.localhost host
can never be rewritten.

Also in this slice's scope:
- tests asserting agent-specific MCP files pin --agent claude instead
  of relying on machine detection (test(init): pin --agent in MCP
  assertions); the live full-run assertion follows the solo-Claude
  layout to .claude/skills
- the docs describe the one deliberate overwrite: a differing redis MCP
  entry is replaced with its old command masked, env/skill files stay
  kept (docs(cli): describe MCP replace vs env kept)
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.

1 participant