Skip to content

Conversation

@atharvadeosthale
Copy link
Member

@atharvadeosthale atharvadeosthale commented Sep 12, 2025

Summary by CodeRabbit

  • Documentation
    • Added a new "Appwrite MCP and OpenCode" guide with setup steps, sample configuration, test prompts (API and Docs), and an OAuth authentication walkthrough.
    • Added OpenCode to the MCP docs navigation under Integrations for quick access.
    • Added OpenCode cards to the MCP tooling list (light and dark themes).

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 12, 2025

Walkthrough

Adds OpenCode to MCP documentation and navigation: two OpenCode tool cards were appended to src/partials/mcp-add-ides-tools.md (light and dark themes, placed after the VS Code cards); a new Integrations nav entry { label: 'OpenCode', href: '/docs/tooling/mcp/opencode' } was inserted after VS Code in src/routes/docs/tooling/mcp/+layout.svelte; a new Markdoc page at src/routes/docs/tooling/mcp/opencode/+page.markdoc was added with prerequisites, sample opencode.json configs (local API and remote Docs servers), test prompts in tabs, an info block, and an OAuth image. No public/exported APIs changed.

Possibly related PRs

Suggested reviewers

  • ebenezerdon
  • arielweinberger
  • eldadfux

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "add opencode to mcp docs" is a concise and accurate summary of the primary change — adding OpenCode to the MCP documentation and related UI (new docs page, navigation entry, and tooling cards). It clearly relates to the changes in the diff and is specific enough for a teammate scanning history. For style consistency you may prefer capitalizing it as "Add OpenCode to MCP docs," but the current title is acceptable.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat-mcp-opencode

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 59d9bcb and dfe2980.

📒 Files selected for processing (1)
  • src/routes/docs/+page.svelte (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build
  • GitHub Check: format
  • GitHub Check: tests
🔇 Additional comments (1)
src/routes/docs/+page.svelte (1)

414-427: OpenCode MCP card LGTM — route, nav and logo verified

Route: src/routes/docs/tooling/mcp/opencode/+page.markdoc; Nav: src/routes/docs/tooling/mcp/+layout.svelte (label: "OpenCode", href: "/docs/tooling/mcp/opencode"); Logos: static/images/docs/mcp/logos/dark/opencode.svg (and static/images/docs/mcp/logos/opencode.svg).


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (4)
src/routes/docs/tooling/mcp/opencode/+page.markdoc (4)

1-8: Minor copy tweak to avoid lede duplication.

Apply:

- Learn how you can add the Appwrite MCP servers to OpenCode to interact with both the Appwrite API and documentation.
+ This guide shows how to add Appwrite MCP servers to OpenCode to work with both the Appwrite API and the documentation.

9-23: Use “Prerequisites” (house style) and tighten phrasing.

Apply:

-Before you begin, ensure you have the following **pre-requisites** installed on your system:
+Before you begin, ensure you have the following prerequisites installed:

50-54: Clarify endpoints for Cloud vs self-hosted.

Add a bullet:

  • For self-hosted installations, set APPWRITE_ENDPOINT to your instance URL, e.g., https://your-domain.example/v1.

83-110: Favor non-destructive example prompts for first-run tests.

Replace or move “Delete a specific user by ID” under an “Advanced” or “Destructive” subsection, and default to read-only actions for initial verification.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 66c9624 and 73ab0f0.

⛔ Files ignored due to path filters (3)
  • static/images/docs/mcp/logos/dark/opencode.svg is excluded by !**/*.svg
  • static/images/docs/mcp/logos/opencode.svg is excluded by !**/*.svg
  • static/images/docs/mcp/opencode/oauth-question.png is excluded by !**/*.png
📒 Files selected for processing (3)
  • src/partials/mcp-add-ides-tools.md (2 hunks)
  • src/routes/docs/tooling/mcp/+layout.svelte (1 hunks)
  • src/routes/docs/tooling/mcp/opencode/+page.markdoc (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: tests
  • GitHub Check: build
🔇 Additional comments (5)
src/partials/mcp-add-ides-tools.md (1)

21-23: LGTM — target page found; confirm logo assets exist

Verified src/routes/docs/tooling/mcp/opencode/+page.markdoc exists. Images not confirmed — confirm images/docs/mcp/logos/opencode.svg and images/docs/mcp/logos/dark/opencode.svg resolve to avoid broken cards. Also applies to lines 45–47.

src/routes/docs/tooling/mcp/+layout.svelte (1)

57-61: Action required — route missing: create or fix the href.

fd returned 0 matches for src/routes/docs/tooling/mcp/opencode/+page.markdoc — either add that +page.markdoc at that exact path (ensure only one) or update the href in src/routes/docs/tooling/mcp/+layout.svelte to the correct existing route. Optional: add new: isNewUntil('31 Oct 2025') to highlight.

src/routes/docs/tooling/mcp/opencode/+page.markdoc (3)

112-112: Image asset verified — no action required.
File exists at static/images/docs/mcp/opencode/oauth-question.png and matches the Markdoc reference (/images/docs/mcp/opencode/oauth-question.png).


36-39: MCP local config is valid — confirm external CLI.

opencode accepts "type": "local" with a "command" (array or string) and "enabled"; local MCPs use stdio by default so no explicit "stdio"/"transport" field is required. Use {env:VAR} / {file:path} for interpolation (not ${VAR}). The snippet below is sufficient.

File: src/routes/docs/tooling/mcp/opencode/+page.markdoc Lines: 36-39

    "appwrite": {
      "type": "local",
      "command": ["uvx", "mcp-server-appwrite", "--sites"],
      "enabled": true,

Action: verify that "uvx mcp-server-appwrite --sites" is the correct CLI + flags and that the binary is available at runtime (PATH or repo).


57-70: Confirm remote server URL schema and endpoint

  • type: "remote" expects an HTTPS URL (Streamable HTTP / SSE); use wss:// only for MCP servers that explicitly expose a WebSocket transport.
  • https://mcp-for-docs.appwrite.io is the documented Appwrite Docs MCP endpoint (listed in Appwrite docs / PulseMCP) — no change required.

Comment on lines 32 to 48
```json
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"appwrite": {
"type": "local",
"command": ["uvx", "mcp-server-appwrite", "--sites"],
"enabled": true,
"environment": {
"APPWRITE_PROJECT_ID": "your-project-id",
"APPWRITE_API_KEY": "your-api-key",
"APPWRITE_ENDPOINT": "https://<REGION>.cloud.appwrite.io/v1"
}
}
}
}
```
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Avoid encouraging hardcoded secrets in opencode.json. Add a security note and env-based guidance.

Consider adding this block right after the JSON snippet:

+{% info title="Security tip" %}
+Avoid committing secrets to version control. Prefer environment variables or your OS keychain. If you must keep `opencode.json` locally, restrict file permissions and exclude it from git.
+{% /info %}

If OpenCode supports env interpolation, prefer:

"environment": {
  "APPWRITE_PROJECT_ID": "${APPWRITE_PROJECT_ID}",
  "APPWRITE_API_KEY": "${APPWRITE_API_KEY}",
  "APPWRITE_ENDPOINT": "https://<REGION>.cloud.appwrite.io/v1"
}
🤖 Prompt for AI Agents
In src/routes/docs/tooling/mcp/opencode/+page.markdoc around lines 32 to 48, the
JSON snippet currently shows hardcoded Appwrite secrets; add a short security
note immediately after the JSON block advising against hardcoding secrets and
recommending using environment variables or a secrets manager, and update the
example to use environment interpolation placeholders (e.g., reference
APPWRITE_PROJECT_ID, APPWRITE_API_KEY, APPWRITE_ENDPOINT as env vars) with a
brief mention that this requires OpenCode env interpolation support or an
external secrets store; keep the note concise and show the env-based guidance
textually (no raw secret values).

Copy link
Member

@adityaoberai adityaoberai left a comment

Choose a reason for hiding this comment

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

@atharvadeosthale can you also add this to the Docs landing page?

Image

@atharvadeosthale atharvadeosthale merged commit b35b8fd into main Sep 23, 2025
4 checks passed
@atharvadeosthale atharvadeosthale deleted the feat-mcp-opencode branch September 23, 2025 14:51
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.

2 participants