Skip to main content
Glama
mcp-sequentialthinking-tools

mcp-sequentialthinking-tools

by spences10

mcp-sequentialthinking-tools

built with vite+ tested with vitest

一个用于记录顺序推理步骤的轻量级 MCP 服务器。它是一个带有历史记录、分支、修订元数据以及可选的模型编写工具计划验证功能的草稿板。

它不会发现你的其他 MCP 工具,也不会为模型选择工具。如果你传入 available_tools 和 recommended_tools,服务器会验证推荐的名称是否存在并存储该步骤。

为什么要使用它?

当任务受益于明确、可检查的推理时,请使用它:

  • 将混乱的问题分解为步骤;

  • 修改或分支计划;

  • 按会话保留简短的推理历史;

  • 根据提供的工具列表验证工具计划名称;

  • 在长时间的代理运行期间清除或检查推理历史。

不要将其用于琐碎的请求。它会增加开销。

Related MCP server: Sequential-Thinking

工具

sequentialthinking_tools

记录一个想法。

必需参数:

  • thought — 当前推理步骤

  • thought_number — 当前步骤编号

  • total_thoughts — 当前估计值;如果低于 thought_number,则自动提高

  • next_thought_needed — 是否需要另一个想法

可选参数:

  • session_id — 历史记录桶;默认为 default

  • is_revision, revises_thought

  • branch_from_thought, branch_id

  • needs_more_thoughts

  • available_tools — 工具名称数组或 { name, description } 对象

  • recommended_tools — 模型编写的用于验证/存储的推荐

  • remaining_steps — 即将进行的步骤的简短列表

示例:

{
	"session_id": "svelte-debug",
	"thought": "First inspect the route files, then run the failing check.",
	"thought_number": 1,
	"total_thoughts": 3,
	"next_thought_needed": true,
	"available_tools": ["read", "bash"],
	"recommended_tools": [
		{
			"tool_name": "read",
			"confidence": 0.9,
			"rationale": "Need to inspect the relevant files before editing.",
			"priority": 1
		}
	]
}

如果 recommended_tools 包含 available_tools 中不存在的名称,则调用返回 isError: true 且不存储该想法。

安全态势

服务器将想法文本、工具描述、基本原理和剩余步骤文本视为不受信任的输入。类似提示注入的文本在存储或在历史记录中返回之前会被扫描并编辑。包含编辑内容的调用会显示 security_warnings,指出哪些字段匹配。

这是防御性过滤,不能保证任意对抗性文本是安全的。不要在想法或工具描述中放入机密信息。

get_thinking_history

返回会话的存储想法。

参数:

  • session_id — 默认为 default

  • branch_id — 可选的分支过滤器

  • limit — 要返回的最大记录数;默认 50,最大 500

clear_thinking_history

清除一个会话或所有会话。

参数:

  • session_id — 默认为 default

  • all_sessions — 清除所有历史记录桶

提示

sequential-thinking-guidance

一个简短的提示,告诉模型如何诚实地使用此服务器:作为草稿板和验证器,而不是作为外部推理引擎。

配置

Claude Desktop / 兼容的 MCP 客户端

{
	"mcpServers": {
		"mcp-sequentialthinking-tools": {
			"command": "npx",
			"args": ["-y", "mcp-sequentialthinking-tools"],
			"env": {
				"MAX_HISTORY_SIZE": "1000"
			}
		}
	}
}

MAX_HISTORY_SIZE 是按会话计算的,默认为 1000。

服务器使用 tmcp 并包含一个小型 stdio 传输,它既接受标准的 Content-Length 帧 MCP 消息,也接受旧版 tmcp 工具使用的换行符分隔的 JSON。

开发

pnpm install
pnpm test
pnpm build
pnpm check

该项目使用 vite-plus 进行构建、测试、格式化和 lint 编排。

发布

pnpm changeset
pnpm changeset version
pnpm release

许可证

MIT 许可证 — 参见 LICENSE。

致谢

Available Tools

3 tools
clear_thinking_historyClear recorded sequential-thinking history for one session or all sessions.C

Clear recorded sequential-thinking history for one session or all sessions.

Inputs: session_id, all_sessions.

get_thinking_historyReturn recorded thoughts for a session. Use this to inspect or resume prior reasoning.C

Return recorded thoughts for a session. Use this to inspect or resume prior reasoning.

Inputs: limit, branch_id, session_id.

sequentialthinking_toolsRecord one step of sequential reasoning. Optionally include available_tools and recommended_tools; recommendations are validated, not generated, by this server.C

Record one step of sequential reasoning. Optionally include available_tools and recommended_tools; recommendations are validated, not generated, by this server.

Inputs: thought (required), thought_number (required), total_thoughts (required), next_thought_needed (required), +9 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 3 tools

    Disambiguation5/5

    The three tools map cleanly to distinct actions on the same resource: write a thought, read the history, and clear it. There is no overlap or risk of misselection between recording, retrieving, and clearing.

    Naming Consistency3/5

    get_thinking_history and clear_thinking_history follow a consistent verb_noun pattern, but sequentialthinking_tools breaks it entirely, using a compound noun with no verb and no clear action cue. The mix is readable but not uniform.

    Tool Count4/5

    Three tools is lean but adequate for a reasoning-history server covering write, read, and clear. It is on the thin side, with no session-listing or search capability to round it out.

    Completeness4/5

    The record/get/clear trio covers the basic lifecycle of a thinking log with no dead ends. Minor gaps exist, such as listing sessions or fetching a single thought by id, which agents could work around.

    Maintenance

    ActivityActive
    ResponsivenessUsually handled

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      A MCP server that implements sequential thinking protocols, provides structured problem-solving methods, decomposes complex problems into manageable steps, and supports iterative optimization and alternative reasoning paths.
      1
      2
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      A sequential thinking tool based on the MCP protocol, used to break down complex problems into manageable steps and provide intelligent tool recommendations for each step.
      2
      Apache 2.0