The repository exposes a Model Context Protocol (MCP) server that provides programmatic access to module information. It is implemented using FastMCP.
Use Bazel to start the server, no Python virtual environment setup needed:
bazel run //tools:mcp_server
The server registers a set of MCP tools mirroring the functionality of tools/registry.py:
list_modules()
– list all module names in the registrysearch_modules(pattern)
– search module names using a regexlist_versions(module, include_yanked=False)
– list versions for a moduleget_metadata(module)
– return the module's metadata.json
get_source(module, version)
– return source.json
for a versionget_patch_file(module, version, patch_name)
– return the patch file content for a given patchget_module_bazel(module, version)
– return the MODULE.bazel
fileget_presubmit_yaml(module, version)
– return presubmit.yml
if presentget_attestations(module, version)
– return attestations.json
if presentget_registry_info()
– return the contents of bazel_registry.json
Add the server to Gemini CLI's settings.
"mcpServers": { "BCR": { "command": "bazel", "args": ["run", "//tools:mcp_server"], "cwd": "<Your local path to this repository>", "timeout": 5000, "trusted": true } }
Make sure to build the target first to reduce startup time.