一个强大的 MCP 服务器,实现了顺序思维协议,提供了一种结构化的问题解决方法。该服务器有助于将复杂问题分解成可管理的步骤,同时保持对修订和替代推理路径的灵活性。
促进详细、逐步的思考过程,用于问题解决和分析。
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
thought | string | 是 | 当前思考步骤 |
nextThoughtNeeded | boolean | 是 | 是否需要另一个思考步骤 |
thoughtNumber | integer | 是 | 当前思考次数 |
totalThoughts | integer | 是 | 预计所需的总思考次数 |
isRevision | boolean | 否 | 是否修订之前的思考 |
revisesThought | integer | 否 | 正在重新考虑的思考编号 |
branchFromThought | integer | 否 | 分支点思考编号 |
branchId | string | 否 | 分支标识符 |
needsMoreThoughts | boolean | 否 | 是否需要更多的思考 |
顺序思维工具适用于:
{
"mcpServers": {
"sequential-thinking": {
"command": "npx",
"args": [
"-y",
"@zengwenliang/mcp-server-sequential-thinking"
]
}
}
}
</details>
<details>
<summary><b>🐳 Docker 配置</b></summary>
{
"mcpServers": {
"sequential-thinking": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"zengwenliang0416/mcp-server-sequential-thinking"
]
}
}
}
</details>
# 全局安装
npm install -g @zengwenliang/mcp-server-sequential-thinking
# 或直接使用 NPX
npx -y @zengwenliang/mcp-server-sequential-thinking
{
"mcpServers": {
"sequential-thinking": {
"command": "npx",
"args": [
"-y",
"@zengwenliang/mcp-server-sequential-thinking"
]
}
}
}
</details>
<details>
<summary><b>💻 本地构建方法</b></summary>
cd /path/to/sequential-thinking
npm install
npm run build
{
"mcpServers": {
"sequential-thinking": {
"command": "node",
"args": [
"/absolute/path/to/sequential-thinking/dist/index.js"
]
}
}
}
</details>
<details>
<summary><b>🐳 Docker 方法</b></summary>
# 构建 Docker 镜像
docker build -t zengwenliang0416/mcp-server-sequential-thinking .
{
8 "mcpServers": {
"sequential-thinking": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"zengwenliang0416/mcp-server-sequential-thinking"
]
}
}
}
</details>
<details>
<summary><b>🔧 环境变量方法</b></summary>
#!/bin/sh
export CURSOR_MCP_CONFIG=/path/to/your/mcp_config.json
open -a Cursor
mcp_config.json:{
"mcpServers": {
"sequential-thinking": {
"command": "node",
"args": [
"/absolute/path/to/sequential-thinking/dist/index.js"
]
}
}
}
chmod +x start_cursor_with_mcp.sh
</details>注意:MCP 集成主要支持 Cursor IDE 的 Composer 功能。
git clone https://github.com/zengwenliang416/mcp-server-sequential-thinking.git
cd mcp-server-sequential-thinking
npm install
npm run build
</details>
<details>
<summary><b>Docker 构建</b></summary>
git clone https://github.com/zengwenliang416/mcp-server-sequential-thinking.git
cd mcp-server-sequential-thinking
docker build -t zengwenliang0416/mcp-server-sequential-thinking .
# 验证构建
docker images | grep sequential-thinking
</details>
更新 package.json 中的版本
{
"name": "@zengwenliang/mcp-server-sequential-thinking",
"version": "0.6.4",
"description": "用于顺序思维和问题解决的 MCP 服务器"
}
使用官方 npm 注册表
npm config set registry https://registry.npmjs.org/
登录 npm
npm login
按照提示通过浏览器登录。
检查组织成员资格 对于范围内的包,确保你是该范围的一部分:
# 检查是否是组织的一部分
npm org ls your-org-name
# 对于个人范围,这是自动创建的,使用你的用户名
构建并发布
npm run build
# 对于首次发布范围内的包
npm publish --access public
# 对于后续更新
npm publish
验证发布
npm view @zengwenliang/mcp-server-sequential-thinking
提交更改
git add .
git commit -m "feat(publish): 🚀 发布 npm 包 @zengwenliang/mcp-server-sequential-thinking"
git push
使用语义化版本控制:
# 对于补丁(错误修复)
npm version patch
# 对于次要更新(功能)
npm version minor
# 对于主要更新(重大变更)
npm version major
更新版本后,再次构建并发布:
npm run build
npm publish
</details>
向仓库设置添加这些密钥:
NPM_TOKEN
DOCKERHUB_USERNAME
DOCKERHUB_TOKEN
要测试你的自动化发布工作流:
</details>对于启用双重身份验证的用户:如果你的 npm 账户启用了双重身份验证,你必须:
- 使用“自动化”类型的令牌(推荐)
- 更改双重身份验证设置为“仅授权”(不推荐)
- 手动发布包(非自动化)
如果遇到集成问题:
chmod +x dist/index.js该项目基于 MIT 许可证 - 详情见 LICENSE 文件。
基于 modelcontextprotocol/servers 并维护于 zengwenliang416/mcp-server-sequential-thinking。