Skip to main content
Glama

mcp-think

一个用于结构化顺序思考的远程 MCP 服务器,基于 Cloudflare Workers 构建。

架构

  • Cloudflare Worker 通过 Streamable HTTP 暴露 /mcp。

  • MCP SDK v2 定义工具。

  • Durable Objects + SQLite 持久化每个序列。

  • 序列通过显式的 sequenceId 寻址;MCP 协议会话不携带应用状态。

此设计遵循当前的 Cloudflare 指南:新的 MCP 服务器使用 v2/无状态处理器,而多步骤工作流的应用状态位于显式的 Durable Object 边界之后。McpAgent 已弃用,此处刻意不使用。

Related MCP server: Sequential-Thinking

工具

start_sequence

创建序列并返回一个 sequenceId。

add_step

添加一个结构化步骤。用于摘要、假设、证据、推测或决策。服务器不用于暴露或存储隐藏的思维链。

revise_step

创建先前步骤的新修订版本,同时保留原始记录。

get_sequence

返回序列元数据和所有已存储的步骤。

finish_sequence

存储最终结论并将序列标记为已完成。

reset_sequence

删除已存储的序列数据。

本地开发

npm install
npm run typecheck
npm run dev

本地 MCP 端点为:

http://localhost:8787/mcp

健康检查:

http://localhost:8787/health

部署

使用你的 Cloudflare 账户验证 Wrangler 并运行:

npm run deploy

Cloudflare 将根据 wrangler.jsonc 中的迁移配置 SQLite 支持的 Durable Object。

示例流程

start_sequence(goal)
      ↓
sequenceId
      ↓
add_step(sequenceId, ...)
      ↓
add_step(sequenceId, ...)
      ↓
revise_step(sequenceId, stepId, ...)
      ↓
get_sequence(sequenceId)
      ↓
finish_sequence(sequenceId, conclusion)

安全路线图

MVP 刻意不包含身份验证。在公开暴露端点之前,请添加 OAuth 或其他身份验证层,并将序列所有权绑定到经过身份验证的主体。Cloudflare 的 MCP 指南还建议进行显式的 Host/Origin 验证和身份验证,而不是将 CORS 视为身份验证机制。

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    A remote MCP server that can be deployed on Cloudflare Workers without requiring authentication, allowing users to add and use custom tools through the Model Context Protocol.
    1
    -
  • 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