Skip to main content
Glama
spences10

mcp-sequentialthinking-tools

mcp-sequentialthinking-tools

built with vite+ tested with vitest

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

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

为什么要使用它?

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

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

  • 修改或分支计划;

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

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

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

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

Related MCP server: MCP Think Tool

工具

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

致谢

Install Server
A
license - permissive license
A
quality
B
maintenance

Maintenance

Maintainers
26dResponse time
Release cycle
Releases (12mo)
Issues opened vs closed

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/spences10/mcp-sequentialthinking-tools'

If you have feedback or need assistance with the MCP directory API, please join our Discord server