Skip to content

feat(mcp): mcp serve should accept --project/-p <path> to target a noorm project #39

@damusix

Description

@damusix

Problem

noorm mcp serve takes no arguments (src/cli/mcp/serve.ts) and resolves the target project from the process working directory — findProjectRoot() walks up from process.cwd() looking for .noorm. So which project the MCP server binds to is decided by wherever the process happens to launch, which does not work well when running one MCP server per project across a realm of noorm projects.

Current workaround

A global -c, --cwd <path> flag already exists (src/cli/index.ts:48, git -C style): noorm -c /path/to/project mcp serve works today. But:

  • It must precede the subcommand, which is awkward and error-prone in MCP client config (command + args array).
  • It is a global flag, invisible from noorm mcp serve --help.

Proposed

Add --project / -p <path> to mcp serve pointing the server at a specific noorm project root, independent of cwd.

  • Resolution precedence: --project > global --cwd > cwd discovery.
  • Validate the path holds a .noorm project; error clearly otherwise.
  • Surface the option in noorm mcp serve --help.

Use case

Running multiple MCP servers — one per noorm project — across a realm, each client entry pointing at its own project path without relying on launch cwd.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions