Skip to content

Add fx MCP install target - #234

Merged
masnwilliams merged 2 commits into
mainfrom
hypeship/add-fx-mcp-target
Aug 24, 2026
Merged

Add fx MCP install target#234
masnwilliams merged 2 commits into
mainfrom
hypeship/add-fx-mcp-target

Conversation

@masnwilliams

@masnwilliams masnwilliams commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add fx as a kernel mcp install target
  • write Kernel's Streamable HTTP and OAuth configuration to ~/.fx/mcp.json
  • preserve existing fx MCP servers and secure the profile directory and file
  • print fx-specific authentication and verification steps

Testing

  • make test
  • built the CLI and smoke-tested kernel mcp install --target fx with a clean home directory
  • verified generated permissions are 0700 for ~/.fx and 0600 for mcp.json
  • git diff --check

Note

Low Risk
Local CLI config-file writes only; no auth, network, or shared-service changes. Restrictive file modes slightly reduce risk of leaking MCP config.

Overview
Adds fx as a kernel mcp install target so Kernel can be registered as an HTTP MCP server with OAuth in ~/.fx/mcp.json.

Install merges a kernel entry into the existing mcp map without dropping other servers, writes the file with 0600 (and 0700 for a newly created ~/.fx), and prints fx-specific reload/auth/verify steps. Tests cover merge behavior and permission handling.

Reviewed by Cursor Bugbot for commit 0e50188. Bugbot is set up for automated code reviews on this repo. Configure here.

@masnwilliams
masnwilliams requested a review from rgarcia August 23, 2026 21:41

@rgarcia rgarcia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed — looks good, approving. one suggestion worth considering before/after merge:

Suggestions

  • cmd/mcp/mcp.go:248-250 — the unconditional Chmod(dir, 0700) repermissions a pre-existing ~/.fx that holds unrelated profile state (and on non-macOS, the credential store). Security value is near-zero once the file itself is 0600 — a world-readable dir only leaks filenames. Consider dropping it so existing dirs keep their permissions; MkdirAll(dir, 0700) already covers the create-new case.

Nits

  • cmd/mcp/mcp_test.go:17 / cmd/mcp/mcp_test.go:82-87 — the test pre-creates the dir at 0755 and then asserts 0700, which currently requires the unconditional chmod above. Update alongside any change to writePrivateJSONFile.
  • cmd/mcp/mcp_test.go — no coverage for the clean-install path (no pre-existing file/dir); a second small case would lock in create-at-0700/0600 behavior.

Follow-up (not this PR)

  • other targets' configs also hold tokens (~/.claude.json especially) — worth a follow-up ticket to apply private-perm writes there

Also verified the fx integration against fx's published MCP docs (fx.sh/docs/capabilities/mcp): config path/schema, "type": "http" + url, empty oauth object selecting delegated user authorization, and all three /mcp commands in the post-install copy match exactly.

@masnwilliams
masnwilliams merged commit 1a2c351 into main Aug 24, 2026
7 checks passed
@masnwilliams
masnwilliams deleted the hypeship/add-fx-mcp-target branch August 24, 2026 02:48
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