Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

host-and-share-remote-tool

БесплатноБез исполняемых скриптовНе проверен

Host, validate, and privately share a user's own model, Python function, workflow, or existing Streamable HTTP MCP endpoint through ToolUniverse Platform. Use…

mims-harvardот mims-harvard★ 1 813 звёзд на GitHub

Об этом скилле

Host and share a remote tool

Use this workflow for user-owned code and infrastructure. Keep the workload on the user's computer or lab server; ToolUniverse Platform receives only the MCP tool manifest and relayed calls.

Choose the shortest path

  • Python function, model, database query, or workflow: wrap only the callable with @remote_tool, then use tu serve ... --share.
  • Existing Streamable HTTP MCP server: keep it running on loopback and use tuplatform-relay --forward ....
  • One of ToolUniverse's 30 reviewed scientific implementations: use its implementation-specific setup-<name>-remote-tool skill and tu remote share <name> instead.

Do not treat an arbitrary REST endpoint as MCP. Wrap it in a typed Python function first, or put a reviewed MCP adapter in front of it.

1. Install the reviewed clients

Open ToolUniverse Connect, go to Computers → Connect a computer (https://connect.aiscientist.tools/remote-servers), choose the Python or existing-MCP path, and copy the immutable install command shown there. Run it in a new Python 3.12 virtual environment. The command pins both the ToolUniverse and relay sources; do not replace the pins with a moving branch.

Confirm the expected commands exist:

tu --help
tuplatform-relay --help

Stop if installation or source access fails. A locally working model does not prove that sharing works.

2A. Wrap a Python model or function

Create my_tool.py. Load fixed model artifacts from provider-owned configuration; do not accept arbitrary caller-controlled filesystem paths or model identifiers.

from tooluniverse import remote_tool

@remote_tool
def predict(sequence: str, threshold: float = 0.5) -> dict:
    """Score one sequence with the locally hosted model."""
    if not isinstance(sequence, str) or not 1 <= len(sequence) <= 10_000:
        raise ValueError("sequence must contain 1 to 10,000 characters")
    score = min(len(sequence) / 100.0, 1.0)  # replace with the real model call
    return {"score": score, "passes": score >= threshold}

Use bounded, JSON-serializable inputs and outputs. Return stable field names and sanitized errors; never return secrets, local paths, stack traces, raw model objects, or unbounded tensors/files.

For a GPU model, verify the actual provider environment before launch:

python -c 'import torch; assert torch.cuda.is_available(); x=torch.arange(8, device="cuda"); print(torch.cuda.get_device_name(0), x.sum().item())'

This proves only CUDA tensor execution. Run a small, real inference below before claiming the model works.

2B. Use an existing MCP endpoint

Start the Streamable HTTP MCP server on loopback, for example http://127.0.0.1:8080/mcp. Confirm it implements MCP initialization, tools/list, and tools/call; a health endpoint alone is insufficient.

Do not forward a public endpoint containing embedded credentials. Keep provider API keys in the provider process and use the relay only for MCP traffic.

3. Validate locally before sharing

For Python mode, start without --share:

tu serve my_tool.py --host 127.0.0.1 --port 8080

From a second terminal, perform exact discovery and one semantic call:

python - <<'PY'
import asyncio
from fastmcp import Client

async def main():
    async with Client("http://127.0.0.1:8080/mcp") as client:
        tools = await client.list_tools()
        print([tool.name for tool in tools])
        result = await client.call_tool("predict", {"sequence": "ACGT", "threshold": 0.01})
        print(result)

asyncio.run(main())
PY

Check the exact tool name and schema, meaningful finite output, invalid-input behavior, latency, and the absence of secrets or local paths. For a real ML model, record evidence that the model loaded and executed on the intended CPU/GPU; discovery alone is not model validation.

4. Share privately with browser authorization

Stop the local-only command, then use one foreground command.

Python path:

tu serve my_tool.py --share --name "My Model" --service https://tooluniverse-backend.onrender.com

Existing MCP path:

tuplatform-relay --forward http://127.0.0.1:8080 --name "My Server" --service https://tooluniverse-backend.onrender.com

When no valid key is stored, the CLI opens a browser authorization link. Approve the matching computer name and code. No copy/paste is required; the computer-only key is verified and stored in a local 0600 file without being displayed. On a headless server add --no-browser and open the printed link elsewhere. If the first request expires, the CLI creates one replacement link automatically.

An explicit invalid TOOLUNIVERSE_SERVICE_KEY and all non-interactive jobs fail fast. Fix or unset the environment value; do not silently replace production secrets. Use protected secret injection only for unattended service accounts.

5. Verify through TU Platform

Wait until Computers shows the server online. As its owner, imp

Полный SKILL.md на GitHub

Установить host-and-share-remote-tool в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

agents/openai.yaml

FAQ

Что делает скилл host-and-share-remote-tool?

Host, validate, and privately share a user's own model, Python function, workflow, or existing Streamable HTTP MCP endpoint through ToolUniverse Platform. Use when turning a local CPU/GPU workload or lab endpoint into a stable TU remote tool, diagnosing its setup, or preparing it for controlled sharing.

Как установить скилл host-and-share-remote-tool?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл host-and-share-remote-tool запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить host-and-share-remote-tool с