gcontext connector — local MCP bridge: cloud structure, local secret values
Project description
mcp-minimal
A single local Python MCP server for a workspace of integrations (third-party
services the AI can use: docs, dependencies, secret names) and tasks (units of
work with goals, steps and progress). Both are typed folders in a virtual file tree,
backed by a secret-name registry and on-the-fly Python script execution with the
local .env injected. Secret VALUES never leave this machine and never enter the
database.
Self-hosting? See SELF_HOSTING.md: one
docker compose up, plus how to pull future updates.
Setup
cd apps/mcp-minimal
cp .env.example .env # fill in your secret values
Get a token first by running uvx gcontext-mcp login (browser sign-in at
https://app.gcontext.ai mints it).
Add to Claude Code
Published connector (hosted cloud):
claude mcp add-json gcontext '{
"type": "stdio",
"command": "uvx",
"args": ["gcontext-mcp"],
"env": { "GCONTEXT_TOKEN": "<your token>" }
}'
Pure-local (no cloud, own SQLite):
claude mcp add mcp-minimal -- uv run --directory /ABS/PATH/TO/apps/mcp-minimal python server.py
Add to Claude Desktop
The CLI commands above only work in Claude Code. For the Desktop app, edit the config file directly (Settings → Developer → Edit Config, or open it from):
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add your server under mcpServers, then fully quit and reopen Claude Desktop.
Published connector (hosted cloud):
{
"mcpServers": {
"gcontext": {
"command": "uvx",
"args": ["gcontext-mcp"],
"env": { "GCONTEXT_TOKEN": "<your token>" }
}
}
}
Pure-local (no cloud, own SQLite):
{
"mcpServers": {
"mcp-minimal": {
"command": "uv",
"args": ["run", "--directory", "/ABS/PATH/TO/apps/mcp-minimal", "python", "server.py"]
}
}
}
Note: Desktop has no slash-command prompts (/use-integration, etc.) — you drive
the same tools by plain chat. Both modes need uv/uvx on your PATH.
Tools
tool_list_dir(path="/"),tool_read_file(path),tool_write_file(path, content),tool_delete(path)—tool_write_fileauto-creates missing parent folderstool_secrets(),tool_register_secret(name, description),tool_unregister_secret(name),tool_setup_secrets(form=True)tool_run_script(code)- runsuv run --env-file .env python -c "<code>"
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 .env regardless of what's registered.
tool_register_secret(name, description)- declare a required secret.tool_setup_secrets(form=False)- append blankNAME=lines to.envfor any registered secret not yet present, so the user just fills in the values (form=Trueopens a browser form).tool_secrets()- showspresentper name so you can confirm setup.
How it works
- Write a file describing a 3rd-party operation and which secret NAMES it needs;
declare those names with
tool_register_secret. - To act, read the file, generate Python, and call
tool_run_script. - Secret values resolve from the local
.envat run time - never stored in the DB.
Security / trust model
tool_run_script runs arbitrary Python locally with your real .env 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, neverload_dotenv. - Use only registered names that show
present_locally: true. - Exit codes:
0OK,2missing secret (KeyError),1any other failure.
Config (env vars)
MCP_MINIMAL_DB- SQLite path (defaultdb.sqlitenext toserver.py).MCP_MINIMAL_ENV_FILE- secret-values file (default.envnext toserver.py).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gcontext_mcp-0.2.0.tar.gz.
File metadata
- Download URL: gcontext_mcp-0.2.0.tar.gz
- Upload date:
- Size: 215.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b680603173dc05dd0addf87b58abaff902651f58ed34d1e0684a8fb9123f9a8d
|
|
| MD5 |
408e1dc72838fa3d85ddadb4f6dd7b8a
|
|
| BLAKE2b-256 |
9dd814840a4e7a932630153b8ce8a20880d217d522132f1ebb877c0da5181b94
|
File details
Details for the file gcontext_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: gcontext_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 21.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f110c542fe17ad3e4cbf5b5ee6a4b35dba2a7704b84b099ab1e8cc6771735d90
|
|
| MD5 |
f09cd057840a2fdf6690c321b2958342
|
|
| BLAKE2b-256 |
7deec9c091d3e0ca1df92447c619063cbff8e8f6056970eedb64cca3949c0f40
|