An MCP (Model Context Protocol) server for structured problem-solving with context persistence, task management, and multi-tenant HTTP support.
- Break down complex problems into manageable steps
- Revise and refine thoughts as understanding deepens
- Branch into alternative paths of reasoning
- Adjust the total number of thoughts dynamically
- Context Persistence: Automatically save thinking sessions for future reference
- Task Tracking: Commit and track tasks as they are completed
- Auto-Documentation: Generate documentation when thinking sessions complete
- Session Management: List and retrieve historical sessions
- STDIO: For local MCP client integration (Claude Desktop, Cline, etc.)
- HTTP: For cloud/multi-tenant deployment with session management
# Install dependencies
npm install
# Build
npm run buildnpm start# Environment variable
TRANSPORT_MODE=http PORT=3000 npm start
# Or using the npm script
npm run start:http# HTTP mode (default) - for cloud deployment
docker-compose up -d
# STDIO mode - for local MCP clients
docker-compose --profile stdio up devpattern-stdio
# View logs
docker-compose logs -f
# Stop
docker-compose down{
"mcpServers": {
"devpattern": {
"command": "node",
"args": ["path/to/dist/index.js"],
"env": {
"DATA_PATH": "/path/to/data",
"TRANSPORT_MODE": "stdio"
}
}
}
}{
"mcpServers": {
"devpattern": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "TRANSPORT_MODE=stdio",
"-v", "/path/to/data:/data",
"ghcr.io/agiprolabs/devpattern:latest"
]
}
}
}{
"mcpServers": {
"devpattern": {
"url": "http://localhost:3000/mcp"
}
}
}The main thinking tool with extended features:
Inputs:
thought: Current thinking stepnextThoughtNeeded: Whether another thought step is neededthoughtNumber: Current thought numbertotalThoughts: Estimated total thoughts neededisRevision: Whether this revises previous thinkingbranchId: Branch identifier for alternative pathssessionId: (Optional) Session ID for persistencetaskContext: (Optional) Task tracking context
Retrieve persisted context for a session.
List all thinking sessions with status.
┌─────────────────────────────────────────┐
│ MCP Client (AI) │
└─────────────────┬───────────────────────┘
│ STDIO or HTTP
▼
┌─────────────────────────────────────────┐
│ DevPattern MCP Server │
│ ┌───────────────────────────────────┐ │
│ │ Layer 1: Sequential Thinking Core │ │
│ └───────────────┬───────────────────┘ │
│ ▼ │
│ ┌───────────────────────────────────┐ │
│ │ Layer 2: Context & Task Manager │ │
│ └───────────────┬───────────────────┘ │
└──────────────────┼──────────────────────┘
▼
Volume: /data
▲
│ (For cloud deployment)
┌──────────────────┴──────────────────────┐
│ Cloudflare Tunnel │
│ tenant-xxx.devpattern.agi.pro → :3000 │
└─────────────────────────────────────────┘
| Variable | Description | Default |
|---|---|---|
TRANSPORT_MODE |
stdio or http |
stdio |
PORT |
HTTP port (when http mode) |
3000 |
HOST |
Bind address | 0.0.0.0 |
DATA_PATH |
Path for persistent storage | ./data |
DISABLE_THOUGHT_LOGGING |
Disable console output | false |
When running in HTTP mode:
| Endpoint | Method | Description |
|---|---|---|
/mcp |
POST | MCP JSON-RPC requests |
/mcp |
GET | SSE stream for notifications |
/mcp |
DELETE | Close session |
/health |
GET | Health check |
# Watch mode
npm run dev
# Run tests
npm testMIT