Token导航 LogoToken导航TokenDH.com
Galaxy Brain logo
运维云端stdio官方级别未说明来源级核验

Galaxy Brain

MCP Server

Galaxy Brain是一个结合了顺序思考和顺序执行的MCP服务器,形成一个完整的认知循环,用于问题解决和任务执行。

工具数

4

提示词数

0

GitHub Stars

1

资源数

0
PythonClaude云端部署Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

For-Sunny

提供方

For-Sunny

最后核验

2026/5/17 20:20

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install galaxy-brain

详细介绍

银河大脑

想想。做,完成。

*顺序思维+顺序行动=完整的认知循环*

![MIT License](LICENSE) ![Python 3.10+](https://python.org) ![MCP](https://modelcontextprotocol.io)

______________________________________________________________________

这是什么?

银河大脑 是一个结合了两个强大概念的MCP服务器:

  1. 顺序思维 (摘自Anthropic的MCP)-带有修订和分支的结构化推理
  2. 顺序执行 -在操作之间使用可变管道进行批处理执行

它们共同构成了一个完整的 认知回路思考问题,将想法转化为行动,执行,完成。

   PROBLEM
      │
      ▼
┌─────────────┐
│   THINK     │  ← reason step by step
│             │  ← revise if wrong
│             │  ← branch to explore
└──────┬──────┘
       │
       ▼
┌─────────────┐
│   BRIDGE    │  ← convert thoughts to operations
└──────┬──────┘
       │
       ▼
┌─────────────┐
│    DO       │  ← execute sequentially
│             │  ← pipe results between ops
└──────┬──────┘
       │
       ▼
    DONE

______________________________________________________________________

安装

快速安装(PowerShell)

git clone https://github.com/For-Sunny/galaxy-brain.git
cd galaxy-brain
.\scripts\install.ps1

快速安装(Bash)

git clone https://github.com/For-Sunny/galaxy-brain.git
cd galaxy-brain
chmod +x scripts/install.sh
./scripts/install.sh

手动安装

pip install galaxy-brain

然后添加到您的Claude Desktop配置中(%APPDATA%\Claude\claude_desktop_config.json 在Windows上):

{
  "mcpServers": {
    "galaxy-brain": {
      "command": "python",
      "args": ["-m", "galaxy_brain.server"]
    }
  }
}

______________________________________________________________________

用法

银河大脑运动: think_and_do

一个工具来统治他们:

think_and_do({
  "problem": "I need to read a config file, parse it, and count the keys",

  "thoughts": [
    "First I need to read the config file",
    "Then parse it as JSON",
    "Finally count the number of keys"
  ],

  "operations": [
    {
      "service": "file",
      "method": "read",
      "params": { "path": "config.json" }
    },
    {
      "service": "transform",
      "method": "json_parse",
      "params": { "content": "$results[0].result.content" }
    },
    {
      "service": "python",
      "method": "eval",
      "params": { "expression": "len($results[1].result)" }
    }
  ]
})

看到了吗 $results[0].result.content?那是 可变管道 -每个操作都可以参考之前操作的结果。

______________________________________________________________________

思维工具

开始一个思考环节,逐步推理:

# Start thinking
start_thinking({
  "problem": "How should I refactor this authentication system?",
  "initial_estimate": 5
})
# Returns: { "session_id": "think_abc123..." }

# Add thoughts
think({
  "session_id": "think_abc123...",
  "thought": "The current system uses session cookies...",
  "confidence": 0.8
})

# Realize you were wrong? Revise!
revise({
  "session_id": "think_abc123...",
  "revises_thought": 2,
  "revised_content": "Actually, we should use JWTs because...",
  "reason": "Stateless is better for our scale"
})

# Want to explore an alternative? Branch!
branch({
  "session_id": "think_abc123...",
  "branch_from": 3,
  "branch_name": "oauth_approach",
  "first_thought": "What if we used OAuth2 instead?"
})

# Done thinking
conclude({
  "session_id": "think_abc123...",
  "conclusion": "We should migrate to JWT with refresh tokens",
  "confidence": 0.9
})

______________________________________________________________________

做工具

使用可变管道执行操作:

execute_batch({
  "batch_name": "process_data",
  "operations": [
    {
      "service": "shell",
      "method": "run",
      "params": { "command": "curl -s https://api.example.com/data" }
    },
    {
      "service": "transform",
      "method": "json_parse",
      "params": { "content": "$results[0].result.stdout" }
    },
    {
      "service": "file",
      "method": "write",
      "params": {
        "path": "output.json",
        "content": "$results[1].result"
      }
    }
  ]
})

可用服务

服务方法描述
pythonexecute, eval运行Python代码或计算表达式
shellrun执行shell命令
fileread, write, exists文件操作
transformjson_parse, json_stringify, extract, template数据转换

______________________________________________________________________

桥接工具

将思考环节转化为行动计划:

# Generate plan from concluded session
generate_plan({
  "session_id": "think_abc123..."
})

# Execute the generated plan
execute_plan({
  "plan_id": "plan_xyz789..."
})

______________________________________________________________________

可变管道语法

参考之前的结果 $results[N].path.to.value:

$results[0]                    # Full result of operation 0
$results[0].result             # The result field
$results[0].result.content     # Nested access
$results[1].result.data[0]     # Array access (in path format)

变量在执行每个操作之前都会被解析,因此您可以构建管道:

operations = [
  # Op 0: Read a file
  { "service": "file", "method": "read", "params": { "path": "input.txt" } },

  # Op 1: Use content from op 0
  { "service": "python", "method": "execute",
    "params": { "code": "print(len('$results[0].result.content'))" } },

  # Op 2: Use stdout from op 1
  { "service": "file", "method": "write",
    "params": { "path": "count.txt", "content": "$results[1].result.stdout" } }
]

______________________________________________________________________

配置

创建 galaxy-brain.json 在您的工作目录中:

{
  "thinking": {
    "max_thoughts": 50,
    "max_branches": 10,
    "max_revisions_per_thought": 5
  },
  "doing": {
    "max_operations": 50,
    "default_timeout": 30,
    "max_timeout": 300,
    "stop_on_error": true
  },
  "bridge": {
    "auto_execute": false,
    "validate_before_execute": true
  },
  "log_level": "INFO"
}

或者使用环境变量:

  • GALAXY_BRAIN_LOG_LEVEL
  • GALAXY_BRAIN_MAX_THOUGHTS
  • GALAXY_BRAIN_MAX_OPERATIONS

______________________________________________________________________

为什么是“银河大脑”?

因为当你将结构化思维与链式执行相结合时,你就在另一个层面上运作。

想想。做,完成。大脑能量大,宇宙效率高。

______________________________________________________________________

学分

______________________________________________________________________

许可证

麻省理工学院许可证-随心所欲。

______________________________________________________________________

想想。做,完成。

______________________________________________________________________

由...建造 CIPS公司

网站 | 商店 | | glass@cipscorps.io

AI系统的企业内存基础设施: CASCADE Enterprise、PyTorch Memory、Hebbian Mind和完整的CIPS堆栈.

版权所有(c)2025-2026 c.I.P.S.有限责任公司

目录标签

目录标签

PythonClaude云端部署顺序思考本地部署顺序执行认知循环变量传递

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

session

工具数量(toolCount,工具数)

4

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiosession部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP