Skip to content

MCP Integration

Rex and SourceVision expose Model Context Protocol servers for AI tool integration. This lets Claude Code (or any MCP client) query your codebase and manage your PRD directly.

Start the unified server, then register the MCP endpoints:

sh
# 1. Start the server (dashboard + MCP on one port)
ndx start .

# 2. Add HTTP MCP servers to Claude Code
claude mcp add --transport http rex http://localhost:3117/mcp/rex
claude mcp add --transport http sourcevision http://localhost:3117/mcp/sourcevision

The server runs on port 3117 by default. Custom port: --port=N or ndx config web.port N .

HTTP transport uses Streamable HTTP with session management. Sessions are created automatically and identified by the Mcp-Session-Id header.

stdio Transport

stdio spawns a separate process per MCP server. No ndx start required:

sh
# Using standalone binaries
claude mcp add rex -- rex mcp .
claude mcp add sourcevision -- sv mcp .

# Or using node directly
claude mcp add rex -- node packages/rex/dist/cli/index.js mcp .
claude mcp add sourcevision -- node packages/sourcevision/dist/cli/index.js mcp .

Migrating from stdio to HTTP

sh
# 1. Start the server
ndx start --background .

# 2. Remove old stdio servers
claude mcp remove rex
claude mcp remove sourcevision

# 3. Add HTTP servers
claude mcp add --transport http rex http://localhost:3117/mcp/rex
claude mcp add --transport http sourcevision http://localhost:3117/mcp/sourcevision

Benefits of HTTP: single process, shared port with dashboard, session management, no per-tool process overhead.

Rex MCP Tools

ToolDescription
rex_statusPRD tree with completion stats
rex_nextNext actionable task
rex_addAdd epic/feature/task/subtask
rex_updateUpdate item status/priority/title
rex_validateCheck PRD integrity
rex_analyzeScan project and propose PRD items
rex_recommendGet SourceVision-based recommendations

SourceVision MCP Tools

ToolDescription
sv_inventoryFile listing with metadata
sv_importsDependency graph for a file
sv_zonesArchitectural zone map
sv_componentsReact component catalog
sv_contextFull CONTEXT.md contents

Released under the Elastic License 2.0.