
Cortex MCP — Multi-Level Reasoning Server
io.github.j0hanzPublished by GitHub account j0hanzv1.11.0Updated Oct 24, 2026
Multi-level reasoning MCP server with configurable depth levels
Overview
A local stdio server that gives an assistant a stateful, depth-controlled multi-step reasoning tool with inspectable session traces.
- What you can do
- Run and continue bounded reasoning sessions at basic, normal, high or expert depth, one step at a time or as a batch
- Record structured observations, hypotheses and evaluations per step, roll back to an earlier step, or end early with a conclusion
- Read live session lists, per-session JSON views, full markdown traces and individual thoughts as resources
- Use built-in prompts to start reasoning at a chosen depth, continue a session, retry a failed task, or get help
- When to use it
- Worth adding when you want the assistant to work through hard problems in explicit, bounded steps and keep a trace you can inspect or audit, rather than reasoning in a single pass.
- Requirements
- Node.js 24 or newer to run the npm package locally via npx, plus an MCP client that supports stdio transport. Docker is optional for the container image. No accounts, API keys or headers are required; optional environment variables tune session TTL, session count, token limits and trace redaction.
Installation
In SourceWeft
- Open Cortex MCP — Multi-Level Reasoning Server in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Cortex MCP
[Install in VS Code] [Install in VS Code Insiders] [Install in Visual Studio]
[Add to LM Studio] [Install in Cursor] [Install in Goose]
Multi-level reasoning MCP server with configurable depth levels, session-based state management, structured thought input, and real-time trace resources.
Overview
Cortex MCP is a stdio-only MCP server for stateful, depth-controlled reasoning. The runtime entrypoint in src/index.ts connects createServer() to StdioServerTransport, and the server surface in src/server.ts enables tools, prompts, completions, logging, and subscribable resources around a single session-based reasoning engine.
The live MCP surface confirmed by Inspector is 1 tool, 6 concrete resources, 4 resource templates, and 7 prompts. Sessions are stored in memory, exposed as MCP resources, and cleared on process restart.
Key Features
reasoning_thinksupports step-by-step sessions,run_to_completionbatches, rollback, early conclusion, and structuredobservation/hypothesis/evaluationinput.- Four depth levels are built into the engine:
basic,normal,high, andexpert, each with bounded thought ranges and token budgets. - Prompt helpers expose
reasoning.basic,reasoning.normal,reasoning.high,reasoning.expert,reasoning.continue,reasoning.retry, andget-help. - Resource endpoints expose internal docs plus live session lists, per-session JSON views, full markdown traces, and individual thought documents.
- Completions are wired for levels, session IDs, and thought names through
completable()and resource-template completion hooks.
Requirements
- Node.js
>=24for localnpxornpmusage. - An MCP client that supports
stdiotransport. - Optional: Docker if you want to build or run the container image defined by
Dockerfile.
Quick Start
Use this standard MCP client configuration:
Client Configuration
Install in VS Code
Add to .vscode/mcp.json:
Or install via CLI:
For more info, see VS Code MCP docs.
Install in VS Code Insiders
Add to .vscode/mcp.json:
Or install via CLI:
For more info, see VS Code Insiders MCP docs.
Install in Visual Studio
Add to mcp.json (VS integrated):
For more info, see Visual Studio MCP docs.
Install in Claude Desktop
Add to claude_desktop_config.json:
For more info, see Claude Desktop MCP docs.
Install in Claude Code
Add to Claude Code CLI:
Or install via CLI:
For more info, see Claude Code MCP docs.
Install in Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
For more info, see Windsurf MCP docs.
Install in Codex CLI
Add to ~/.codex/config.yaml or codex CLI:
For more info, see Codex CLI MCP docs.
Install in Augment
Add to VS Code settings.json:
Add to your VS Code
settings.jsonunderaugment.advanced.
For more info, see Augment MCP docs.
Use Cases
Start bounded reasoning at the right depth
Use reasoning.basic, reasoning.normal, reasoning.high, or reasoning.expert when the client wants a prompt-first entrypoint, or call reasoning_think directly with query, level, and the first thought. Each response returns the current session state plus a summary string that tells the client how to continue.
Relevant tool: reasoning_think
Related prompts: reasoning.basic, reasoning.normal, reasoning.high, reasoning.expert
Continue, retry, or batch an active session
Reuse sessionId to continue a prior trace, switch to runMode="run_to_completion" when you already have the remaining thought inputs, or use the continuation and retry prompts to generate the next call payload. The handler also supports rollbackToStep and isConclusion for revising or ending a trace early.
Relevant tool: reasoning_think
Related prompts: reasoning.continue, reasoning.retry
Inspect live traces without re-running the tool
Read reasoning://sessions for the active session list, reasoning://sessions/{sessionId} for the JSON detail view, reasoning://sessions/{sessionId}/trace for the markdown transcript, or reasoning://sessions/{sessionId}/thoughts/{thoughtName} for a single thought. This lets a client present progress or audit a session independently from the next tool call.
Relevant resources: reasoning://sessions, reasoning://sessions/{sessionId}, reasoning://sessions/{sessionId}/trace, reasoning://sessions/{sessionId}/thoughts/{thoughtName}
Architecture
Request Lifecycle
MCP Surface
Tools
reasoning_think
Stateful reasoning tool for creating and continuing multi-step sessions. It supports one-step interactive calls, run_to_completion batches, structured observation/hypothesis/evaluation input, rollback, and early conclusion while returning structured session state.
Data Flow
Resources
Prompts
MCP Capabilities
Tool Annotations
Structured Output
reasoning_thinkdeclaresoutputSchemaand returnsstructuredContent, with an embedded trace resource when the trace is small enough. Evidence:src/tools/reasoning-think.ts:498,src/lib/mcp.ts:97-114.
Configuration
[!NOTE] The source does not define any HTTP host/port configuration. The only other environment-related signal is
NODE_ENV=productionin the Docker image and--env-file=.envin the localdev:runscript.
Security
[!NOTE] No auth, OAuth, HTTP origin checks, or rate-limiting controls are implemented in the current source because the server only exposes stdio transport.
Development
Additional helper scripts for diagnostics, coverage, asset copying, and knip are defined in package.json.
Build and Release
.github/workflows/release.ymlbumpspackage.jsonandserver.json, then runsnpm run lint,npm run type-check,npm run test, andnpm run buildbefore tagging and creating a GitHub release.- The same workflow publishes the package to npm with Trusted Publishing, publishes to the MCP Registry with
mcp-publisher, and pushes a multi-arch Docker image toghcr.io. Dockerfileuses a multi-stage Node 24 Alpine build, prunes dev dependencies, and runs the released container as themcpuser.
Troubleshooting
- Sessions are in memory and expire after 30 minutes by default. If you receive
E_SESSION_NOT_FOUND, start a new session or increaseCORTEX_SESSION_TTL_MS. runMode="run_to_completion"requires enoughthoughtentries to cover the remaining steps. If you want the server to return after each step, keep the defaultstepmode.- For stdio transport, do not add custom stdout logging around the server process. This server routes logs through MCP logging and falls back to
stderron failures.
Credits
Contributing and License
- License: MIT
- Contributions are welcome via pull requests.
Source: README.md at commit c1171fd
Tools
0Version history
1- v1.11.0LatestSep 16, 2026
Score
40% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Declare a license in the repository or the registry entry.