mergeway-mcp
Run the Mergeway read-only MCP server over stdio or HTTP.
Synopsis: Run the Mergeway read-only MCP server for repository inspection.
Usage
mergeway-mcp [flags]
mergeway-mcp is a standalone binary. It does not run through mergeway-cli, and it does not expose any mutation workflow.
Flags
| Flag | Description |
|---|---|
--root | Root folder of the Mergeway repository (defaults to .). |
--transport | MCP transport: stdio or http (defaults to stdio). |
--http-listen | Listen address for HTTP transport (defaults to 127.0.0.1:8080). |
--http-base-path | Base path for HTTP transport (defaults to /). Only valid with --transport=http. |
--entity | Allow only the named exact entity. Repeat the flag to build an allow-list. |
Behavior
- The server is read-only. It exposes repository inspection tools and does not support create, update, or delete operations.
--entityuses exact entity names. AllowingAnimaldoes not implicitly exposeDog.- Repository state reloads on each request, so changes made after server startup become visible on later calls.
- In
stdiomode, keep stdout protocol-only. Any extra text written to stdout will break the MCP session.
Examples
Start the default stdio server rooted at the current repository:
mergeway-mcp
Point the server at a different repository root:
mergeway-mcp --root examples/full
Expose only the User and Post entities to the client:
mergeway-mcp --root examples/full --entity User --entity Post
Serve the MCP endpoint over HTTP on the default local address:
mergeway-mcp --root examples/full --transport=http
Serve HTTP from a custom mount path:
mergeway-mcp --root examples/full --transport=http --http-listen 127.0.0.1:9090 --http-base-path /mcp
Tool Surface
The initial tool set is intentionally narrow and read-only:
entity_listentity_showobject_listobject_getrepository_exportfiles_list
Clients should treat these tool names and their structured responses as the supported inspection surface.
Notes
- Use
stdiofor MCP clients that launchmergeway-mcpas a subprocess. - Use
httpwhen the client expects a streamable HTTP endpoint. - Bad flag combinations fail before the server starts. For example,
--http-listenand--http-base-pathrequire--transport=http.
Related Pages
- Install Mergeway — release, Go, and source installation paths.
- Use mergeway-mcp with Claude and Codex — stdio client setup examples.
- mergeway-cli Reference — repository management and CRUD commands.
- mergeway-lsp Reference — compare the MCP server with the editor-facing LSP binary.