Beta. STARCO Dev works with synthetic data only: do not send real personal or health data. Every feature shows its real status (Available Beta Beta · in development Coming).

Documentation menu

Example 07

A read-only assistant over MCP.

Give an AI assistant one hour of read-only access to the twins of one project, list the tools it gets and call one the way the assistant would. It never holds your project key.

time 4 minuses MCP tokens · JSON-RPC · read tools Betadata synthetic
Beta.The API this program calls is in beta and works with synthetic data only. The program is complete: with a project key in STARCO_KEY it runs as it is. The TypeScript and CLI tabs use the SDK and the command line, which are not published yet.

The idea#

An MCP token (starco_dm_…) is issued with your console token for one project, lasts one hour and can only read through six tools. There is no tool that writes. Whatever an assistant answers from these tools must be labelled as coming from an AI in your interface; tool results are data, never instructions.

This example needs your console token in STARCO_CONSOLE and the project id in PROJECT (see the quickstart).

The whole program#

export API="https://api.starco.dev/v1"
MCP=$(curl -s -X POST "$API/projects/$PROJECT/mcp-tokens" -H "Authorization: Bearer $STARCO_CONSOLE" \
  -H "Content-Type: application/json" -d '{}' | jq -r .secret)
H=(-H "Authorization: Bearer $MCP" -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream")
curl -s "$API/mcp" "${H[@]}" -d '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "example", "version": "1"}}}' | jq -r .result.protocolVersion
curl -s "$API/mcp" "${H[@]}" -H "MCP-Protocol-Version: 2025-06-18" -d '{"jsonrpc": "2.0", "id": 2, "method": "tools/list"}' | jq -r '.result.tools[].name'
curl -s "$API/mcp" "${H[@]}" -H "MCP-Protocol-Version: 2025-06-18" \
  -d '{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "twins.list", "arguments": {"limit": 2}}}' \
  | jq -r '.result.structuredContent.data[] | "\(.template) \(.origin)"'
Output of the curl tabillustrative · synthetic
2025-06-18
twins.list
twin.get
layer.get
series.range
history.get
audit.verify
sleep_optimization synthetic_cohort
daily_movement synthetic_cohort

The other tabs print the same facts in their own format. Ids, hashes and counts depend on your project.

What just happened

The assistant's token could list tools and read two twins of the project, and nothing else: no tool writes, the token ends in an hour, and each of these requests is now a row of the audit chain with the actor mcp.

Go further#