Launch a Server¶
ToolRegistry Hub can expose every tool as a network endpoint — either an OpenAPI (REST) server or an MCP server. This page walks you from install to first request.
Install server dependencies¶
# Full server (OpenAPI + MCP, Python 3.10+)
pip install toolregistry-hub[server]
# OpenAPI only
pip install toolregistry-hub[server_openapi]
# MCP only (Python 3.10+)
pip install toolregistry-hub[server_mcp]
Start the server¶
OpenAPI¶
Once running:
- API root:
http://localhost:8000 - Interactive docs:
http://localhost:8000/docs - OpenAPI spec:
http://localhost:8000/openapi.json
MCP¶
# Streamable HTTP (recommended for remote clients)
toolregistry-hub mcp --transport streamable-http --host 0.0.0.0 --port 8000
# SSE transport
toolregistry-hub mcp --transport sse --host 0.0.0.0 --port 8000
# Stdio transport (for local agent integration)
toolregistry-hub mcp --transport stdio
Send your first request¶
curl¶
curl -X POST "http://localhost:8000/tools/calculator/evaluate" \
-H "Content-Type: application/json" \
-d '{"expression": "2 + 2 * 3"}'
Python¶
import requests
response = requests.post(
"http://localhost:8000/tools/calculator/evaluate",
json={"expression": "2 + 2 * 3"},
)
print(response.json()) # {"result": "8"}
Next steps¶
| I want to… | Go to |
|---|---|
| Configure auth or tool loading | Server Configuration |
| Run with Docker | Docker Deployment |
| See all CLI flags | CLI Reference |
| Browse every endpoint | API Endpoints |
| Use tools as a Python library instead | Library Usage |