Skip to main content
Glama

Colab-mcp

An MCP server for bridging your local agent to a Colab session in the browser.

Supported Clients

This MCP server requires client support for notifications/tools/list_changed and for the client to be running locally on your device.

Popular clients that fit these criteria include:

  • Gemini CLI

  • Claude Code

  • Windsurf

Setup

  • Install uv (pip install uv)

  • Configure for usage (eg for mcp.json style services):

...
  "mcpServers": {
    "colab-mcp": {
      "command": "uvx",
      "args": ["git+https://github.com/googlecolab/colab-mcp"],
      "timeout": 30000
    }
  }
...

(If you have a non-standard default package index (Googlers), you may also need to add --index https://pypi.org/simple)

Issues & Discussions

We are using GitHub discussions as the place for issue discussion and feature requests. As discussions mature into action items, we will add those items as issues. This helps us ensure that issues in the issue tracker are well-understood, deduplicated, and actionable. For these reasons, please do NOT open issues directly.

Contributing

We unfortunately don't have the bandwidth to support review of external contributions, and we don't want user PRs to languish, so we aren't accepting any external contributions right now.

If you have a great idea or pain point, we would love to hear about it on our discussions page - the preferred place for issue discussion and feature requests.

Internal - For Colab Developers

Prerequisites

  • uv is required (pip install uv)

  • Configure git hooks to run repo presubmits

git config core.hooksPath .githooks

Gemini CLI setup

...
  "mcpServers": {
    "colab-mcp": {
      "command": "uv",
      "args": ["run", "colab-mcp"],
      "cwd": "/path/to/github/colab-mcp",
      "timeout": 30000
    }
  }
...

Available Tools

3 tools
get_colab_connection_infoA

Returns this server's connection token, port and a ready-to-use connect URL for manually connecting a Colab notebook (eg via the Colab command palette) when opening a browser directly is not possible

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It discloses that the operation is a read-only retrieval of connection information and lists the exact returned artifacts (token, port, URL). It does not warn about the sensitivity of the connection token, which would have been a useful addition, but the behavior is clearly described.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single focused sentence that front-loads what the tool returns and immediately states the use case. Every part of the sentence earns its place, and there is no filler or redundant restatement of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a no-parameter tool with an output schema and clear sibling context, the description is fully sufficient. It tells the agent what to expect, when to use it, and how it differs from the browser-based sibling tool. No critical operational detail is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters and 100% schema description coverage, so there is nothing additional for the description to explain about parameters. The baseline for a zero-parameter tool is 4, and the description adds no irrelevant parameter detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Returns') and resource ('this server's connection token, port and a ready-to-use connect URL'), and clearly scopes the use case to manually connecting a Colab notebook when browser access is not possible. This sufficiently distinguishes it from sibling tools like open_colab_browser_connection and reconnect_colab_session.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a clear condition for use: 'when opening a browser directly is not possible.' It implies the tool is for manual connection rather than automated browser-based opening, but it does not explicitly name sibling tools or state when to avoid using it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

open_colab_browser_connectionA

Opens a connection to a Google Colab browser session and unlocks notebook editing tools. Optionally pass notebook_url to connect to an existing notebook instead of a new scratch notebook. Returns a boolean representing whether the connection attempt succeeded

ParametersJSON Schema
NameRequiredDescriptionDefault
notebook_urlNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the behavioral burden. It discloses that the tool returns a boolean success indicator and that it unlocks editing tools, but it does not mention side effects, authentication requirements, session state changes, or failure behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with no filler. The main action is front-loaded, followed by the optional parameter behavior and return type, so every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with one optional parameter and a provided output schema, the description is reasonably complete: it explains the parameter, the return value, and the effect. The main missing piece is explicit routing among sibling tools, which would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It does explain notebook_url's purpose and the distinction between passing it for an existing notebook and omitting it for a new scratch notebook, though format details are left unspecified.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the action ('Opens a connection to a Google Colab browser session') and the resource, while also mentioning the unlock of notebook editing tools. However, it does not explicitly differentiate from sibling tools like get_colab_connection_info or reconnect_colab_session.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides some contextual guidance by describing optional notebook_url behavior and the difference between an existing notebook and a new scratch notebook. But it does not state when to prefer this tool over its siblings or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

reconnect_colab_sessionA

Re-opens the most recently used Colab notebook with the persisted session token and port, resuming the connection after this MCP server has restarted. Returns a boolean representing whether the reconnection succeeded

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full behavioral burden. It discloses that the tool uses a persisted session token and port, returns a boolean indicating success, and is intended for post-restart reconnection. It does not mention failure modes or prerequisites (e.g., whether a prior session must exist), but for a zero-parameter tool the stated behavior is reasonably transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with zero waste. The purpose is front-loaded, and the return value is stated. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with an output schema (even though its content is not provided here), the description states the essential context (when to use, what it does, what it returns). There is no missing information an agent needs to call it correctly. It is fully complete for its simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so per the rubric the baseline is 4. The description adds no parameter information because there are none to describe, and the schema already covers everything with 100% coverage. This is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Re-opens') with a clear resource (the most recently used Colab notebook) and context (after MCP server restart). It distinguishes itself from siblings by focusing on reconnection with persisted session state, which is not covered by open_colab_browser_connection or get_colab_connection_info.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states the condition for use: 'after this MCP server has restarted.' This provides clear context for when to invoke the tool. However, it does not explicitly mention when not to use it or name alternatives, so it falls short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv1.0.1
    • First observedget_colab_connection_info
    • First observedopen_colab_browser_connection
    • First observedreconnect_colab_session

TDQS

A4.2/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: opening a new connection, retrieving connection metadata, and reconnecting a previous session. No overlap exists, as the actions are complementary and easily distinguishable.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (open, get, reconnect) with snake_case, maintaining a uniform and predictable structure throughout the set.

Tool Count5/5

With only 3 tools, the server is tightly scoped to connection management, and each tool is essential for that purpose. This is well within the ideal range for a focused server.

Completeness4/5

The surface covers the core connection workflow (open, info, reconnect) but lacks an explicit close/disconnect tool. However, this is a minor gap that does not break the primary use case of establishing and resuming connections.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers