Quickstart
In five minutes you'll have an MCP client connected to ScaiGrid, listing the tool catalog filtered for your permissions, and running a chat completion through it.
You need:
- A ScaiGrid API key (
sgk_...) for a tenant where you have at leastmodels:useandmodels:list. - Python 3.10+ or Node 18+, depending on which sample you run.
- The MCP SDK for your language:
pip install mcpornpm install @modelcontextprotocol/sdk.
1 2 | |
1. Confirm the transport is up#
The MCP transport is mounted at /mcp on the ScaiGrid host. It does not respond to plain GET — it's a streamable-HTTP transport — but you can verify the host is reachable and your token is accepted by hitting the admin tool-list endpoint:
1 2 | |
A 200 with a JSON list of tool names means you're good. A 401 means your token is wrong or expired; a 403 means your role doesn't have scaimcp:access.
2. Connect and list tools#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
1 2 3 4 | |
The list you see is filtered for your identity — modules disabled for your tenant are hidden, tools you can't invoke are hidden. A super-admin sees everything; a tenant_user typically sees inference and session tools only.
3. Call a tool#
Run a non-streaming chat completion through inference_chat:
1 2 3 4 5 6 7 8 | |
1 2 3 4 5 6 7 8 9 | |
The response is a single text content block containing a JSON-encoded result with id, model, content, finish_reason, and usage. The usage object is what gets recorded against your tenant budget.
4. List models, then call again#
A typical agent loop: discover what's available, then invoke. models_list returns the frontend model catalog your tenant can use:
1 2 | |
Pick a slug from the response and re-run inference_chat with it.
5. Check the audit trail#
Every MCP call goes through the same accounting and audit pipeline as a REST call. Confirm in two places:
1 2 3 | |
1 2 3 | |
The chat tool call shows up as a normal inference event — there's no separate "MCP" audit category, because MCP is just another front door.
What just happened#
- Your client opened a streamable-HTTP MCP session against
/mcpand authenticated with the bearer token. - ScaiMCP resolved the token to a
CurrentUserusing the same code path as the REST API. list_toolsran the catalog through three filters: core tool permissions, enabled-module gating, and the cloud-MCP aggregator from ScaiLink.call_tool("inference_chat", ...)invoked the sameInferenceService.chatthat/v1/inference/chatuses — so the dispatcher, accounting, and audit log all behave identically.
Next#
- Connect Claude Desktop for the end-user setup.
- Architecture for how the pieces fit.
- Tool naming to read tool names correctly, especially the
remote.prefix for ScaiLink-registered cloud servers.