Lightweight Sequential Thinking MCP Server
2.2K
Sequential Thinking is a Model Context Protocol (MCP) server that operationalizes deliberate reasoning. It lets MCP clients create structured thinking sessions, capture sequential steps (analysis → hypothesis → verification → conclusion), branch into alternative lines of thought, and export or audit the full chain of reasoning.
bpradana/sequentialthinking.go mod download
go build -o sequentialthinking ./cmd/sequentialthinking
./sequentialthinking
The binary listens on stdio and is ready to be launched by MCP-aware clients.
./sequentialthinking -http :8080
The -http flag enables streamable HTTP transport on the supplied address.
docker pull bpradana/sequentialthinking
docker run --rm -i bpradana/sequentialthinking
-i keeps stdin open so MCP clients can speak stdio with the containerised server.
docker build -t sequentialthinking .
docker run --rm sequentialthinking
The multi-stage Dockerfile builds a static binary and runs it from a scratch image (UID 65532).
npm install -g @modelcontextprotocol/inspector
mcp-inspector ./sequentialthinking
{
"mcpServers": {
"sequentialthinking": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"bpradana/sequentialthinking"
]
}
}
}
docker pull bpradana/sequentialthinking. Claude keeps the container alive while the MCP session is active and re-creates it on demand.Once connected (Inspector, Claude, or another MCP client), call the sequentialthinking.start_from_template tool to seed a new session:
{
"name": "sequentialthinking.start_from_template",
"arguments": {
"template": "scientific-method",
"problem": "Why did the nightly build fail?",
"context": {
"repo": "widgets-service",
"last_green_commit": "abc1234"
}
}
}
The server responds with the new session_id, populated steps from the requested template, and suggested next actions. Subsequent calls can extend or branch the reasoning as usual.
| Tool | Purpose | Notable Arguments |
|---|---|---|
start_thinking | Create a new session with initial analysis and suggested next steps. | problem, optional context, optional tags |
start_from_template | Create a session seeded with a predefined thinking template. | template, optional problem, optional context, optional tags |
add_step | Append a reasoning step to the main flow or a branch. | session_id, optional branch_id, step_type, step_content |
update_step | Edit an existing step’s content, type, or metadata. | session_id, step_number, optional fields to update |
review_thinking | Retrieve the full chain, connections, patterns, and summary. | session_id, optional format (linear, tree, summary) |
branch_thinking | Fork the reasoning path from an existing step and seed a branch. | session_id, from_step, alternative_reasoning |
merge_insights | Synthesize conclusions across multiple branches. | session_id, branch_ids |
validate_logic | Flag logical issues and describe strengths. | session_id, optional range_start, range_end |
export_session | Export a session as markdown, JSON, or plain text. | session_id, optional include_branches, format |
list_sessions | Filterable session directory with quality scores. | optional status, tags, limit |
delete_session | Remove a session. | session_id |
get_metrics | Aggregate reasoning metrics across sessions. | optional time_range (day, week, month, all) |
Resources
thinking://session/{session_id} – JSON snapshot of a single session.thinking://sessions/list – JSON list of all sessions in memory.thinking://template/{template_type} – JSON representation of thinking frameworks (scientific-method, five-whys, root-cause-analysis, decision-matrix, swot-analysis, pros-cons, first-principles, fishbone, pareto-analysis).Prompts
problem_breakdown – Structures complex problem decomposition.critical_analysis – Guides evaluation of claims and evidence.synthesis_prompt – Helps combine multiple insights into coherent output.analysis, hypothesis, verification, conclusion. Parent references and connection tracking let clients build reasoning graphs.[0,1] and recompute after each update.internal/thinking.MemoryStore) guarded by RW mutexes. Sessions are ephemeral and cleared on restart.log/slog for initialization messages and mcp.LoggingTransport for stdio diagnostics.# Run unit and integration tests
go test ./...
# Format and lint
go fmt ./...
golangci-lint run # optional, if installed
cmd/sequentialthinking CLI entry point and flag parsing
internal/server MCP server assembly, transports, integration tests
internal/handlers Tool, resource, prompt handlers and helper logic
internal/thinking Core domain types, in-memory store, exports, metrics
CGO_ENABLED=0 for static binaries (already used in Dockerfile).internal/server.New when publishing server changes.MIT License (use repository root LICENSE if present).
Content type
Image
Digest
sha256:acae72fd2…
Size
2.2 MB
Last updated
11 months ago
docker pull bpradana/sequentialthinking