Skip to content

docs(tutorials): secure an agent's MCP tool calls with OAP and SpiceDB - #612

Merged
samkim merged 3 commits into
mainfrom
mcp-shared-drive-tutorial
Nov 30, 2026
Merged

samkim merged 3 commits into
mainfrom
mcp-shared-drive-tutorial

Conversation

@sohanmaheshwar

@sohanmaheshwar sohanmaheshwar commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What this adds

A tutorial at /spicedb/tutorials/secure-mcp-tool-calls, listed under Tutorials in the sidebar. It walks through the examples/mcp-shared-drive sample in openagentprimitives:

  1. An agent reads a shared drive through the unmodified MCP filesystem server. A planted instruction in a template makes it read payroll.csv and write salaries into a draft.
  2. The same agent runs on OAP, which checks every tool call in SpiceDB as the person asking. Alice's request for finance files is refused with no one to approve it. Bob approves one file for her, then reads payroll himself.
  3. A short Next Steps section on applying the same principles to any agentic app.

Merge order

The sample lives in an openagentprimitives PR that hasn't merged yet (link below). This PR is a draft until that one lands, so the tutorial never points at an example that doesn't exist.

Checks

  • pnpm run format:check passes repo-wide.
  • markdownlint-cli2 on the page: 0 errors. CI's lint:markdown and spellcheck globs only cover pages/**, so I ran markdownlint on the page directly.
  • The page renders in pnpm dev. All seven images load, and the Slack screenshots are sized so their text matches across both accounts.
  • Every command and prompt in the tutorial was run end to end against a fresh kind cluster; the screenshots come from that run. In them, Bob's Slack account is named "Sohan", and the page says so.

…nd SpiceDB

Walks through the examples/mcp-shared-drive sample in openagentprimitives:
an agent reading a shared drive over an unmodified MCP filesystem server
leaks payroll when a planted instruction asks for it, and the same agent on
OAP has every tool call checked in SpiceDB as the person asking.
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment status for this pull request.

Name Status Preview Updated (UTC)
docs 🟢 Ready Visit Preview Nov 30, 2026 02:42pm

The tutorial leaves the MCP server unmodified and checks the agent's
tool calls before they reach it, so "Secure an MCP Server" promised
something the page doesn't do. Rename the title and the slug to match.
@sohanmaheshwar sohanmaheshwar changed the title docs(tutorials): secure an MCP server with OAP and SpiceDB docs(tutorials): secure an agent's MCP tool calls with OAP and SpiceDB Nov 30, 2026
@samkim
samkim merged commit ea8f5fc into main Nov 30, 2026
12 checks passed
@samkim
samkim deleted the mcp-shared-drive-tutorial branch November 30, 2026 17:42
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 30, 2026

This branch was successfully deployed

1 active deployment
Preview (GitHub Actions) — 05f3ceb2 Deployed Nov 30, 2026 by github-actions[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants