Skip to main content

gcontext

The workspace your agent works in: tasks it tracks, integrations it operates, scripts it runs. Structure lives in the cloud so every session starts oriented; secret values and script execution never leave your machine.

One prompt like "ship the launch discount: new payment link in Stripe, point promo.example.com at the site, update the launch task" and your agent reads the integration docs, runs the scripts locally with keys injected from your local secret store, and checks off the task, without a single key entering the conversation.

Get started (2 minutes)

uvx gcontext-mcp login   # browser sign-in at https://app.gcontext.ai mints a token

Then add it to Claude Code:

claude mcp add-json gcontext '{
  "type": "stdio",
  "command": "uvx",
  "args": ["gcontext-mcp"],
  "env": { "GCONTEXT_TOKEN": "<your token>" }
}'

Free up to 30 files, no credit card. Needs uv/uvx on your PATH.

What your agent gets

  • Tasks: typed folders with goals, steps, and progress notes the agent maintains, so the next session picks up exactly where the last one stopped.
  • Integrations: docs per third-party service (what it is, allowed/never operations, which secret NAMES it needs) that act as the agent's operations manual and guardrails.
  • Local script execution: tool_run_script runs Python on YOUR machine with secret values injected from ~/.gcontext/.env (chmod 0600; OS keychain opt-in via GCONTEXT_SECRET_BACKEND=keychain) and scrubbed from every output the agent sees.
  • A secret-name registry: the cloud knows only NAMES and descriptions; values are filled once via a local browser form and stay on your machine.

The privacy split

Lives in the cloud Never leaves your machine
Folder structure, docs, task state Secret VALUES (~/.gcontext/.env, keychain opt-in)
Secret NAMES + present/missing flags Script and shell execution
Activity metadata (names, token counts) Script outputs before scrubbing

Why: pasting API keys into a chat is how keys end up in logs and screenshots, and a cloud that executes your code with your keys HAS your keys. gcontext gives the agent full operational ability with zero key custody.

Other clients and modes

Claude Desktop (no CLI): edit the config file (Settings → Developer → Edit Config; macOS ~/Library/Application Support/Claude/claude_desktop_config.json, Windows %APPDATA%\Claude\claude_desktop_config.json), then fully restart:

{
  "mcpServers": {
    "gcontext": {
      "command": "uvx",
      "args": ["gcontext-mcp"],
      "env": { "GCONTEXT_TOKEN": "<your token>" }
    }
  }
}

Keep the server name gcontext (or change it in the dashboard's Settings); every prompt the dashboard copies references the server by that name. Desktop has no slash-command prompts (/use-integration, etc.); you drive the same tools by plain chat.

Self-hosting: same product, your server, one docker compose up and a single token. See SELF_HOSTING.md or https://gcontext.ai/self-hosting.

Pure-local dev (no cloud, own SQLite), from a checkout:

claude mcp add gcontext -- uv run --directory /ABS/PATH/TO/apps/mcp-minimal python server.py

Tools

  • tool_list_dir(path="/"), tool_read_file(path), tool_write_file(path, content), tool_delete(path)tool_write_file auto-creates missing parent folders
  • tool_secrets(action="list"|"register"|"unregister", name, description), tool_setup_secrets(form=True)
  • tool_run_script(code) - runs Python locally with secrets injected from the local store (~/.gcontext/.env by default)

The secret registry

The registry holds secret NAMES + descriptions only — it is for setup and verification, not runtime. It does NOT gate tool_run_script, which injects the whole secret environment from the local store regardless of what's registered.

  1. tool_secrets(action="register", name, description) - declare a required secret.
  2. tool_setup_secrets() - opens a local browser form where the user fills in the values; they are stored in ~/.gcontext/.env (chmod 0600), or the OS keychain with GCONTEXT_SECRET_BACKEND=keychain (form=False appends blank NAME= lines to the .env instead).
  3. tool_secrets() - shows present per name so you can confirm setup.

How it works

  1. Write a file describing a 3rd-party operation and which secret NAMES it needs; declare those names with tool_secrets(action="register").
  2. To act, read the file, generate Python, and call tool_run_script.
  3. Secret values resolve from the local store (~/.gcontext/.env by default, keychain opt-in) at run time - never stored in the DB.

Security / trust model

tool_run_script runs arbitrary Python locally with your real secret values injected - there is no sandbox. It is exactly as trusted as whatever drives the server. Run it on your own machine only; never expose this server remotely.

Script contract

  • Read secrets via os.environ["VAR"] - never hardcode, never load_dotenv.
  • Use only registered names that show present_locally: true.
  • Exit codes: 0 OK, 2 missing secret (KeyError), 1 any other failure.

Config (env vars)

  • GCONTEXT_API_URL - backend origin (default https://app.gcontext.ai; set for self-host).
  • GCONTEXT_TOKEN - the dashboard-minted token.
  • MCP_MINIMAL_DB - SQLite path for pure-local mode (default db.sqlite next to server.py).
  • MCP_MINIMAL_ENV_FILE - secret-values file (default ~/.gcontext/.env).
  • GCONTEXT_SECRET_BACKEND - env (default: values in the 0600 .env) or keychain (OS keychain).

Developing

Tests and the three-ring test architecture: see tests/README.md. Run everything with make test.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gcontext_mcp-0.3.3.tar.gz (243.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gcontext_mcp-0.3.3-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file gcontext_mcp-0.3.3.tar.gz.

File metadata

  • Download URL: gcontext_mcp-0.3.3.tar.gz
  • Upload date:
  • Size: 243.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.16

File hashes

Hashes for gcontext_mcp-0.3.3.tar.gz
Algorithm Hash digest
SHA256 cf634bec758f70349c502c4774feb21cd12455bb38830521e30d509e1b0aba4d
MD5 5c06490672d203bed22b92ecddfa7abc
BLAKE2b-256 a916d6fb6a4fcb0803bcf523d667f24f85e624d2943b6a55eef8a1558e252c8a

See more details on using hashes here.

File details

Details for the file gcontext_mcp-0.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for gcontext_mcp-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 84a42bafecf3ac0f3e2a93dcc52eb77805adc55f66a86bc2bb9da2ed161a8969
MD5 94811815daa92cdb238ba8b3ae682b63
BLAKE2b-256 cd511b91a31d59505bb7d9235dba0a5829653851d9d567197a246df4cfe3b083

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 files

0.3.1

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page