Skip to main content

Workers Bridge MCP

Workers Bridge MCP social preview

This guide connects the stdio MCP server to Codex CLI and fetches authenticated YouTube, X, and Reddit data through direct destination connections. Worker relay configuration is covered in docs/manual.md.

Before you start

  • macOS for the bundled Chrome cookie exporter (manual DevTools export works on any platform).
  • Python 3.12+ and uv.
  • Codex CLI.
  • Chrome signed in to the services you want to read, in the profile you will export from.

1. Register with Codex CLI

Register a user-level server

Add this table to ~/.codex/config.toml (create the file if it does not exist). It must be at the top level, not inside another table:

[mcp_servers.workers-bridge]
command = "uvx"
args = ["mcp-workers-bridge"]
startup_timeout_sec = 30
tool_timeout_sec = 300
env_vars = [
  "YOUTUBE_STORAGE_STATE_JSON",
  "YOUTUBE_TIMEZONE",
  "X_STORAGE_STATE_JSON",
  "REDDIT_STORAGE_STATE_JSON",
  "S3_CACHE_BUCKET",
  "SERVICE_BRIDGE_WORKER_URL",
  "CF_ACCESS_CLIENT_ID",
  "CF_ACCESS_CLIENT_SECRET",
  "AWS_REGION",
  "AWS_PROFILE",
  "AWS_CONFIG_FILE",
  "AWS_SHARED_CREDENTIALS_FILE",
  "AWS_WEB_IDENTITY_TOKEN_FILE",
  "AWS_ROLE_ARN",
  "REQUESTS_CA_BUNDLE",
  "CURL_CA_BUNDLE",
  "SSL_CERT_FILE",
  "HTTP_PROXY",
  "HTTPS_PROXY",
  "NO_PROXY"
]

[mcp_servers.workers-bridge.env]
PYTHONUNBUFFERED = "1"
LOCAL_CACHE_ROOT = "/path/to/private-cache-root"
# MCP_APPROVE_FOR_ME = "1"
# MCP_WITHOUT_COOKIE = "1"

Replace the cache path with an absolute path. The env_vars entries are names that must exist in the Codex process environment; they are not values. Restart Codex after adding or changing the table.

Alternatively, let Codex create the command/args entry:

codex mcp add workers-bridge -- uvx mcp-workers-bridge

That shortcut registers a stdio server named workers-bridge, but still add the env and env_vars sections manually. Codex stores uvx as the command and mcp-workers-bridge as its argument; at MCP startup, uvx resolves and runs the published package.

Chrome cookie extraction is included in the default install. Codex runs the published package on demand.

Environment variables must be declared inside the Codex session: env_vars only forwards variables that the Codex process inherited at startup. Exports from a separate terminal, or added after Codex started, are not visible to the MCP server. Restart Codex after changing the config or environment.

Modes

Set mode values in the MCP server entry in ~/.codex/config.toml.

To enable without-cookie mode, add MCP_WITHOUT_COOKIE = "1" to that table's env map.

MCP_WITHOUT_COOKIE=1 hides every cookie-backed tool at startup. It exposes only bridge_configuration, workers_bridge_probe, workers_youtube_captions, workers_x_asset, clear_cookie_state, and clear_cache.

Add this under the same [mcp_servers.workers-bridge.env] table:

MCP_APPROVE_FOR_ME = "1"

env values are literal TOML values, so no shell expansion is involved. MCP_APPROVE_FOR_ME=1 asks for the Chrome Safe Storage password once, then caches it in ~/.private/mcp-workers-bridge/chrome-safe-storage with mode 600. Delete that file to revoke the cached approval. The first extraction still requires the macOS approval. Restart Codex after editing the table.

bridge_configuration reports both cookie_mode and approve_for_me.

2. Extract cookies and set the environment variables

Direct mode uses these variables:

Data Minimum variable
YouTube history YOUTUBE_STORAGE_STATE_JSON
X X_STORAGE_STATE_JSON
Reddit REDDIT_STORAGE_STATE_JSON
YouTube local cache LOCAL_CACHE_ROOT
YouTube captions only none

In Codex Cloud, automatic Chrome cookie extraction is disabled. Provide storage-state values through the environment or enable MCP_WITHOUT_COOKIE=1; MCP_DISABLE_COOKIE_EXTRACTION=1 disables extraction explicitly in other environments.

Local cache

Add the cache root to [mcp_servers.workers-bridge.env] as a literal value:

LOCAL_CACHE_ROOT = "/path/to/private-cache-root"

TOML does not expand $HOME or $VAR, so use an absolute path. The cache key can sit alongside MCP_APPROVE_FOR_ME in the same env table.

3. Verify the connection

codex mcp list

Documentation

Metadata

Release files for mcp-workers-bridge 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-workers-bridge 0.7.0
File Size Uploaded Provenance Actions
mcp_workers_bridge-0.7.0.tar.gz 56.8 kB With provenance Details for mcp_workers_bridge-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-workers-bridge 0.7.0
File Interpreter ABI Platform Actions
mcp_workers_bridge-0.7.0-py3-none-any.whl Python 3 none any Details for mcp_workers_bridge-0.7.0-py3-none-any.whl

Total release size: 102.6 kB

Release files / mcp_workers_bridge-0.7.0.tar.gz

Download URL mcp_workers_bridge-0.7.0.tar.gz
Size 56.8 kB
Tags Source
SHA-256 checksum
How to use checksums
74dabef9aae313a5e8629955b39c2e715480e34b97cddf52bd0eab7bb4789854
BLAKE2b-256 checksum
How to use checksums
7106f16a159a3f6f5b1f4382e98a0a2f9b75cd87f6d2d0f8990201c113980dac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / mcp_workers_bridge-0.7.0-py3-none-any.whl

Download URL mcp_workers_bridge-0.7.0-py3-none-any.whl
Size 45.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6931a73f6dd54f5e1e1655561d2adef5032c237de1376f888817007c289387b1
BLAKE2b-256 checksum
How to use checksums
0f77b2cb03c5ec8f693ab807a9450787c18401d6810206718cf6933ef321a059
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Security for mcp-workers-bridge 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mcp_workers_bridge-0.7.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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