Skip to main content
Glama
STIM-Protocol

mycelial-brain-mcp


What This Is

Just as mycelium connects trees and transfers nutrients across forests, Mycelial Brain connects your knowledge and transfers context across AI agents.

This is the open-source MCP (Model Context Protocol) server that powers the Mycelial Brain: a GCS-backed persistent memory system that any MCP-compatible AI agent can read from, write to, and search.

It is the memory layer of the STIM Protocol: a Layer 0 constraint architecture that grounds autonomous AI in thermodynamic and ecological law rather than human preference.

Related MCP server: engram

MCP Tools

Once connected, your AI agent gets five tools:

Tool

Description

brain_search

Full-text keyword search across all brain documents with tag-weighted scoring

brain_read

Read a specific document by path (e.g., doc-42)

brain_write

Write a new document with auto-incremented ID or custom path

brain_list

List all documents with their tags

stim_write

Write a STIM protocol nugget with namespace and author metadata

Quick Start: Self-Host

Prerequisites

  • Node.js 22+

  • Google Cloud Storage bucket (or fork with a different storage backend)

Run Locally

git clone https://github.com/STIM-Protocol/mycelial-brain-mcp.git
cd mycelial-brain-mcp
npm install

# Set environment variables
export GCS_BUCKET_NAME=your-brain-bucket
export MCP_AUTH_TOKEN=your-secret-token   # omit to run in open mode

# Start the server
npm start

The server exposes an MCP endpoint at POST /mcp on port 8080.

Deploy to Google Cloud Run

npm run deploy

This runs gcloud run deploy with the repo as source. Make sure your Cloud Run service account has Storage Object Admin on the GCS bucket.

Connect Your AI Agent

Add the MCP server to your agent configuration (Claude Desktop, etc.):

{
  "mcpServers": {
    "mycelial-brain": {
      "url": "https://your-deployment-url/mcp",
      "headers": {
        "Authorization": "Bearer your-secret-token"
      }
    }
  }
}

See CONNECT.md for detailed setup instructions.

Architecture

┌─────────────────────────────────────────────────────┐
│              MYCELIAL BRAIN STACK                     │
├─────────────────────────────────────────────────────┤
│                                                      │
│  AI Agent ──MCP──▶ Express Server ──▶ GCS Bucket     │
│  (Claude,          (this repo)      (doc-*.json)     │
│   Gemini, etc.)                                       │
│                                                      │
│  Tools: brain_search, brain_read, brain_write,      │
│         brain_list, stim_write                        │
│                                                      │
│  Cache: 5-min in-memory TTL, invalidated on write    │
│  Auth:  Bearer token (optional, open mode if unset)  │
│  Search: Tag-weighted full-text with synonym expand  │
│                                                      │
└─────────────────────────────────────────────────────┘

Documents are stored as JSON objects in GCS:

{
  "path": "doc-42",
  "content": "Your document text...",
  "tags": ["research", "stim", "decisions"],
  "updated": "2026-08-22T12:00:00.000Z"
}

Hosted Version

Don't want to self-host? myceliate.cv offers a managed MCP endpoint with:

  • One-click Claude Desktop integration via .mcpb bundle

  • Operator dashboard with full-text search across your document catalog

  • Google OAuth authentication and per-user namespace isolation

  • Tiered pricing (free open-source tier through enterprise)

  • Onboarding flow with document upload and text paste seeding

The hosted version runs the same MCP protocol as this repo. Your data stays in your own GCS namespace, and you can export or self-host at any time.

STIM Protocol Context

This repo is one component of the STIM Protocol ecosystem:

Repo

Role

stim-core

Layer 0 specification: nature-grounded intelligence constraints

white-paper

Versioned, arXiv-ready documentation

stim-guard

pip-installable constraint engine for AI agents

gpd-framework

Physics-based dimensional analysis and thermodynamic convergence

Forest_OS

Knowledge organism: living, self-governing file system

mycelial-brain-mcp

MCP memory layer (this repo)

License

Apache 2.0. See LICENSE.

Contributing

This is a STIM Protocol reference implementation. Issues and PRs welcome.


"The accumulated context across platforms has become a fifth category of professional capital."

A
license - permissive license
Not graded
quality - not tested
C
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
    Not graded
    quality
    C
    maintenance
    Provides persistent, local-first AI memory across sessions via MCP tools for storing, searching, and retrieving context from past interactions.
    1
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Provides AI agents with persistent knowledge storage, enabling them to store, search, and retrieve text, documents, and files using semantic and keyword search via MCP tools.
    31
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to persistently store and semantically search shared knowledge via MCP tools.
    2
    MIT

View all related MCP servers

Related MCP Connectors

  • Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.

  • Shared long-term memory vault for AI agents with 20 MCP tools.

  • Universal memory for AI agents and tools. Save, organize and search context anywhere.

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/STIM-Protocol/mycelial-brain-mcp'

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