host-and-share-remote-tool

Host, validate, and privately share Python functions or MCP endpoints through ToolUniverse Platform.

1.7k|254|Updated Mar 3, 2025
One-click install
npx skills add https://github.com/mims-harvard/ToolUniverse --skill host-and-share-remote-tool
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: host-and-share-remote-tool
Source: https://github.com/mims-harvard/ToolUniverse/tree/main/skills/host-and-share-remote-tool
Command: npx skills add https://github.com/mims-harvard/ToolUniverse --skill host-and-share-remote-tool

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tooluniverse, fastmcp.

What problem does it solve?

Turning a local model, Python function, or lab MCP server into a remotely callable tool usually requires public IPs, firewall changes, and manual credential handling. This Skill guides you through wrapping your workload, validating it locally, and sharing it privately through ToolUniverse Platform with browser-based authorization.

Core Features & Use Cases

  • Python Function Wrapping: Expose any Python callable as a remote tool using the @remote_tool decorator and tu serve, with guidance on bounded, JSON-serializable inputs and sanitized errors.
  • Existing MCP Endpoint Relay: Forward a loopback Streamable HTTP MCP server through tuplatform-relay without exposing ports or moving credentials.
  • Local Validation Before Sharing: Verify tool discovery, semantic calls, GPU execution, and error behavior locally before enabling private sharing.
  • Use Case: A researcher with a GPU-hosted protein scoring model wraps it with @remote_tool, validates inference locally, then runs tu serve --share so collaborators can call it through ToolUniverse Platform while the model and weights stay on the lab server.

Quick Start

Ask the agent to wrap my Python model function with @remote_tool, validate it locally, and share it privately through ToolUniverse Platform.

Frequently Asked Questions about host-and-share-remote-tool

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I share a local Python model as a remote tool?

Wrap the callable with the @remote_tool decorator from tooluniverse, validate it locally with tu serve on loopback, then run tu serve with --share and a name. The CLI opens a browser authorization flow and stores a computer-only key locally.

How do I expose an existing MCP server through ToolUniverse?

Keep your Streamable HTTP MCP server running on loopback and forward it with tuplatform-relay --forward pointing at the local address. The server must implement MCP initialization, tools/list, and tools/call; a plain health endpoint is not sufficient.

Can I share a GPU model without a public IP or firewall changes?

Yes. The relay is outbound-only, so the provider machine binds to loopback and needs no public IP or firewall changes. Verify CUDA execution and run a real inference locally before sharing, since discovery alone does not prove the model works.

Can I forward a plain REST API endpoint as an MCP tool?

No. An arbitrary REST endpoint is not MCP. Wrap it in a typed Python function with @remote_tool first, or place a reviewed MCP adapter in front of it before relaying.

How do I revoke access to a shared remote tool?

Run tu remote logout --revoke to revoke the computer-only platform connection and remove the local key copy. For SDK-only MCP setups use tuplatform-auth logout --revoke; the offline server record can then be deleted in My Computers.

Why does sharing fail in non-interactive or headless environments?

An invalid TOOLUNIVERSE_SERVICE_KEY causes non-interactive jobs to fail fast, so fix or unset the environment value. On headless servers, add --no-browser and open the printed authorization link on another machine.