Skip to content
Back to search

mcp-server-mas-sequential-thinking

An advanced sequential thinking process using a Multi-Agent System (MAS) built with the Agno framework and served via MCP.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/FradSer/mcp-server-mas-sequential-thinking with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/FradSer/mcp-server-mas-sequential-thinking'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/fradser--mcp-server-mas-sequential-thinking/badge.svg)](/listings/fradser--mcp-server-mas-sequential-thinking)

HTML

<a href="/listings/fradser--mcp-server-mas-sequential-thinking"><img src="/api/listings/fradser--mcp-server-mas-sequential-thinking/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Prerequisites

- Python 3.10+ - An LLM API key from one of the providers above - Optional: `EXA_API_KEY` for web research - `uv` package manager (recommended) or `pip`

Install

git clone https://github.com/FradSer/mcp-server-mas-sequential-thinking.git
cd mcp-server-mas-sequential-thinking

uv pip install .        # or: pip install .

Configure an MCP Client

Add to your MCP client configuration:

{
  "mcpServers": {
    "sequential-thinking": {
      "command": "mcp-server-mas-sequential-thinking",
      "env": {
        "LLM_PROVIDER": "deepseek",
        "DEEPSEEK_API_KEY": "your_api_key",
        "EXA_API_KEY": "your_exa_key_optional"
      }
    }
  }
}

Environment Variables

# LLM provider (required)
LLM_PROVIDER="deepseek"  # deepseek, groq, openrouter, github, anthropic, ollama
DEEPSEEK_API_KEY="sk-..."

# Optional: override the models per provider (prefixed by provider name)
# DEEPSEEK_ENHANCED_MODEL_ID="deepseek-chat"
# DEEPSEEK_STANDARD_MODEL_ID="deepseek-chat"

# Optional: web research (enables ExaTools)
# EXA_API_KEY="your_exa_api_key"

# Optional: custom endpoint
# LLM_BASE_URL="https://custom-endpoint.com"

# Optional: team orchestration mode (standard/broadcast, route, coordinate)
# TEAM_MODE="standard"

Run the Server Directly

mcp-server-mas-sequential-thinking        # installed script
uv run mcp-server-mas-sequential-thinking  # or via uv

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 272 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Sequential Thinking Multi-Agent System (MAS) ![](https://img.shields.io/badge/A%20FRAD%20PRODUCT-WIP-yellow)
  2. [![Python Version](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/) [![Framework](https://img.shields.io/badge/Framework-Agno-orange.svg)](https://github.com/agno-agi/agno) [![Twitter Follow](https://img.shields.io/twitter/follow/FradSer?style=social)](https://x.com/FradSer)
  3. **English** | [简体中文](README.zh-CN.md)
  4. An MCP server that processes sequential thoughts through a team of specialized AI agents, each analyzing the problem from a different cognitive perspective.
  5. ## What This Is
  6. This is an **MCP server**, not a standalone application. It runs as a background service that extends an MCP-compatible LLM client (like Claude Desktop) with structured sequential-thinking capabilities. It exposes one tool, `sequentialthinking`, that runs every thought through a fixed multi-agent workflow: an initial synthesis, several specialist agents thinking in parallel, and a final synthesis that answers the original question.
  7. ## How It Works
  8. The system uses a fixed `full_exploration` strategy for every request. The AI complexity analyzer still runs to record diagnostic metadata (complexity score, problem type, required thinking modes), but it no longer changes the execution path — all thoughts take the same route:
  9. ```mermaid
  10. flowchart TD
  11. A[Input Thought] --> B[AI Complexity Analyzer]
  12. B --> C[Complexity Metadata Stored]
  13. C --> D[Fixed Strategy: full_exploration]
  14. D --> E[Step 1: Initial Synthesis]
  15. E --> F[Step 2: Parallel Specialist Agents]
  16. F --> G[Step 3: Final Synthesis]
  17. G --> H[Unified Response]
  18. ```
  19. ### The Specialist Agents
  20. Each request runs six specialist agents in parallel, plus a synthesis agent that runs twice (once at the start, once at the end). Every specialist except synthesis can optionally use web research via ExaTools.
  21. | Agent | Thinking direction | Focus | Time budget |
  22. | --- | --- | --- | --- |
  23. | Factual | `factual` | Objective facts and verified data | 120s |
  24. | Emotional | `emotional` | Intuition and gut reactions | 30s |
  25. | Critical | `critical` | Risks, weaknesses, logical flaws | 120s |
  26. | Optimistic | `optimistic` | Benefits, opportunities, value | 120s |
  27. | Creative | `creative` | New ideas and alternatives | 240s |
  28. | Meta-cognitive | `metacognitive` | Bias detection and reasoning-process evaluation | 90s |
  29. | Synthesis | `synthesis` | Integration and final answer | 60s |
  30. Key properties:
  31. - **Deterministic**: every request runs the same multi-step path.
  32. - **Parallel**: the specialist agents run simultaneously with `asyncio.gather`.
  33. - **Synthesis-driven**: both orchestration and the final answer come from the synthesis agent, which uses the enhanced model.
  34. ### Model Strategy
  35. Two models are configured per provider:
  36. - **Enhanced model**: used by the synthesis agent (integration tasks).
  37. - **Standard model**: used by the specialist agents.
  38. ### Research Capabilities
  39. ExaTools is attached to every agent except synthesis. Research is **optional** — it activates only when `EXA_API_KEY` is set. Without it, the system works on pure reasoning.
  40. ## The `sequentialthinking` Tool
  41. The server exposes one MCP tool.
  42. ### Input
  43. ```typescript
  44. {
  45. thought: string, // One focused reasoning step
  46. thoughtNumber: number, // 1-based step index; increment each call
  47. totalThoughts: number, // Planned number of steps
  48. nextThoughtNeeded: boolean, // true for intermediate steps, false on final step
  49. isRevision: boolean, // true only when revising earlier conclusions
  50. branchFromThought?: number, // Set with branchId to branch from a prior step
  51. branchId?: string, // Branch identifier (required when branching)
  52. needsMoreThoughts: boolean // true only when extending beyond totalThoughts
  53. }
  54. ```
  55. ### Output
  56. ```typescript
  57. {
  58. should_continue: boolean, // Canonical continuation signal
  59. next_thought_number: number?, // Recommended next thoughtNumber
  60. stop_reason: string, // Why to continue/stop/retry
  61. current_thought_number: number,
  62. total_thoughts: number,
  63. next_call_arguments?: { // Suggested next-call arguments when applicable
  64. thoughtNumber: number,
  65. totalThoughts: number,
  66. nextThoughtNeeded: boolean,
  67. needsMoreThoughts: boolean
  68. },
  69. parameter_usage: Record<string, string>
  70. }
  71. ```
  72. ### Call Contract
  73. - Treat this tool as a **multi-step loop**, not a one-shot call.
  74. - After every response, read `structuredContent.should_continue`.
  75. - Keep calling until `should_continue` is `false`.
  76. - Actively use reflection: when a step is weak or incorrect, send a revision step with `isRevision=true`.
  77. - Prefer `structuredContent.next_thought_number` and `next_call_arguments` when building the next request.
  78. ## Supported Providers
  79. | Provider | Env var | Default enhanced model | Default standard model |
  80. | --- | --- | --- | --- |
  81. | DeepSeek (default) | `DEEPSEEK_API_KEY` | `deepseek-chat` | `deepseek-chat` |
  82. | Groq | `GROQ_API_KEY` | `openai/gpt-oss-120b` | `openai/gpt-oss-20b` |
  83. | OpenRouter | `OPENROUTER_API_KEY` | `deepseek/deepseek-chat-v3-0324` | `deepseek/deepseek-r1` |
  84. | GitHub Models | `GITHUB_TOKEN` | `openai/gpt-5` | `openai/gpt-5-min` |
  85. | Anthropic | `ANTHROPIC_API_KEY` | `claude-3-5-sonnet-20241022` | `claude-3-5-haiku-20241022` |
  86. | Ollama | none | `devstral:24b` | `devstral:24b` |
  87. ## Installation
  88. ### Prerequisites
  89. - Python 3.10+
  90. - An LLM API key from one of the providers above
  91. - Optional: `EXA_API_KEY` for web research
  92. - `uv` package manager (recommended) or `pip`
  93. ### Install
  94. ```bash
  95. git clone https://github.com/FradSer/mcp-server-mas-sequential-thinking.git
  96. cd mcp-server-mas-sequential-thinking
  97. uv pip install . # or: pip install .
  98. ```
  99. ### Configure an MCP Client
  100. Add to your MCP client configuration:
  101. ```json
  102. {
  103. "mcpServers": {
  104. "sequential-thinking": {
  105. "command": "mcp-server-mas-sequential-thinking",
  106. "env": {
  107. "LLM_PROVIDER": "deepseek",
  108. "DEEPSEEK_API_KEY": "your_api_key",
  109. "EXA_API_KEY": "your_exa_key_optional"
  110. }
  111. }
  112. }
  113. }
  114. ```
  115. ### Environment Variables
  116. ```bash
  117. # LLM provider (required)
  118. LLM_PROVIDER="deepseek" # deepseek, groq, openrouter, github, anthropic, ollama
  119. DEEPSEEK_API_KEY="sk-..."
  120. # Optional: override the models per provider (prefixed by provider name)
  121. # DEEPSEEK_ENHANCED_MODEL_ID="deepseek-chat"
  122. # DEEPSEEK_STANDARD_MODEL_ID="deepseek-chat"
  123. # Optional: web research (enables ExaTools)
  124. # EXA_API_KEY="your_exa_api_key"
  125. # Optional: custom endpoint
  126. # LLM_BASE_URL="https://custom-endpoint.com"
  127. # Optional: team orchestration mode (standard/broadcast, route, coordinate)
  128. # TEAM_MODE="standard"
  129. ```
  130. ### Run the Server Directly
  131. ```bash
  132. mcp-server-mas-sequential-thinking # installed script
  133. uv run mcp-server-mas-sequential-thinking # or via uv
  134. ```
  135. ## Development
  136. ```bash
  137. # Install with dev dependencies
  138. uv pip install -e ".[dev]"
  139. # Code quality
  140. uv run ruff check . --fix
  141. uv run ruff format .
  142. uv run mypy .
  143. # Run tests
  144. uv run pytest tests/
  145. # Or use the Makefile
  146. make test # all tests with coverage + quality checks
  147. make test-fast # fast run without coverage
  148. make check-all # all quality checks
  149. ```
  150. ### Test with MCP Inspector
  151. ```bash
  152. npx @modelcontextprotocol/inspector uv run mcp-server-mas-sequential-thinking
  153. ```
  154. Open http://127.0.0.1:6274/ and test the `sequentialthinking` tool.
  155. ## Token Consumption Warning
  156. The multi-agent architecture consumes significantly more tokens than a single-agent tool — roughly 5-10x more per `sequentialthinking` call, because every call invokes multiple specialist agents. The tradeoff is deeper, multi-perspective analysis.
  157. ## Project Structure
  158. ```
  159. mcp-server-mas-sequential-thinking/
  160. ├── src/mcp_server_mas_sequential_thinking/
  161. │ ├── main.py # MCP server entry point (MCPServer)
  162. │ ├── processors/
  163. │ │ ├── multi_thinking_core.py # Specialist agent definitions
  164. │ │ └── multi_thinking_processor.py # Parallel sequence execution
  165. │ ├── routing/
  166. │ │ ├── ai_complexity_analyzer.py # AI complexity analysis
  167. │ │ ├── complexity_types.py # Complexity metric models
  168. │ │ └── multi_thinking_router.py # Fixed full_exploration routing
  169. │ ├── services/
  170. │ │ ├── server_core.py # ThoughtProcessor implementation
  171. │ │ ├── processing_orchestrator.py # Agno Team orchestration
  172. │ │ ├── workflow_executor.py
  173. │ │ └── context_builder.py
  174. │ ├── infrastructure/
  175. │ │ ├── persistent_memory.py # SQLite session storage
  176. │ │ └── learning_resources.py # Agent learning machine
  177. │ ├── security/rate_limiter.py # Rate limiting and request validation
  178. │ └── config/
  179. │ ├── modernized_config.py # Provider strategies
  180. │ └── constants.py # System constants
  181. ├── scripts/mcp_python_client_smoke.py # Protocol smoke test
  182. ├── tests/ # Unit and integration tests
  183. ├── pyproject.toml
  184. └── Makefile
  185. ```
  186. ## Changelog
  187. See [CHANGELOG.md](CHANGELOG.md) for version history.
  188. ## Contributing
  189. Contributions are welcome. Please ensure:
  190. 1. Code follows the project style (ruff, mypy)
  191. 2. Commit messages use conventional commits format
  192. 3. All tests pass before submitting a PR
  193. 4. Documentation is updated as needed
  194. ## License
  195. This project does not yet declare a license. See the [LICENSE discussion](https://github.com/FradSer/mcp-server-mas-sequential-thinking/issues) if you need to reuse it.
  196. ## Acknowledgments
  197. - Built with [Agno](https://github.com/agno-agi/agno) v2.x
  198. - Model Context Protocol by [Anthropic](https://www.anthropic.com/)
  199. - Research capabilities powered by [Exa](https://exa.ai/) (optional)
  200. - Multi-dimensional thinking inspired by Edward de Bono's work
  201. ## Support
  202. - GitHub Issues: [Report bugs or request features](https://github.com/FradSer/mcp-server-mas-sequential-thinking/issues)
  203. - Documentation: see CLAUDE.md for implementation notes
  204. - MCP Protocol: [Official MCP Documentation](https://modelcontextprotocol.io/)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.