MCP server for interleaved sequential thinking with dynamic tool calling
npm install @jochenyang/interleaved-thinkingthought (string): Your current thinking content
stepNumber (integer): Current step number (starts from 1)
totalSteps (integer): Estimated total steps needed
nextStepNeeded (boolean): Whether another step is needed
phase (enum): Current phase - 'thinking', 'tool_call', or 'analysis'
toolCall (object):
toolName (string): Name of the tool to execute
parameters (object): Tool parameters as key-value pairs
metadata (object, optional): timeout, retryCount, priority
isRevision (boolean): Whether this revises previous reasoning
revisesStep (integer): Which step is being reconsidered
branchFromStep (integer): Branching point step number
branchId (string): Branch identifier
needsMoreSteps (boolean): If more steps are needed
json
{
"interleaved-thinking": {
"command": "cmd",
"args": [
"/c",
"npx",
"@jochenyang/interleaved-thinking@latest"
],
"env": {},
"type": "stdio"
}
}
`
#### Usage with Cursor
Add this to your Cursor MCP settings:
`json
{
"mcpServers": {
"interleaved-thinking": {
"command": "npx",
"args": [
"-y",
"@jochenyang/interleaved-thinking"
]
}
}
}
`
#### Usage with Kiro
Add this to your Kiro MCP configuration:
`json
{
"mcpServers": {
"interleaved-thinking": {
"command": "npx",
"args": [
"-y",
"@jochenyang/interleaved-thinking"
]
}
}
}
`
#### Usage with VS Code
For manual installation, add the configuration to .vscode/mcp.json in your workspace:
`json
{
"servers": {
"interleaved-thinking": {
"command": "npx",
"args": [
"-y",
"@jochenyang/interleaved-thinking"
]
}
}
}
`
#### Docker
`json
{
"mcpServers": {
"interleaved-thinking": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"jochenyang/interleaved-thinking"
]
}
}
}
`
$3
- DISABLE_THOUGHT_LOGGING: Set to true to disable console logging (default: false)
$3
#### NPM
`bash
npm install
npm run build
`
#### Docker
`bash
docker build -t jochenyang/interleaved-thinking -f Dockerfile .
`
$3
`typescript
// Phase 1: Thinking
{
"thought": "I need to analyze this problem step by step",
"stepNumber": 1,
"totalSteps": 5,
"nextStepNeeded": true,
"phase": "thinking"
}
// Phase 2: Tool Call
{
"thought": "Now I need to fetch some data",
"stepNumber": 2,
"totalSteps": 5,
"nextStepNeeded": true,
"phase": "tool_call",
"toolCall": {
"toolName": "fetch_data",
"parameters": {
"query": "example"
}
}
}
// Phase 3: Analysis
{
"thought": "Based on the tool results, I can now conclude...",
"stepNumber": 3,
"totalSteps": 5,
"nextStepNeeded": false,
"phase": "analysis"
}
``