Skip to main content
Glama

Galaxy Brain

Think. Do. Done.

Sequential Thinking + Sequential Doing = Complete Cognitive Loop

MIT License Python 3.10+ MCP


What is this?

Galaxy Brain is an MCP server that combines two powerful concepts:

  1. Sequential Thinking (from Anthropic's MCP) - structured reasoning with revision and branching

  2. Sequential Doing - batch execution with variable piping between operations

Together they form a complete cognitive loop: think through a problem, convert thoughts to actions, execute, done.

   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

Related MCP server: Visum Thinker MCP Server

Installation

Quick Install (PowerShell)

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

Quick Install (Bash)

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

Manual Install

pip install galaxy-brain

Then add to your Claude Desktop config (%APPDATA%\Claude\claude_desktop_config.json on Windows):

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

Usage

The Galaxy Brain Move: think_and_do

One tool to rule them all:

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)" }
    }
  ]
})

See that $results[0].result.content? That's variable piping - each operation can reference results from previous operations.


Thinking Tools

Start a thinking session and reason step by step:

# 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
})

Doing Tools

Execute operations with variable piping:

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"
      }
    }
  ]
})

Available Services

Service

Methods

Description

python

execute, eval

Run Python code or evaluate expressions

shell

run

Execute shell commands

file

read, write, exists

File operations

transform

json_parse, json_stringify, extract, template

Data transformations


Bridge Tools

Convert thinking sessions to action plans:

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

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

Variable Piping Syntax

Reference previous results using $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)

Variables are resolved before each operation executes, so you can build pipelines:

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" } }
]

Configuration

Create galaxy-brain.json in your working directory:

{
  "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"
}

Or use environment variables:

  • GALAXY_BRAIN_LOG_LEVEL

  • GALAXY_BRAIN_MAX_THOUGHTS

  • GALAXY_BRAIN_MAX_OPERATIONS


Why "Galaxy Brain"?

Because when you combine structured thinking with chained execution, you're operating on a whole other level.

Think. Do. Done. Big brain energy. Cosmic efficiency.


Credits


License

MIT License - Do whatever you want with it.


Think. Do. Done.


Built by CIPS Corp

Website | Store | GitHub | glass@cipscorps.io

Enterprise memory infrastructure for AI systems: CASCADE Enterprise, PyTorch Memory, Hebbian Mind, and the full CIPS Stack.

Copyright (c) 2025-2026 C.I.P.S. LLC

Install Server
A
license - permissive license
B
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    An enhanced sequential thinking tool optimized for programming tasks that helps break down complex coding problems into structured, self-auditing thought steps with branching and revision capabilities.
    1
    68
    257
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables structured, step-by-step problem-solving with dynamic revision and branching capabilities. Supports breaking down complex problems into manageable steps while allowing course corrections and alternative reasoning paths.
    1
    133,826
    1
    Inno Setup
  • A
    license
    -
    quality
    F
    maintenance
    Provides 30+ unified reasoning operations including systematic thinking, mental models, debugging approaches, statistical analysis, interactive notebooks, and advanced problem-solving frameworks for enhanced decision-making and complex reasoning tasks.
    154
    52
    MIT

View all related MCP servers

Related MCP Connectors

  • Deterministic reasoning stack for AI agents: simulate, decide & compute, plus cross-domain tools.

  • Turns vague automation requests into tool stacks, prompts, QA checks, and human boundaries.

  • Agent-to-agent reasoning-as-a-service: chain-of-thought, analysis, and decision support.

View all MCP Connectors

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/For-Sunny/galaxy-brain'

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