Redux for AI Agents

Redux gave components shared state between renders. gcontext gives agents shared state between sessions.

Get startedBrowse agents

What is gcontext

gcontext is an MCP server that gives you access to a structured standard of plain text files and folders that helps you store any kind of information. Connections, modules, scripts, and decisions accumulate over time, so you can load it into a session.

You can add agents to your gcontext instance. These live locally in your machine or self-hosted platform to help you with any action you need.

day 1
month 3

Rules files

CLAUDE.md, AGENTS.md
never changes
+Simple, version controlled
Hand-maintained
uses Python
dark mode
works at Acme
day 1
uses Python
dark mode
works at Acme
prefers uv
uses Stripe
deploys on Fri
hates YAML
month 3

Auto memory

Claude, ChatGPT
grows, invisible
+Zero effort
No structure, no control
day 1
month 3

RAG

grows unsorted
+Scales to large data
Complex, chunks not knowledge
agent/
├── connections/
│ └── stripe/
└── agent.md
day 1
agent/
├── connections/
│ ├── stripe/
│ ├── cloudflare/
│ ├── deploy/
│ └── ...
├── modules/
│ ├── archive/
│ └── ...
└── agent.md
month 3

gcontext

grows with structure
+Structured context you or your agent controls
Requires effort

Explore agents

Browser Cookbook23 files

A browser agent that learns your sites. It performs browser tasks through your real Chrome, accumulates per-site knowledge, and crystallizes repetitive tasks into plain Python scripts; on later runs the AI only dispatches the script and heals failures. Broken knowledge heals itself; blockers like captchas escalate to you.

automationbrowser
gcontext add browser-cookbook
Diagram Crafter31 files

A diagram agent that turns an initial text into a polished explanatory visual, hand-crafted as SVG. It scopes the single claim the diagram must make, proposes 2-3 ASCII wireframe compositions built from proven archetypes, and expands the chosen one using a written design system so results stay consistent across runs. The user decides composition; the design system decides style. Finished diagrams accumulate in a library the agent consults on later runs.

diagramsvisualscommunication
gcontext add diagram-crafter
Post Crafter35 files

A marketing post agent that puts the headline first. Each post starts from a chosen angle, then a headline workshop generates candidates from proven persuasion formulas (Cialdini, Kahneman, Caples), scores them, red-teams the best, and lets the user pick or rewrite. The body follows in two layers: a System 1 hook to stop the scroll, then System 2 proof to close the deal. The user controls every content decision. Product knowledge accumulates in a shared products/ folder so repeat runs stop re-asking.

marketingcontentcopywriting
gcontext add post-crafter
Explore all agents

Learn

Agent memory
Four approaches to persistent agent memory compared.
What is agent state
State is not chat history, not RAG, not configuration.
Claude Code memory
What persists across sessions and what does not.
Stateful MCP servers
The pattern behind gcontext and how to build one.
Share context across tools
One state folder for Claude Code, Cursor, and Codex.
Self-improving agents
The learnings-file pattern that compounds over time.

An agent is based on folders and files

gcontext splits everything into two main categories: connections and modules. Connections are the agent's access to external services, while modules are the knowledge and playbooks the agent accumulates over time.

agent state
agent.mdwho the agent is and what it does
connections/
stripe/
connection.yamlkind, secret names, deps
index.mdAPI patterns, quirks, rules
scripts/proven procedures
modules/
support-ops/
index.mdwhat this module does
steps.mdthe process
playbooks/built over time
secrets.envvalues never enter the context window
gcontext.yamlname, port

agent.md

Who the agent is and what it does. Every connected runtime receives this text at the start of every session.

connections/

One folder per service. A YAML file declares the secret names and dependencies. A markdown file explains the API in practice. The agent reads the docs and writes the script.

modules/

Knowledge the agent accumulates. One topic per folder. Playbooks and logs fill in over time.

secrets.env

Secret values live here, gitignored. The agent sees the names but never the values. Values are injected at run time and scrubbed from every output.

Get started

1. Install and start the server

Three commands. The server starts and prints an MCP URL.

quickstart
# requires uv: https://docs.astral.sh/uv
$ uv tool install gcontext-ai
$ gcontext init my_instance
Created my_instance/
$ gcontext up my_instance
Serving my_instance at http://127.0.0.1:4242/mcp

2. Connect a client

Once per client, works from any directory. Any MCP client works.

connect (once per client)
Claude Code
Cursor
Codex
claude mcp add --transport http my_instance http://127.0.0.1:4242/mcp
"my_instance": {"url": "http://127.0.0.1:4242/mcp"}in ~/.cursor/mcp.json
[mcp_servers.my_instance] url = "http://127.0.0.1:4242/mcp"in ~/.codex/config.toml
Full steps per client:gcontext connect

Claude Desktop: add the server URL to your claude_desktop_config.json manually.

3. Run the setup command

With the MCP connected, run the built-in setup prompt. Describe what you need in plain words. The agent proposes connections and modules, builds them, and verifies each one.

in your client
/mcp__my_instance__setup(MCP)

Replace my_instance with the name of your gcontext instance.

GitHubPyPI

Connections

A connection gives your agent access to one external service. Each connection is a folder with a YAML manifest for secret names, a markdown file with practical API notes, and a scripts folder for proven procedures.

Learn more →

Agents

An agent is a module you install into your gcontext instance. It gives the instance a repeatable process: steps to follow, playbooks to consult, and logs to learn from. Each run leaves a trace, and the agent gets better over time.

Learn more →