brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
host-and-share-remote-toolHost, 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.
Independent GitHub snapshot · Automated classification · Original documentation governs
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.
@remote_tool, then use tu serve ... --share.tuplatform-relay --forward ....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.
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.
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.
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.
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.
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.
Wait until Computers shows the server online. As its owner, import or open the remote tool and make one small semantic call through TU Platform. Confirm the platform result matches the local result. Record local discovery, local call, online status, platform discovery, platform call, model/device evidence, and timestamps separately.
Keep the connection private by default. Public marketplace publication, another user's authorization/isolation, load behavior, and long-running supervision are separate validations; do not claim them from an owner-only smoke test.
tuplatform-service install command shown by the website, then verify its user service and logs.Remove only the local login with tu remote logout. Revoke the computer-only platform connection and then remove the local copy with:
tu remote logout --revoke
For an SDK-only existing-MCP setup, use tuplatform-auth logout --revoke. Revocation intentionally leaves the server record offline for owner inspection; delete that record separately in Computers if desired.
Classify outcomes precisely: installation blocked, provider dependency blocked, GPU unavailable, credential rejected, local discovery passed, real inference passed, relay passed, or platform semantic call passed. Never convert a blocked or discovery-only result into "working."