Sequential Thinking MCP
zerodb-sequential-thinking-mcp gives AI agents persistent, structured reasoning that survives across sessions, machines, and agent restarts. Built on ZeroDB plan artifacts.
npx zerodb-sequential-thinking-mcp
No account required. The first run automatically provisions a ZeroDB account. The second run is silent.
Why This Exists
The upstream sequential-thinking MCP is stateless — every session starts fresh. This server adds:
- Persistence — reasoning chains written to ZeroDB plan artifacts, survives restarts
- Cross-session resume — Agent B can pick up where Agent A left off using an
artifact_id - Self-provisioning — no account signup required to install and run
- Multi-agent sharing — multiple agents share the same reasoning namespace via
ZERODB_PROJECT_ID
Tools
sequential_think
Add a reasoning step to a chain.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
thought | string | yes | The reasoning step content |
chain_id | string | no | Chain identifier (auto-generated if omitted) |
step_number | number | no | Explicit step number |
total_steps | number | no | Estimated total steps |
next_thought_needed | boolean | no | Whether more steps are expected |
Returns: { chain_id, step_number, thought }
Example:
{
"thought": "The root cause is connection pool exhaustion — PgBouncer is capped at 20 connections but we have 4 instances each holding 10.",
"chain_id": "debug-pool-issue",
"step_number": 2,
"total_steps": 5,
"next_thought_needed": true
}
sequential_conclude
Finalize a reasoning chain and persist it as a ZeroDB plan artifact. Returns an artifact_id that can be used to resume the chain in a future session.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
chain_id | string | yes | Chain to conclude |
conclusion | string | yes | Final conclusion or decision |
Returns:
{
"artifact_id": "cd6e95d9-0260-4f04-b817-ee461cf367f8",
"step_count": 5,
"resume_hint": "Use sequential_resume with artifact_id=\"cd6e95d9...\" to continue in a future session"
}
The artifact_id is stable — save it to resume this chain from any session or agent.
sequential_resume
Load a prior reasoning chain by artifact ID. Use at the start of a session to continue where a previous agent left off.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
artifact_id | string | yes | Artifact ID from a previous sequential_conclude |
Returns: Full prior reasoning chain content and step count.
Self-Provisioning
The first time the server boots with no credentials configured, it calls:
POST https://api.ainative.studio/api/v1/public/instant-db
This creates a temporary ZeroDB account (~800ms) and writes credentials atomically to ~/.zerodb/credentials.json. Subsequent boots load from the file silently.
Credential Lifecycle
| State | Behavior |
|---|---|
| Temporary | Auto-provisioned, expires in 7 days |
| Claimed | User claimed via link, permanent |
| Expired | Re-provisioned automatically on next boot |
To claim your account and make it permanent, set ZERODB_EMAIL:
{
"env": {
"ZERODB_EMAIL": "you@example.com"
}
}
The server sends a claim link to your email on next boot.
Bring Your Own Credentials
If you already have a ZeroDB account, skip provisioning entirely:
{
"env": {
"ZERODB_API_KEY": "zdb_live_your-key",
"ZERODB_PROJECT_ID": "your-project-id"
}
}
Configuration
Claude Code
{
"mcpServers": {
"sequential-thinking": {
"command": "npx",
"args": ["-y", "zerodb-sequential-thinking-mcp"]
}
}
}
With existing ZeroDB account
{
"mcpServers": {
"sequential-thinking": {
"command": "npx",
"args": ["-y", "zerodb-sequential-thinking-mcp"],
"env": {
"ZERODB_API_KEY": "zdb_live_your-key",
"ZERODB_PROJECT_ID": "your-project-id",
"ZERODB_BASE_URL": "https://api.ainative.studio"
}
}
}
}
Multi-agent swarm (shared reasoning)
{
"mcpServers": {
"agent-alpha": {
"command": "npx",
"args": ["-y", "zerodb-sequential-thinking-mcp"],
"env": {
"ZERODB_CONFIG_DIR": "/shared/zerodb",
"ZERODB_PROJECT_ID": "shared-project-id"
}
},
"agent-beta": {
"command": "npx",
"args": ["-y", "zerodb-sequential-thinking-mcp"],
"env": {
"ZERODB_CONFIG_DIR": "/shared/zerodb",
"ZERODB_PROJECT_ID": "shared-project-id"
}
}
}
}
Both agents share the same credentials file and project namespace. Agent A's concluded chains are immediately resumable by Agent B.
Cross-Session Example
Session 1 — Agent A investigates:
sequential_think("The API is returning 503s. Checking Kong logs...")
sequential_think("Kong http-log plugin is retrying on 404 — creating a retry storm.")
sequential_think("Disabling the plugin stops the storm. Root cause confirmed.")
sequential_conclude(chain_id="kong-debug", conclusion="Disable http-log plugin, redeploy Kong.")
→ artifact_id: "cd6e95d9-0260-4f04-b817-ee461cf367f8"
Session 2 — Agent B implements the fix:
sequential_resume(artifact_id="cd6e95d9-0260-4f04-b817-ee461cf367f8")
→ Returns Agent A's full reasoning chain
sequential_think("Updating kong.yml to remove http-log plugin...")
sequential_conclude(chain_id="kong-fix", conclusion="Deployed. 503s resolved.")
Related
- ZeroDB Memory MCP — the plan artifact tools this server builds on
- ZeroDB Overview — the underlying data layer
- GitHub