Node.js Requirement: >= 20
Install the LogicStamp Context CLI (this MCP server is a wrapper around it):
npm install -g logicstamp-contextVerify installation:
stamp --versionnpm install -g logicstamp-mcpcd logicstamp-mcp
npm install
npm run buildNote: After building, you can test the server with npm start or npx logicstamp-mcp (if installed globally). However, when using with an MCP client, the client automatically starts the server - you don't need to run it manually.
Setup is done once (globally): After configuring the MCP server globally, it will be available in all your projects. You don't need to set it up again for each project. However, when you analyze a project, you'll call logicstamp_refresh_snapshot for that specific project - the analysis itself is per-project, but the MCP server setup is global.
Create a config file for your platform and add this configuration:
Config file locations:
- Cursor:
~/.cursor/mcp.json(macOS/Linux) or%USERPROFILE%\.cursor\mcp.json(Windows) - Claude CLI:
~/.claude.json(macOS/Linux) or%USERPROFILE%\.claude.json(Windows) - Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json(macOS) or%APPDATA%\Claude\claude_desktop_config.json(Windows)
Configuration to add:
{
"mcpServers": {
"logicstamp": {
"command": "npx",
"args": ["logicstamp-mcp"]
}
}
}Note: Some MCP clients may require "type": "stdio". If the above doesn't work, add it:
{
"mcpServers": {
"logicstamp": {
"type": "stdio",
"command": "npx",
"args": ["logicstamp-mcp"]
}
}
}For complete step-by-step instructions, verification steps, and troubleshooting:
- Claude CLI Integration - For Claude Code users
- Claude Desktop Integration - For Claude Desktop users
- Cursor Integration - For Cursor IDE users
Each integration guide includes:
- Step-by-step installation instructions
- Global and project-specific setup options
- Local development configuration
- Verification steps
- Troubleshooting tips
When starting work with a new project, paste this message into your chat to guide the AI:
See Startup Ritual Guide for the complete message.
Best Practice: Before starting your coding session, run stamp context --watch in a terminal. This keeps context files fresh automatically and speeds up all MCP interactions.
This ritual ensures the AI:
- Checks watch mode status (or calls
logicstamp_refresh_snapshotwithskipIfWatchActive: true) - Uses
logicstamp_list_bundlesto discover available bundles - Reads bundles instead of raw source files when possible
- Understands the recommended LogicStamp workflow
Watch Mode Tip: With watch mode running, the AI automatically detects it and skips redundant regeneration for faster responses.
If the AI is confused about LogicStamp:
- Ask it to call
logicstamp_read_logicstamp_docs- this returns comprehensive documentation explaining how LogicStamp works and how to use it effectively.
cd /path/to/your/react-project
claudeThen ask Claude to analyze your project:
Can you analyze my TypeScript project using LogicStamp?
Or paste the startup ritual message first.
Completely quit and restart Claude Desktop for the changes to take effect, then start a conversation and ask Claude to analyze your project (or paste the startup ritual message).
- Open your project in Cursor
- Open Cursor's AI chat (Cmd/Ctrl + L)
- Paste the startup ritual message or ask:
Can you analyze my React project using LogicStamp?
The AI will automatically use the LogicStamp tools to analyze your codebase.
Recommended: Start watch mode (stamp context --watch) when beginning a coding session. Watch mode automatically regenerates context bundles when files change, keeping context fresh without manual regeneration. This dramatically improves MCP response times and workflow efficiency.
- Faster MCP responses - AI can skip expensive regeneration when watch mode is active
- Automatic updates - Context stays fresh as you code
- Incremental rebuilds - Only affected bundles are regenerated, not the entire project
- Better workflow - No need to manually regenerate context files
-
Start watch mode in your terminal:
stamp context --watch
-
The AI will automatically detect it - When calling
logicstamp_refresh_snapshot, useskipIfWatchActive: trueto skip redundant regeneration:{ "projectPath": "/path/to/project", "skipIfWatchActive": true } -
Check watch status - Use
logicstamp_watch_statusto verify watch mode is running:{ "projectPath": "/path/to/project" }
See Also:
- Watch Mode CLI Documentation - Complete watch mode guide
- Watch Status Command - MCP command reference
The MCP server provides 7 tools for analyzing codebases:
logicstamp_refresh_snapshot- Generate context files and create snapshot (STEP 1)logicstamp_list_bundles- List available bundles (STEP 2)logicstamp_read_bundle- Read component contracts and dependency graphs (STEP 3)logicstamp_compare_snapshot- Detect changes after editslogicstamp_compare_modes- Generate token cost comparison across all modeslogicstamp_watch_status- Check if watch mode is active (optimize refresh calls)logicstamp_read_logicstamp_docs- Read LogicStamp documentation (use when confused)
See the Tool Reference in the main README for complete API documentation.
You: Analyze the Button component in my project
Claude:
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.]
You: Analyze components with style information
Claude:
1. [Uses logicstamp_refresh_snapshot with includeStyle: true]
2. [Uses logicstamp_list_bundles to find components]
3. [Uses logicstamp_read_bundle to read component contracts with style metadata]
4. [Provides analysis including Tailwind classes, color palettes, layout patterns, animations]
"stamp: command not found"
- Install LogicStamp Context CLI:
npm install -g logicstamp-context
Server doesn't show up
- Verify installation:
npm list -g logicstamp-mcp - Check configuration in your MCP client (see integration guides above)
- Restart your MCP client completely
"Snapshot not found"
- Always call
logicstamp_refresh_snapshotfirst before using other tools
For detailed troubleshooting instructions, see the Troubleshooting section in the main README.
- Full Documentation - Complete API reference with examples
- MCP Integration Guide - Architecture and design details
- Tool Description - LogicStamp Context capabilities reference
- Integration Guides - Platform-specific setup instructions