Skip to main content

FreeMyGPT — HTTP gateway that lets ChatGPT (and any LLM) drive any local MCP server via simple GET requests. Hybrid: MCP stdio backends by default, Codex CLI and other runtimes via bundled adapters.

Project description

FreeMyGPT

Free ChatGPT from its sandbox. FreeMyGPT is a tiny HTTP gateway that lets ChatGPT (and any other LLM with an HTTP fetcher) drive any local MCP server — Gr0m_Mem, Codex CLI, Kali MCP, Home Assistant MCP, or anything else that speaks the Model Context Protocol — using nothing but simple GET requests. No Custom GPT Actions, no GitHub plugin, no OAuth dance, no POST bodies.

ChatGPT  ──GET──►  FreeMyGPT  ──stdio──►  MCP server (any)
                                  └─────►  Codex CLI (subprocess)

Why

  • ChatGPT's built-in browse tool can read URLs but cannot send POST requests or custom headers. Everyone else's "let ChatGPT call your API" guide assumes Custom GPT Actions. FreeMyGPT assumes you do not have that option.
  • Local MCP servers are powerful (Gr0m_Mem, the Kali server, Home Assistant, Codex) but they only speak stdio. They cannot be reached from a ChatGPT conversation by default.
  • FreeMyGPT is the thinnest possible layer between them: a FastAPI app that spawns each MCP server on first use, forwards call_tool requests, and returns the result as JSON in the HTTP response. Bearer token auth via ?token=… query param so ChatGPT can pass it without setting headers.

Architecture

  • HTTP frontend (FastAPI, stdio) — GET-only, JSON responses
  • Hybrid backends:
    • mcp — any stdio MCP server (official mcp Python SDK client)
    • codex — bundled wrapper that spawns codex exec <prompt> and exposes a single chat tool, so Codex looks like any other MCP backend from the HTTP side
  • Bearer token auth — required on every endpoint except /healthz, read from an env var, matched in constant time
  • Session store — SQLite; stores chat transcripts so ChatGPT can poll long-running sessions without losing history
  • One config file — YAML with an auth block and a backends map; see config.example.yaml

HTTP surface

GET /healthz                                        (no auth)
GET /backends                                       ?token=...
GET /{backend}/tools                                ?token=...
GET /{backend}/call/{tool}                          ?token=...&arg1=...&arg2=...
GET /{backend}/sessions/new                         ?token=...&label=...
GET /{backend}/sessions/{sid}/send                  ?token=...&message=...
GET /{backend}/sessions/{sid}/poll                  ?token=...&since=<id>
GET /{backend}/sessions/{sid}/close                 ?token=...

Tool arguments are passed as query parameters. Simple scalars (strings, ints, floats, bools) are coerced automatically. For structured arguments, pass them as a JSON blob in args_json:

GET /gr0m_mem/call/mem_record_decision?token=...&args_json={"subject":"db","decision":"Postgres","rationale":"concurrent writes"}

Quick start

pip install freemygpt

# 1. Make a token
export FREEMYGPT_TOKEN="$(freemygpt new-token)"

# 2. Write a config
mkdir -p ~/.freemygpt
cp $(python -c "import freemygpt, os; print(os.path.join(os.path.dirname(freemygpt.__file__), '..', '..', 'config.example.yaml'))") ~/.freemygpt/config.yaml
# edit to enable the backends you want

# 3. Sanity check
freemygpt doctor

# 4. Run
freemygpt serve --host 127.0.0.1 --port 8933

Exposing it to ChatGPT

ChatGPT needs to reach the gateway over the public internet. Pick any reverse tunnel:

Option A — Cloudflare Tunnel (recommended, free, no account required for quick tunnels)

brew install cloudflared
cloudflared tunnel --url http://127.0.0.1:8933

Cloudflared prints a https://<random>.trycloudflare.com URL. Paste it into your ChatGPT conversation with the token appended:

https://<random>.trycloudflare.com/gr0m_mem/call/mem_wakeup?token=<your token>

ChatGPT will browse the URL and inline the JSON response.

Option B — Tailscale Funnel

If your machine is already on Tailscale, enable Funnel on port 8933 and use the *.ts.net hostname. Token auth still applies.

Option C — ngrok

ngrok http 8933

Same idea.

Using it from a ChatGPT conversation

Once the URL is live and the token is in the query string, a ChatGPT conversation looks like:

You: Fetch https://tunnel.example.com/gr0m_mem/call/mem_wakeup?token=XYZ and summarize the response.

ChatGPT: (browses the URL, receives the JSON snapshot) You're Michael, a software engineer on macOS; active project is the FreeMyGPT launch; recent decisions locked in: Postgres for the database (concurrent writes), Clerk over Auth0 (better DX), SQLite FTS5 is the zero-dep default for Gr0m_Mem.

Because the responses are plain JSON, any LLM with an HTTP fetcher (Claude browsing, Gemini's google_search_retrieval, local Llama with a URL-fetching tool, etc.) can use the exact same URLs.

Security posture

  • Bearer token required on every authenticated endpoint, compared in constant time
  • Gateway refuses to start if the configured env var is empty
  • Every backend runs as a subprocess of the gateway — no network listener exposed
  • Session state in SQLite with PRAGMA foreign_keys=ON; sessions delete their messages on close
  • SECURITY.md documents private vulnerability reporting via GitHub advisories
  • Branch protection on every long-lived branch (no force pushes, no deletions, linear history)
  • CI runs ruff, mypy --strict, and the full test suite on every push

See SECURITY.md for the full disclosure policy and out-of-scope list.

Status

v0.1.0 alpha. API surface is stable; the wire format ({"text": ..., "structured": ..., "is_error": ...}) is not expected to change. Breaking changes will bump the minor version until v1.0.

License

MIT — see LICENSE.

Contact

Maintained by Michael Adam Groberman.

For security reports, use GitHub private vulnerability advisories (see SECURITY.md) — do not use LinkedIn DMs for sensitive disclosures.

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

freemygpt-0.1.0.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

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

freemygpt-0.1.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file freemygpt-0.1.0.tar.gz.

File metadata

  • Download URL: freemygpt-0.1.0.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for freemygpt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bd68e02300abf4255742d93911b1425c3f838e4ed2b8e03be676916cc97400a8
MD5 b24206194de79d4df23f15ed5228f813
BLAKE2b-256 c3ffae97c7ea9618e9aa373fa3a47c5a7ef7400a0a453a05ad99e755e5399d0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for freemygpt-0.1.0.tar.gz:

Publisher: release.yml on MichaelAdamGroberman/FreeMyGPT

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file freemygpt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: freemygpt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for freemygpt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 09ead290f76942090c4816563e34ee70204f8e89dd783583a35b63e998ba8318
MD5 6eb876df9ff72de5ac3fa74fda69e3df
BLAKE2b-256 3a782996c241f4abe508e8342a998093e6914d8df1e70639f777fdb222b31efb

See more details on using hashes here.

Provenance

The following attestation bundles were made for freemygpt-0.1.0-py3-none-any.whl:

Publisher: release.yml on MichaelAdamGroberman/FreeMyGPT

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page