Skip to content

fix: correct MCP server entry in init + add config tests - #49

Closed
TerminalGravity wants to merge 1 commit into
mainfrom
fix/mcp-server-entry-and-config-tests
Closed

fix: correct MCP server entry in init + add config tests#49
TerminalGravity wants to merge 1 commit into
mainfrom
fix/mcp-server-entry-and-config-tests

Conversation

@TerminalGravity

Copy link
Copy Markdown
Collaborator

What

The preflight init command was generating a broken .mcp.json entry that used npx -y tsx node_modules/preflight/src/index.ts — a path that doesn't resolve when installed via npx.

Fix

  • Added bin/serve.js as dedicated MCP server entry point
  • Added preflight-serve bin to package.json
  • Fixed init to generate: npx --package preflight-dev@latest preflight-serve

Also

Added 6 tests for the config system which had zero coverage (defaults, env vars, YAML loading, error handling).

All 49 tests pass.

- Fix .mcp.json generation: was using broken path (npx tsx node_modules/...),
  now correctly uses 'npx --package preflight-dev@latest preflight-serve'
- Add bin/serve.js as dedicated MCP server entry point
- Add 'preflight-serve' bin to package.json
- Add 6 tests for config system (defaults, env vars, yaml loading, error handling)

@TerminalGravity TerminalGravity left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Node 18 failure is expected since engine requirement moved to >=20. Node 20 passes. Ready to merge — the MCP server entry fix and config tests are both solid.

@TerminalGravity

Copy link
Copy Markdown
Collaborator Author

Closing — superseded by newer PRs.

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