loading…
Search for a command to run...
loading…
MCP server that provides AI assistants with structured access to codebases via LogicStamp Context, enabling component analysis, dependency graphs, drift detecti
MCP server that provides AI assistants with structured access to codebases via LogicStamp Context, enabling component analysis, dependency graphs, drift detection, and token-optimized context delivery.
Model Context Protocol (MCP) server for LogicStamp Context, the Context Compiler for TypeScript - exposing deterministic architectural contracts to AI agents via secure, structured context delivery.
Example workflow: stamp context --strict-watch generates context bundles that MCP-powered assistants use to explain component architecture (ThemeContext shown here).
This MCP server provides AI assistants with structured access to your codebase through LogicStamp Context's analysis engine. It acts as a thin wrapper around the stamp CLI, offering:
logicstamp_refresh_snapshot - Analyze project and create snapshotlogicstamp_list_bundles - List available component bundleslogicstamp_read_bundle - Read full component contract + graphlogicstamp_compare_snapshot - Detect changes after editslogicstamp_compare_modes - Generate token cost comparison across all modeslogicstamp_read_logicstamp_docs - Read LogicStamp documentationlogicstamp_watch_status - Check if watch mode is active (for incremental rebuilds)stamp context --watch is running and skips regeneration (context is already fresh)stamp command must be installed and available in PATHnpm install -g logicstamp-context
Setup is done once - After configuring the MCP server, it will be available in all your projects. The MCP client automatically starts the server when needed - you don't need to start it manually.
Install prerequisites (if not already installed):
npm install -g logicstamp-context # Required: LogicStamp CLI
npm install -g logicstamp-mcp # MCP server
Configure your MCP client (one-time setup) - Create a config file for your platform:
For Cursor: Create ~/.cursor/mcp.json (macOS/Linux) or %USERPROFILE%\.cursor\mcp.json (Windows)
For Claude CLI: Create ~/.claude.json (macOS/Linux) or %USERPROFILE%\.claude.json (Windows)
For Claude Desktop: Create ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Add this configuration:
{
"mcpServers": {
"logicstamp": {
"command": "npx",
"args": ["-y", "logicstamp-mcp"]
}
}
}
Note: -y tells npx not to prompt (MCP clients often run the server without a terminal, so prompts can hang). Some clients may require "type": "stdio" — if the above does not work, add it to the config. See integration guides for platform-specific details:
Restart your MCP client (Cursor/Claude Desktop) or verify with claude mcp list (Claude CLI)
Start using LogicStamp:
cd /path/to/your/react-project
claude # or open Cursor
Ask your AI assistant: "Can you analyze my React project using LogicStamp?"
For detailed setup instructions, see the Quick Start Guide.
You: "Analyze the Button component in my project"
AI:
1. Uses logicstamp_refresh_snapshot to create snapshot
2. Uses logicstamp_list_bundles to find Button component
3. Uses logicstamp_read_bundle to read Button's contract
4. Provides detailed analysis of Button's props, state, hooks, etc.
For more examples and workflows, see Usage Examples in the MCP Integration Guide.
The MCP server provides 7 tools. For complete API documentation with input/output examples, see the MCP Integration Guide.
logicstamp_refresh_snapshot - Create a snapshot of the current codebase state (STEP 1)
profile (optional), mode (optional), includeStyle (optional), depth (optional), projectPath (required), cleanCache (optional), skipIfWatchActive (optional)snapshotId, summary, folders, watchMode (if active)projectPath is REQUIRED - must be an absolute path to the project root. Omitting this parameter can cause the server to hang.skipIfWatchActive: true to skip regeneration when watch mode is running. When watch mode (stamp context --watch) is active, context is already being kept fresh - no need to regeneratedepth: 1. The default depth=2 ensures nested components are included in dependency graphs.logicstamp_list_bundles - List available bundles for selective loading (STEP 2)
snapshotId (required), folderPrefix (optional)bundles array with metadatalogicstamp_read_bundle - Read full component contract and dependency graph (STEP 3)
snapshotId (required), bundlePath (required), rootComponent (optional)logicstamp_compare_snapshot - Detect changes after edits
profile (optional): Analysis profile (default: llm-chat)mode (optional): Code inclusion mode (default: header)includeStyle (optional): Include style metadata in comparison. Only takes effect when forceRegenerate is true (default: false)depth (optional): Dependency traversal depth. Only used when forceRegenerate is true. IMPORTANT: By default, dependency graphs include nested components (depth=2). To include only direct dependencies, set depth: 1. The default depth=2 ensures nested components are included in dependency graphs.forceRegenerate (optional): Force regeneration of context before comparing. When false, reads existing context_main.json from disk (fast). When true, runs stamp context to regenerate (default: false)projectPath (optional): Project path (defaults to current directory)baseline (optional): Comparison baseline: disk (default), snapshot, or custom pathcleanCache (optional): Force cache cleanup (default: false, auto-detects corruption)forceRegenerate: false), reads from disk for fast comparison. Set forceRegenerate: true to ensure fresh context or when context_main.json is missing.logicstamp_compare_modes - Generate token cost comparison across all modes
projectPath (optional), cleanCache (optional)logicstamp_read_logicstamp_docs - Read LogicStamp documentation
logicstamp_watch_status - Check if watch mode is active
projectPath (required), includeRecentLogs (optional), logLimit (optional)watchModeActive, status (if active), recentLogs (if requested), messagestamp context --watch is running before calling refresh_snapshotWhen starting work with a new project, use the Startup Ritual to guide the AI through the recommended workflow. This ensures the AI:
logicstamp_refresh_snapshot firstFull CLI & Context Documentation:
Key Topics (both primary and fallback links):
| Topic | Primary (Landing Page) | Fallback (GitHub) |
|---|---|---|
| Usage Guide | logicstamp.dev/docs/cli/usage | GitHub |
| UIF Contracts | logicstamp.dev/docs/cli/uif-contracts | GitHub |
| Schema Reference | logicstamp.dev/docs/cli/schema | GitHub |
| CLI Commands | logicstamp.dev/docs/cli/context | GitHub |
| Compare Modes | logicstamp.dev/docs/cli/compare-modes | GitHub |
| Limitations | logicstamp.dev/docs/complete-reference/known-limitations | GitHub |
Note:
logicstamp_read_logicstamp_docs tool returns an embedded LLM-focused doc snapshot (docs/logicstamp-for-llms.md) for offline use"stamp: command not found"
npm install -g logicstamp-contextServer doesn't show up
npm list -g logicstamp-mcpnpx logicstamp-mcp (should wait for stdin, press Ctrl+C to exit)"Snapshot not found"
logicstamp_refresh_snapshot first before using other toolsFor detailed troubleshooting, see:
npm install
npm run build
Important: You don't need to start the MCP server manually. Once configured, your MCP client (Cursor, Claude Desktop, etc.) automatically starts the server when needed. The commands below are only for testing/debugging.
For testing/debugging only:
After building from source:
npm start
# or directly
node dist/index.js
After global installation:
npx logicstamp-mcp
Note: The server runs via stdio (standard input/output) and waits for MCP protocol messages. When configured with an MCP client (Claude CLI, Cursor, etc.), the client automatically starts the server - you don't need to run it manually. The commands above are useful for:
When running manually, the server will wait for stdin input. Press Ctrl+C to exit.
npm run dev
For development details, see MCP Integration Guide.
The MCP server follows these design principles:
stamp CLIFor detailed architecture documentation, see MCP Integration Guide.
The LogicStamp MCP server requires:
stamp context command - Must be installed and available in PATH:context_main.json filesThe LogicStamp Fox mascot and related brand assets are © 2025 Amit Levi. These assets may not be used for third-party branding without permission.
Issues and PRs welcome! See CONTRIBUTING.md for guidelines.
This project follows a Code of Conduct.
Выполни в терминале:
claude mcp add logicstamp-mcp -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.