feat: add Python MCP server template - #353
Open
ChiragAgg5k wants to merge 4 commits into
Open
Conversation
Stateless MCP over Appwrite Functions using the official Python SDK (mcp==2.0.0) with a buffered Streamable HTTP adapter. Also teach the README table generator to title-case "mcp" as "MCP". Closes appwrite#352 Co-authored-by: Cursor <cursoragent@cursor.com>
Greptile SummaryAdds a stateless Python MCP server template for Appwrite Functions and updates generated template-name capitalization.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (3): Last reviewed commit: "Revert "docs: quiet pip in MCP server bu..." | Re-trigger Greptile |
Non-numeric or non-positive values used to raise ValueError before dispatch and skip an MCP JSON-RPC response. Co-authored-by: Cursor <cursoragent@cursor.com>
Keeps Appwrite Function build logs to open-runtimes lines instead of full dependency resolution spam. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the verbose pip install build command. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a Python MCP server template for Appwrite Functions (
python/mcp-server).Stateless Model Context Protocol over HTTPS using the official Python SDK (
mcp==2.0.0). Demo tools:echo,add. Optional bearer auth. Soft timeout before the 30s domain hard-cap.Appwrite Functions cannot run
MCPServer.streamable_http_app()— there is no Starlette lifespan, soStreamableHTTPSessionManagerraisesRuntimeError: Task group is not initialized. This template drives the SDK's buffered entry points instead:serve_one+Connection.from_envelope2026-07-28) →handle_modern_request(ASGI scope/receive/send shim)src/appwrite_mcp/is kept as a package (not flattened) so modules likeauth/dispatch/transportdo not sit at the front ofsys.pathnext to Open Runtimes' top-levelservermodule.Also adds
mcp: "MCP"to the README table generatoroverrideWordsso the template titles as MCP Server. The root README table is intentionally left unchanged; the existing workflow regenerates it after merge.Related: #352
Live demo
Or Cursor / Claude Desktop
mcp.json:{ "mcpServers": { "appwrite-mcp-demo": { "url": "https://mcp-example.sgp.appwrite.run" } } }Standalone reference (tests, local dev server, more examples): https://github.com/ChiragAgg5k/appwrite-mcp-template
Testing
python-3.12), domainhttps://mcp-example.sgp.appwrite.runinitialize→notifications/initialized(202) →tools/list→tools/call echouv run pytest— 14 passed)pip install -r requirements.txtinpython/mcp-server, push as a Function, point a client at the domainNotes for reviewers
mcp==2.0.0exactly — uses private helpers (_streamable_http_modern,_lowlevel_server) that can move.appwrite/appwrite→function.php) intentionally deferred; many templates ship without one.