Add fx MCP install target - #234
Merged
Merged
Conversation
rgarcia
approved these changes
Aug 23, 2026
rgarcia
left a comment
Contributor
There was a problem hiding this comment.
reviewed — looks good, approving. one suggestion worth considering before/after merge:
Suggestions
cmd/mcp/mcp.go:248-250— the unconditionalChmod(dir, 0700)repermissions a pre-existing~/.fxthat 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 towritePrivateJSONFile.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.jsonespecially) — 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fxas akernel mcp installtarget~/.fx/mcp.jsonTesting
make testkernel mcp install --target fxwith a clean home directory0700for~/.fxand0600formcp.jsongit diff --checkNote
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
fxas akernel mcp installtarget so Kernel can be registered as an HTTP MCP server with OAuth in~/.fx/mcp.json.Install merges a
kernelentry into the existingmcpmap without dropping other servers, writes the file with0600(and0700for 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.