Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Created December 4, 2025 03:17
Show Gist options
  • Select an option

  • Save KyMidd/02c0c6d04e5149238c58f529e71633b6 to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/02c0c6d04e5149238c58f529e71633b6 to your computer and use it in GitHub Desktop.
worker_agent.py MCP consumption (old pattern)
# Build GitHub MCP client with only read-only tools
github_mcp_client, github_tools = build_github_mcp_client(
secrets_json["GITHUB_TOKEN"], "read_only"
)
opened_clients["GitHub"] = github_mcp_client
# Prefix tool names
github_tools = add_prefix_to_mcp_tools(github_tools, "github")
# Extend tools list
tools.extend(github_tools)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment