Skip to main content
Glama
Globus MCP Server

Globus MCP Server

by PurdueRCAC

Globus MCP Server

⚠️ Beta Software — This project is under active development and has not reached a stable v1.0.0 release. APIs, tool signatures, and behavior may change without notice. Use with caution in production workflows.

Globus MCP Server gives AI agents federated data transfer and remote code execution across research storage systems at institutions worldwide.

It wraps the Globus CLI for data transfer and the Globus Compute SDK for remote Python execution on HPC endpoints.

Prerequisites

  1. Globus Connect Personal (optional): For transfers to/from your local machine

Related MCP server: mcp-slurm

Quick Start

For MCP-enabled applications like Claude Desktop, Cursor, or Warp, add this server to your MCP configuration:

{
  "mcpServers": {
    "globus": {
      "command": "uvx",
      "args": ["git+https://github.com/purduercac/globus-mcp"]
    }
  }
}

The uvx invocation handles installation automatically. On first use, the server's globus_login() and compute_login() tools will walk users through authentication via the browser.

Common Workflows

Find and Browse Endpoints

endpoint_search("purdue")  # Returns list with UUIDs
ls("endpoint-uuid", "/path/to/dir")

Transfer Data

task_id = transfer(
    source_endpoint="src-uuid",
    source_path="/data/file.tar",
    dest_endpoint="dst-uuid",
    dest_path="/scratch/file.tar"
)
task_wait(task_id)

Some Globus Connect Server v5 collections require endpoint-specific consent. If an operation fails with ConsentRequired, the server returns a structured error with the required scopes. Agents call session_consent(scopes) to open the browser, then retry the original operation.

Remote Code Execution (Globus Compute)

# Submit a Python function to run on a remote HPC endpoint
compute_submit(
    endpoint_id="compute-endpoint-uuid",
    function_source="def analyze(n):\n    import numpy as np\n    return np.random.rand(n).mean()",
    function_name="analyze",
    requirements="numpy",
    args=[10000],
)

# Check results later
compute_result("task-uuid", timeout=300)

When requirements is provided, the server automatically provisions a cached virtual environment on the remote endpoint using uv.

Available Tools

Identity & Auth

  • whoami() — Show logged-in identity

  • globus_login() — Initiate Globus CLI OAuth login

  • session_consent(scopes) — Grant endpoint-specific data access consent

Endpoints

  • endpoint_search(query) — Find Transfer endpoints by name

  • endpoint_show(endpoint_id) — Get endpoint details

  • endpoint_local_id() — Get local GCP endpoint UUID

Filesystem

  • ls(endpoint_id, path) — List directory contents

  • stat(endpoint_id, path) — Get file/directory metadata

  • mkdir(endpoint_id, path) — Create directory

  • rename(endpoint_id, source_path, dest_path) — Rename or move

  • rm(endpoint_id, path) — Delete (synchronous)

  • delete(endpoint_id, path) — Delete (async task)

Transfers

  • transfer(...) — Submit async transfer task

  • transfer_batch(...) — Batch transfer (multiple file pairs)

  • task_list() — List recent tasks

  • task_show(task_id) — Get task details

  • task_wait(task_id) — Wait for task completion

  • task_cancel(task_id) — Cancel a running task

  • task_event_list(task_id) — Get task events

Compute (Remote Code Execution)

  • compute_login() — Authenticate with Globus Compute

  • compute_endpoint_list() — List accessible Compute endpoints

  • compute_endpoint_status(endpoint_id) — Check endpoint availability

  • compute_submit(...) — Submit a Python function for remote execution

  • compute_batch_submit(...) — Submit multiple functions as a batch

  • compute_status(task_ids) — Check task status (non-blocking)

  • compute_result(task_id) — Get task result (optionally wait)

Development

uv sync
uv run globus-mcp --help
uv run pytest -q

Contributors — human or agent — should start with AGENTS.md, the repository's operating manual: architecture, the load-bearing invariants, and the process rules.

Non-trivial work flows through the spec-driven software factory under .agents/ — /globus-feature → /globus-plan → /globus-build → /globus-review → /globus-publish, each cycle on its own branch with its design record retained under spec/{slug}/. See .agents/factory/methodology.md for the why, and ROADMAP.md for what is queued.

One rule is worth repeating outside that documentation, because it is easy to violate by reflex: no test, verify command, or review drive may call a tool that mutates remote state — transfer, rm, delete, compute_submit and friends act on production research infrastructure. Drive the server hermetically instead:

uv run python .agents/factory/bin/mcp_probe.py          # in-memory MCP round-trip, no network
.agents/factory/bin/temp_home.sh uv run pytest -q        # …with Globus credentials unreachable

Known defects reproduced on main are listed in AGENTS.md § Known defects, each with a seed under issues/.

License

MIT

Available Tools

26 tools
compute_batch_submitA

Submit multiple Python functions as a batch to a Compute endpoint.

Each task in the list provides its own function source code and arguments. All tasks share the same endpoint and requirements/worker_init config.

Args: endpoint_id: UUID of the target Compute endpoint. tasks: List of task dicts, each containing: - 'function_source': Python source code (required) - 'function_name': Name of the function (required) - 'args': Positional arguments (optional, default []) - 'kwargs': Keyword arguments (optional, default {}) requirements: Shared pip requirements for all tasks. python_version: Python version for the remote venv. user_endpoint_config: Additional endpoint configuration.

Returns: Dict with 'task_ids' (list) and 'function_ids' (dict mapping function_name to function UUID).

Examples: compute_batch_submit( endpoint_id="abcd-1234-...", tasks=[ {"function_source": "def f1():\n return 1", "function_name": "f1"}, {"function_source": "def f2(x):\n return x*2", "function_name": "f2", "args": [21]}, ], )

Inputs: endpoint_id (required), tasks (required), requirements, python_version, +1 more. Returns: object

compute_endpoint_listA

List Globus Compute endpoints accessible to the current user.

Use this to find the UUID of a Compute endpoint when the user refers to one by name (e.g. "run this at Argonne"). Match the user's request against the display names in the returned list. If no match is found, ask the user to provide the endpoint UUID directly.

Note: Compute endpoints are NOT searchable by keyword like Transfer endpoints. This tool only returns endpoints the user has access to.

Args: role: Filter by user's relationship to the endpoint. 'any' (default) returns all accessible endpoints. 'owner' returns only endpoints the user owns.

Returns: List of endpoint dicts with 'uuid', 'name', 'status', and other metadata.

Examples: compute_endpoint_list() compute_endpoint_list(role="owner")

Inputs: role. Returns: result

compute_endpoint_statusA

Check whether a Globus Compute endpoint is online.

Call this before submitting tasks to verify the endpoint is available.

Args: endpoint_id: UUID of the Compute endpoint.

Returns: Dict with endpoint status information including whether it is online and ready to accept tasks.

Examples: compute_endpoint_status("abcd-1234-...")

Inputs: endpoint_id (required). Returns: object

compute_loginA

Initiate Globus Compute OAuth login flow.

Opens the default web browser to authenticate with Globus Compute. This is separate from the Globus CLI login used for transfers. You must authenticate with Compute before submitting tasks.

Returns: Status message indicating login result.

Note: This opens a browser window. The user must complete login there.

Inputs: no named parameters. Returns: result

compute_resultA

Get the result of a Compute task.

Without a timeout, this does a single non-blocking check. With a timeout, it polls with exponential backoff until the task completes or the timeout is reached.

Args: task_id: UUID of the task. timeout: Maximum seconds to wait. If None, checks once without blocking.

Returns: Dict with 'status' ('success', 'failed', or 'pending') and either 'result' (the function's return value) or 'exception'.

Examples: compute_result("task-uuid") compute_result("task-uuid", timeout=300)

Inputs: task_id (required), timeout. Returns: object

compute_statusA

Check the status of one or more Compute tasks (non-blocking).

Args: task_ids: List of task UUID strings returned by compute_submit() or compute_batch_submit().

Returns: Dict mapping each task_id to its status info: - 'pending': True if the task is still running - 'status': 'success', 'failed', or a waiting state - 'result': The return value (only if complete and successful) - 'exception': Error info (only if failed)

Examples: compute_status(["task-uuid-1", "task-uuid-2"])

Inputs: task_ids (required). Returns: object

compute_submitA

Submit a Python function for remote execution on a Globus Compute endpoint.

The function is provided as Python source code. All imports MUST be inside the function body. The function is registered, then submitted asynchronously — this tool returns immediately with a task ID.

IMPORTANT: If your function uses any third-party packages, you MUST provide a 'requirements' string listing them (one per line, like a requirements.txt). This is used to provision a virtual environment on the remote endpoint automatically.

Args: endpoint_id: UUID of the target Compute endpoint. Use compute_endpoint_list() to find available endpoints. function_source: Python source code containing the function. Example: "def analyze(data_path):\n import pandas as pd\n ..." function_name: Name of the function defined in function_source. requirements: Newline-separated pip requirements for the function's dependencies (e.g. "numpy\npandas>=2.0\nscipy"). Omit if the function only uses the standard library. args: Positional arguments to pass to the function. kwargs: Keyword arguments to pass to the function. python_version: Python version for the remote venv (e.g. "3.12"). Defaults to the version running in this server. user_endpoint_config: Additional endpoint configuration. If this contains a 'worker_init' key, it overrides the auto-generated worker_init from requirements.

Returns: Dict with 'task_ids' (list of task UUID strings) and 'function_id'.

Examples: compute_submit( endpoint_id="abcd-1234-...", function_source="def hello():\n return 'Hello from HPC!'", function_name="hello", )

compute_submit(
    endpoint_id="abcd-1234-...",
    function_source="def analyze(n):\n    import numpy as np\n    return np.random.rand(n).mean()",
    function_name="analyze",
    requirements="numpy",
    args=[1000],
)

Inputs: endpoint_id (required), function_source (required), function_name (required), requirements, +4 more. Returns: object

deleteA

Submit an async delete task.

Unlike rm, this returns immediately with a task_id. Use task_show or task_wait to monitor progress.

Args: endpoint_id: The UUID of the endpoint. path: Path to the file or directory to delete. recursive: If True, recursively delete directories. ignore_missing: If True, don't error if path doesn't exist. label: Optional label for the task.

Returns: Dict with 'task_id' for the submitted delete task.

Examples: result = delete("endpoint-uuid", "/scratch/large_dir", recursive=True) task_wait(result['task_id'])

Inputs: endpoint_id (required), path (required), recursive, ignore_missing, +1 more. Returns: object

endpoint_local_idA

Get the UUID of the locally installed Globus Connect Personal endpoint.

Returns the endpoint ID for your local machine, which can be used as a source or destination for transfers.

Returns: The UUID string of the local GCP endpoint.

Raises: GlobusError: If Globus Connect Personal is not installed or running.

Examples: local_ep = endpoint_local_id() transfer(local_ep, "/path/to/file", remote_ep, "/dest/path")

Inputs: no named parameters. Returns: result

endpoint_showA

Get detailed information about a specific endpoint.

Args: endpoint_id: The UUID of the endpoint.

Returns: Dict with full endpoint details including display_name, owner, entity_type, description, contact info, and capabilities.

Examples: endpoint_show("ddb59aef-6d04-11e5-ba46-22000b92c6ec")

Inputs: endpoint_id (required). Returns: object

globus_loginA

Initiate Globus OAuth login flow.

Opens the default web browser to complete authentication. After authenticating, the user's credentials are stored locally and subsequent API calls will be authenticated.

Returns: Status message indicating login was initiated.

Note: This opens a browser window for OAuth authentication. The user must complete the login in their browser.

Inputs: no named parameters. Returns: result

lsA

List the contents of a directory on a Globus endpoint.

Args: endpoint_id: The UUID of the endpoint. path: Directory path to list. If None, lists the default directory. all: If True, show hidden files (those starting with '.'). long: If True, include detailed metadata (size, permissions, dates). recursive: If True, recursively list subdirectories (up to depth 3).

Returns: List of file/directory entries. Each entry includes 'name', 'type' ('file' or 'dir'), and optionally 'size', 'last_modified', etc.

Examples: ls("endpoint-uuid", "/home/user") ls("endpoint-uuid", "/data", all=True, long=True) ls("endpoint-uuid", "/project", recursive=True)

Inputs: endpoint_id (required), path, all, long, +1 more. Returns: result

mkdirA

Create a directory on a Globus endpoint.

Args: endpoint_id: The UUID of the endpoint. path: Path where the directory should be created.

Returns: Dict with 'message' confirming creation and 'code'.

Examples: mkdir("endpoint-uuid", "/scratch/user/new_project") mkdir("endpoint-uuid", "/data/output")

Inputs: endpoint_id (required), path (required). Returns: object

renameA

Rename or move a file or directory on a Globus endpoint.

The source path must exist. The destination path must not exist. Most endpoints require the destination to be on the same filesystem.

Args: endpoint_id: The UUID of the endpoint. source_path: Current path of the file or directory. dest_path: New path for the file or directory.

Returns: Dict with 'message' confirming the rename and 'code'.

Examples: rename("endpoint-uuid", "/data/old_name.txt", "/data/new_name.txt") rename("endpoint-uuid", "/scratch/temp", "/scratch/results")

Inputs: endpoint_id (required), source_path (required), dest_path (required). Returns: object

rmA

Delete a file or directory and wait for completion.

Submits a delete task and blocks until it completes. Use this when you need to ensure deletion is finished before proceeding.

Args: endpoint_id: The UUID of the endpoint. path: Path to the file or directory to delete. recursive: If True, recursively delete directories. ignore_missing: If True, don't error if path doesn't exist. timeout: Maximum seconds to wait. If None, waits indefinitely.

Returns: Dict with task status after completion, including 'status' field.

Examples: rm("endpoint-uuid", "/scratch/temp_file.txt") rm("endpoint-uuid", "/scratch/old_dir", recursive=True) rm("endpoint-uuid", "/data/maybe_exists.txt", ignore_missing=True)

Inputs: endpoint_id (required), path (required), recursive, ignore_missing, +1 more. Returns: object

statA

Get the status/metadata of a file or directory on an endpoint.

Args: endpoint_id: The UUID of the endpoint. path: Path to the file or directory.

Returns: Dict with metadata including 'name', 'type', 'size', 'last_modified', 'permissions', 'user', 'group'.

Examples: stat("endpoint-uuid", "/data/results.tar.gz") stat("endpoint-uuid", "/project/src")

Inputs: endpoint_id (required), path (required). Returns: object

task_cancelA

Cancel a running or queued task.

Cancels a specific task by ID, or all your in-progress tasks with --all. You must provide either a task_id or set all=True.

Args: task_id: The UUID of the task to cancel. Optional if all=True. all: If True, cancel all your in-progress tasks.

Returns: Dict with cancellation confirmation.

Raises: ValueError: If neither task_id nor all=True is provided.

Examples: task_cancel("abc123-def456-...") task_cancel(all=True) # Cancel all your tasks

Inputs: task_id, all. Returns: object

task_event_listA

Get recent events for a task.

Shows events including faults (non-fatal errors like permission denied) that occurred during task execution. Useful for debugging transfer issues.

Note: Tasks older than one month may no longer have event history.

Args: task_id: The UUID of the task. limit: Maximum number of events to return (default 10). filter_errors: If True, only show error events. filter_non_errors: If True, only show non-error events.

Returns: List of event dicts with 'time', 'code', 'description', 'details'.

Examples: task_event_list("abc123-...") task_event_list("abc123-...", filter_errors=True) # Only errors

Inputs: task_id (required), limit, filter_errors, filter_non_errors. Returns: result

task_listA

List recent transfer and delete tasks.

Args: limit: Maximum number of tasks to return (default 10). filter_status: Filter by status. One of: - 'ACTIVE': Currently running tasks - 'INACTIVE': Paused tasks - 'FAILED': Failed tasks - 'SUCCEEDED': Completed successfully

Returns: List of task summaries with 'task_id', 'type', 'status', 'label', 'source_endpoint_display_name', 'destination_endpoint_display_name'.

Examples: task_list() task_list(limit=5, filter_status="ACTIVE") task_list(filter_status="FAILED")

Inputs: limit, filter_status. Returns: result

task_showA

Get detailed information about a specific task.

Args: task_id: The UUID of the task.

Returns: Dict with full task details including: - 'status': ACTIVE, INACTIVE, FAILED, SUCCEEDED - 'type': TRANSFER or DELETE - 'source_endpoint_display_name' - 'destination_endpoint_display_name' - 'files': Number of files - 'files_transferred': Files completed - 'bytes_transferred': Bytes completed - 'request_time': When submitted - 'completion_time': When finished (if complete) - 'nice_status': Human-readable status

Examples: task_show("abc123-def456-...")

Inputs: task_id (required). Returns: object

task_waitA

Wait for a task to complete.

Blocks until the task finishes (succeeds or fails) or timeout is reached. Use this when you need data in place before proceeding with subsequent operations (e.g., submitting a job that uses the transferred data).

Args: task_id: The UUID of the task to wait for. timeout: Maximum seconds to wait. If None, waits indefinitely. polling_interval: Seconds between status checks (default 1).

Returns: Dict with final task status. Check 'status' field: - 'SUCCEEDED': Transfer completed successfully - 'FAILED': Transfer failed (check 'nice_status' for reason)

Raises: GlobusError: If timeout is reached before task completes.

Examples: # Wait indefinitely result = task_wait("abc123-...") if result['status'] == 'SUCCEEDED': print("Transfer complete!")

# Wait with timeout
result = task_wait("abc123-...", timeout=3600)  # 1 hour max

Inputs: task_id (required), timeout, polling_interval. Returns: object

transferA

Submit an asynchronous transfer task between Globus endpoints.

This submits a transfer task and returns immediately. The transfer runs server-side and can be monitored with task_show() or waited on with task_wait().

Args: source_endpoint: UUID of the source endpoint. source_path: Path to the file or directory on the source. dest_endpoint: UUID of the destination endpoint. dest_path: Path where data should be placed on destination. recursive: If True, transfer directories recursively. sync_level: Sync strategy for existing files: - None: Overwrite all files - 'exists': Skip if destination exists - 'size': Skip if same size - 'mtime': Skip if same size and modification time - 'checksum': Skip if same checksum label: Optional label for the transfer task. verify_checksum: If True, verify checksums after transfer. preserve_timestamp: If True, preserve modification times. encrypt_data: If True, encrypt data in transit.

Returns: Dict with 'task_id', 'submission_id', 'message', and other details. Use the 'task_id' with task_show() or task_wait().

Examples: # Transfer a single file result = transfer( source_endpoint="uuid1", source_path="/data/file.tar.gz", dest_endpoint="uuid2", dest_path="/scratch/file.tar.gz" ) task_id = result['task_id']

# Transfer a directory
transfer(
    source_endpoint="uuid1",
    source_path="/project/results/",
    dest_endpoint="uuid2",
    dest_path="/archive/results/",
    recursive=True,
    label="Archive project results"
)

# Sync with checksum verification
transfer(
    source_endpoint="uuid1",
    source_path="/data/",
    dest_endpoint="uuid2",
    dest_path="/backup/",
    recursive=True,
    sync_level="checksum",
    verify_checksum=True
)

Inputs: source_endpoint (required), source_path (required), dest_endpoint (required), dest_path (required), +6 more. Returns: object

transfer_batchA

Submit a batch transfer with multiple file pairs.

Transfers multiple source/destination pairs in a single task. More efficient than multiple individual transfers.

Args: source_endpoint: UUID of the source endpoint. dest_endpoint: UUID of the destination endpoint. items: List of transfer items. Each item is a dict with: - 'source_path': Path on source endpoint (required) - 'dest_path': Path on destination endpoint (required) - 'recursive': If True, transfer directory recursively (optional) sync_level: Sync strategy for existing files (see transfer()). label: Optional label for the transfer task. verify_checksum: If True, verify checksums after transfer. preserve_timestamp: If True, preserve modification times. encrypt_data: If True, encrypt data in transit.

Returns: Dict with 'task_id' and other task details.

Examples: # Transfer multiple files transfer_batch( source_endpoint="uuid1", dest_endpoint="uuid2", items=[ {'source_path': '/data/file1.txt', 'dest_path': '/backup/file1.txt'}, {'source_path': '/data/file2.txt', 'dest_path': '/backup/file2.txt'}, {'source_path': '/data/subdir', 'dest_path': '/backup/subdir', 'recursive': True}, ], label="Batch backup" )

Inputs: source_endpoint (required), dest_endpoint (required), items (required), sync_level, +4 more. Returns: object

whoamiA

Show the currently logged-in Globus identity.

Returns information about the authenticated user including their email address and identity provider.

Returns: Dict with 'username' (email), 'id', 'name', and login status.

Examples: whoami() # Returns {'username': 'user@example.edu', ...}

Inputs: no named parameters. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 26 tools

    Disambiguation4/5

    Most tools have distinct purposes, but there is potential confusion between synchronous 'rm' and asynchronous 'delete' for file deletion, as well as between 'globus_login' and 'compute_login' for different authentication flows. These overlaps could cause misselection.

    Naming Consistency3/5

    Tools generally follow a verb_noun pattern (e.g., 'compute_batch_submit', 'transfer_batch'), but are mixed with short Unix-like commands such as 'ls', 'rm', 'mkdir', and 'whoami'. This inconsistency in naming style reduces predictability.

    Tool Count4/5

    26 tools cover two major domains (Compute and Transfer) with authentication and file operations. While slightly high, the count is reasonable given the breadth of functionality and the need for fine-grained control.

    Completeness5/5

    The tool set provides comprehensive coverage for both Globus Compute (submit, batch, status, result, endpoint management) and Globus Transfer (file operations, transfers, task management). No obvious gaps in core workflows.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to manage SLURM HPC clusters via SSH. Supports job submission, resource monitoring, queue management, and file operations.
      4
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables users to manage Linux HPC clusters from ChatGPT via an outbound Secure MCP Tunnel, with read-only and opt-in filesystem, command execution, background process, and Slurm/PBS scheduler tools.
      MIT