Skip to content

docs: add a Pi guide for the Appwrite MCP server - #14648

Merged
atharvadeosthale merged 5 commits into
mainfrom
docs/pi-agent-guide
Oct 19, 2026
Merged

atharvadeosthale merged 5 commits into
mainfrom
docs/pi-agent-guide

Conversation

@atharvadeosthale

@atharvadeosthale atharvadeosthale commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Adds a Pi guide to the AI agents docs at /docs/tooling/ai/agents/pi. It has the same sections in the same order as the other agent guides, plus one step for MCP Events. This page pairs with #14466, which adds the Events section to the MCP server page and the announcement post. The Events step here links to /docs/tooling/ai/mcp-servers#events, an anchor that exists only once #14466 is merged.

The guide covers:

  1. Quick start prompts, as on every sibling page.
  2. Adding the MCP server: install Pi, install pi-mcp-adapter, add the hosted server to ~/.pi/agent/mcp-adapter.json, and sign in with OAuth through /mcp-auth appwrite. No API key is involved.
  3. Testing the integration with the standard example prompts.
  4. Reacting to project events: install @realmikekelly/pi-mcp-events, subscribe to users.user.created, see Pi wake up when a user is created, then unsubscribe. The event catalog and protocol details stay on the MCP server page, and the guide links there.

I ran every command on the page against production Cloud with Pi 1.3.0, pi-mcp-adapter 5.3.2, and pi-mcp-events 0.2.0.

Notes for #14466

Three things I found while checking the commands, in case you want #14466 to match:

  • Sign-in needs /mcp-auth appwrite. Step 3 of docs: announce MCP Events and document them on the MCP server page #14466 says "Start Pi with pi and sign in to Appwrite when your browser opens." The adapter's autoAuth setting defaults to false, so on a fresh start the browser doesn't open by itself. Running /mcp-auth appwrite opens it.
  • Version pins. docs: announce MCP Events and document them on the MCP server page #14466 installs npm:pi-mcp-adapter@^5.1.0 and npm:@realmikekelly/pi-mcp-events@^0.2.0. This page installs both without a range. Pi saves the range in its settings, so ^0.2.0 would keep pi update from moving pi-mcp-events to 0.3.0. Upstream pi-mcp-adapter has had the registerMcpProtocol hook since 5.1.0, so any current release works.
  • No fork needed. The pi-mcp-events README still points to Mike Kelly's adapter fork. The upstream adapter works, so neither page needs the fork.

Files

  • apps/console/src/content/docs/tooling/ai/agents/pi/index.markdoc: the new guide.
  • apps/console/public/icons/pi.svg and apps/console/public/icons/apps/pi.svg: the Pi mark. The first is a 20x20 monochrome icon, like opencode.svg. The second is the 72x72 tile for the OAuth consent screen, in Pi's brand colors.
  • Registration, following Grok Build, the most recent agent added:
    • both nav trees (navigation/sections.ts, navigation/local-sections.ts)
    • the docs home tool cards (home-content.ts)
    • the IDE cards on /docs/tooling and in the mcp-add-ides-tools partial, in both the light and dark blocks
    • config/ide.ts, which feeds the MCP IDE list
    • the icon maps (markdoc-icons.ts, frameworks/icons.ts, cover-generator/built-in-icons.ts)
    • the init ticket stack picker (init/ticket-stack.ts)
  • apps/console/src/lib/oauth-known-clients.ts: recognizes Pi on the Console's OAuth consent and authorized-apps screens. pi-mcp-adapter registers through DCR as Pi Coding Agent, with a loopback redirect on an OS-assigned port (http://127.0.0.1:<port>/callback) and https://github.com/nicobailon/pi-mcp-adapter as client_uri. I read these values from the adapter source (mcp-oauth-provider.ts).
  • apps/console/src/lib/seo/agent-setup.ts: a Pi section in the agent-facing /setup.md, with a matching test case in mcp-adoption.test.ts. skills add ... -a pi is a supported target in the skills CLI. I ran the install in a throwaway HOME, and it wrote the Appwrite skills to ~/.pi/agent/skills.
  • Regenerated with the repo scripts: docs/generated/manifest.ts, docs/generated/search-index.ts, and public-icons/manifest.ts. The manifest also picks up two reading-time updates on other pages (avatars/favicons, self-hosting environment variables). Earlier merges never regenerated those.

Not registered:

  • The home page tool strip, the /for-agents IDE grid, and the Console project MCP section. Grok Build isn't registered in these lists either.
  • HOME_MCP_STACK_VISIBLE_IDS in ide.ts. It shows a fixed set of four tools on the home page.

Screenshots

Recorded from Pi 1.3.0 sessions against production Cloud in a test project (pi-guide), at 1460x822 (2x). Pi ran DeepSeek V4.1 Flash through Together.

The dark and light variants show the same session. Pi ran with a theme that uses 256-color palette slots. I recorded the terminal output of each run once and rendered it twice, once with the colors of Pi's built-in dark theme and once with its light theme.

Step 3: Pi answers List the users in my Appwrite project pi-guide

List users, dark

List users, light

Step 4: Pi subscribes to users.user.created, wakes up when a user is created, reports the user, and unsubscribes

MCP Events flow, dark

MCP Events flow, light

The GIFs are 36 seconds long and about 3.8 MB each. only_dark and only_light render one per reader. I chose a GIF over the docs {% video %} tag because a GIF plays without a click. The trade-off is that a GIF loops and has no pause control.

Test Plan

  • Ran every command on the page:
    • curl -fsSL https://pi.dev/install.sh | sh
    • pi install npm:pi-mcp-adapter and pi install npm:@realmikekelly/pi-mcp-events (exit 0, and pi list shows both)
    • the mcp-adapter.json config
    • /mcp-auth appwrite: the browser opens, OAuth completes, and Pi connects with 4 tools and 1 resource
    • /mcp, which lists appwrite and its tools
  • Ran Step 3 and Step 4 in Pi for each theme:
    • List the users in my Appwrite project pi-guide returned the two test users.
    • pi install npm:@realmikekelly/pi-mcp-events installed the extension, and Pi was restarted to load it.
    • The subscribe prompt created a webhook named MCP events push | users.user.created | ... in the project.
    • Creating a user woke Pi without a new prompt. Pi looked up the user and reported the name and email.
    • Unsubscribe from users.user.created stopped the stream, and the project's webhook list was empty again.
  • bun run lint:content, lint:removed-blog-links, lint:native-dialogs, lint:sdk-pins, and lint:types --against HEAD pass, with no new type errors.
  • ESLint passes on the changed TS files. bun test src/lib/mcp-adoption.test.ts passes, 8 of 8.
  • Rendered the page and /setup.md on the local dev server.

Related PRs and Issues

Add a Pi agent guide that connects the hosted Appwrite MCP server
through pi-mcp-adapter with OAuth, tests it with a prompt, and
subscribes to users.user.created with pi-mcp-events.

Register Pi in both docs nav trees, the docs home and tooling cards,
the MCP IDE list, the icon maps, the Console's known OAuth clients,
and the agent-facing /setup.md. Add the Pi icons and regenerate the
docs manifest, search index, and public icon manifest.
@luxor-code-review

luxor-code-review Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review complete. No issues found — approved ✅.


This PR registers the Pi agent in the console's MCP/agent tooling: it adds a docs page for Pi under tooling/ai/agents, extends the IDE/agent config catalog with a Pi MCP adapter entry, recognizes Pi's OAuth client identifiers, and regenerates the docs manifest, search index, navigation, home content, and icon mappings to include the new page. Docs partials for adding MCP tools are updated with the Pi instructions, and an adoption test covers the new slug. All candidate issues raised during review were adjudicated as non-defects: both icon paths exist, the OAuth matcher mirrors the established Codex pattern, and generated-file deltas are consistent with the new markdoc content.

Reviewed commit: 823c4b5

@appwrite

appwrite Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

New Console

Project ID: new-console

Sites (1)
Site Status Logs Preview QR
 New Console
new-console
Ready Ready View Logs Preview URL QR Code

Tip

Storage files get ClamAV malware scanning and encryption by default

@ghost

ghost commented Oct 19, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

Adds an end-to-end Pi guide for connecting to Appwrite's hosted MCP server, signing in with OAuth, testing API access, and subscribing to project events. Registers Pi across documentation discovery, navigation, IDE and icon catalogs, OAuth client displays, and agent setup instructions, with related assets and regenerated indexes.

Latest changes: The latest commit removes the fork compatibility note and Free-plan webhook quota note from the Pi guide while retaining the unsubscribe instructions.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 7
File Change
apps/console/src/content/docs/tooling/ai/agents/pi/index.markdoc; apps/console/src/content/docs-partials/mcp-add-ides-tools.md; apps/console/src/content/docs/tooling/index.markdoc Adds the Pi integration and MCP Events guide, and surfaces Pi in the tooling and MCP IDE documentation.
apps/console/public/icons/pi.svg; apps/console/public/icons/apps/pi.svg; apps/console/public/images/docs/mcp/pi/events-dark.gif; apps/console/public/images/docs/mcp/pi/events-light.gif; apps/console/public/images/docs/mcp/pi/list-users-dark.avif; apps/console/public/images/docs/mcp/pi/list-users-light.avif Adds Pi icons and light/dark screenshots for the guide.
apps/console/src/lib/config/ide.ts; apps/console/src/lib/cover-generator/built-in-icons.ts; apps/console/src/lib/docs/home-content.ts; apps/console/src/lib/docs/markdoc-icons.ts; apps/console/src/lib/docs/navigation/local-sections.ts; apps/console/src/lib/docs/navigation/sections.ts; apps/console/src/lib/frameworks/icons.ts; apps/console/src/lib/init/ticket-stack.ts Registers Pi in IDE configuration, documentation cards and navigation, icon maps, and the init ticket stack picker.
apps/console/src/lib/oauth-known-clients.ts Adds the Pi MCP client to the recognized OAuth client display names.
apps/console/src/lib/seo/agent-setup.ts; apps/console/src/lib/mcp-adoption.test.ts Adds Pi to generated agent setup instructions and covers the setup output in the adoption test.
apps/console/src/lib/docs/generated/manifest.ts; apps/console/src/lib/docs/generated/search-index.ts; apps/console/src/lib/public-icons/manifest.ts Regenerates documentation discovery and public icon manifests for the new guide and icons.
apps/console/src/content/docs/tooling/ai/agents/pi/index.markdoc Adds the Pi setup, usage, and MCP Events guide.

Reviewed the commits since 9a22630 · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Tier S · Looks good to merge. Summary

Fix the remote-server sentence, point Windows readers to pi.dev,
tell readers they don't need the pi-mcp-events adapter fork, note the
Free plan webhook limit and that /reload drops subscriptions, and
explain how the adapter treats servers added with pi mcp add.

Register Pi in the init ticket stack like Grok Build, and correct the
OAuth client comment: the adapter's DCR callback port is OS-assigned.
@atharvadeosthale

Copy link
Copy Markdown
Member Author

@hansi-codes review

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Tier S · Looks good to merge. Summary

Add a light and a dark screenshot of Pi listing the users in a project,
and a light and a dark GIF of the MCP Events flow: Pi subscribes to
users.user.created, wakes up when a user is created, reports the user,
and unsubscribes. Both are recorded from Pi 1.3.0 sessions against
Appwrite Cloud at 1460x822 (2x).
@atharvadeosthale

Copy link
Copy Markdown
Member Author

@hansi-codes review

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Tier S · Looks good to merge. Summary

Record the terminal output of one Pi session per visual and render it
with a dark and a light palette, so both variants show the same run.
Name the Step 3 prompt above its screenshot, move the events GIF
below the unsubscribe step, and refer to pi-mcp-adapter as the adapter
mid-sentence.
@atharvadeosthale

Copy link
Copy Markdown
Member Author

@hansi-codes review

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Tier S · Looks good to merge. Summary

@atharvadeosthale
atharvadeosthale merged commit 7e9359e into main Oct 19, 2026
33 of 34 checks passed
@atharvadeosthale
atharvadeosthale deleted the docs/pi-agent-guide branch October 19, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant