Skip to content

feat(cli): start the MCP server through npx - #364

Merged
TMHSDigital merged 4 commits into
TMHSDigital:mainfrom
Imhamza86:feat/npx-mcp-command
Dec 4, 2026
Merged

TMHSDigital merged 4 commits into
TMHSDigital:mainfrom
Imhamza86:feat/npx-mcp-command

Conversation

@Imhamza86

Copy link
Copy Markdown
Contributor

Summary

Adds an mcp subcommand to the existing fgda CLI so the MCP server can be launched through npx without asking users to clone the repository or configure a local script path.

  • Reuses the existing stdio MCP server and exports its entry point for the CLI.
  • Supports forwarding --data to the MCP server.
  • Documents an npx MCP client configuration.
  • Adds coverage for the exported entry point and CLI dispatch.

Fixes #362

Validation

Added focused tests to the repository's existing site/lib/lib.test.mjs suite. I could not execute npm run check in this environment, so no local test or build result is claimed. The repository's CI should provide the full check; first-time contributor runs may need maintainer approval.

@TMHSDigital
TMHSDigital merged commit 84c9d56 into TMHSDigital:main Dec 4, 2026
2 checks passed
@TMHSDigital

Copy link
Copy Markdown
Owner

Merged in 84c9d56, thanks. Two changes on our side: the overlap with #366 in site/cli/mcp.mjs is resolved so main(argv) parses its own arguments in strict mode, and the run guard in both CLI files now compares real paths. Without that second change the npx command in the docs did nothing on Linux and macOS (#334), since npm starts a package bin through a symlink. The full check passed locally and the CLI ran through a symlink.

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.

Start the MCP server through npx, like the CLI

2 participants