docs: MCP user-guide notebook (search, upsert, ADK agent, JWT auth)#626
docs: MCP user-guide notebook (search, upsert, ADK agent, JWT auth)#626nkanu17 wants to merge 4 commits into
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
There was a problem hiding this comment.
Pull request overview
Adds a new user guide notebook documenting how to serve an existing RedisVL index over MCP (including client usage and a Google ADK agent example), and wires it into the docs navigation. Also updates the lockfile to reflect the project version bump.
Changes:
- Add
docs/user_guide/15_mcp.ipynbwalkthrough for serving an index over MCP and usingsearch-records/upsert-records(plus ADK integration). - Update
docs/user_guide/how_to_guides/index.mdto link the new MCP notebook in cards, quick-reference table, and toctree. - Update
uv.lockto reflectredisvlversion0.20.0.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
uv.lock |
Updates the editable redisvl package entry to version 0.20.0. |
docs/user_guide/how_to_guides/index.md |
Adds navigation entries pointing to the new MCP notebook. |
docs/user_guide/15_mcp.ipynb |
Introduces a hands-on MCP notebook (index creation, config, server/client usage, ADK agent example, cleanup). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add docs/user_guide/15_mcp.ipynb, a hands-on guide that creates and loads a Redis index, writes and validates an MCP config, starts the RedisVL MCP server over Streamable HTTP, exercises the search-records and upsert-records tools from an MCP client, and wires the same server to a Google ADK agent. Register the notebook in the how-to guides index (card, quick reference, and toctree).
Add Section 6 to the MCP user-guide notebook demonstrating optional JWT bearer authentication for the HTTP transports (PR #628): - Start a second, authenticated server with a server.auth block, minting a throwaway RSAKeyPair and validating against its static public key so the demo needs no external IdP. - Show a no-token request rejected (401), a read-only token that can search but is forbidden from upsert, and a read+write token that can upsert (coarse read/write scope gating). - Update the Section 3 warning, cleanup, and recap to cover auth and link to the new Authenticate RedisVL MCP how-to guide.
e0e9e8f to
e47d2b7
Compare
Address Copilot review on PR #626: - Mark the %pip install cell with # NBVAL_SKIP so notebook tests use the already-synced uv env instead of overriding editable redisvl from PyPI. - Guard the pandas import (optional, only used to render result tables) so make test-notebooks does not fail when pandas is absent. - Import asyncio and use await asyncio.sleep(1.0) in both readiness pollers instead of time.sleep(1.0), which blocked the notebook event loop.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0738063. Configure here.
- Bump notebook install pin to redisvl>=0.21.0 since Section 6 (JWT auth) requires the auth feature introduced in v0.21.0. - Make Section 6 self-contained: import asyncio/socket/subprocess/time and Client, and define port_in_use locally, so the JWT demo runs even when Section 3 used Option A (terminal-launched server) and its cell was skipped.
vishal-bala
left a comment
There was a problem hiding this comment.
We have a similar notebook in applied-ai-resources for working with ADK and a RedisVL MCP server - would it be beneficial to add the JWT auth functionality to that one, or is there a push to have a separate notebook for the topic as part of the user guide as well?

Summary
Adds a hands-on MCP user-guide notebook (
docs/user_guide/15_mcp.ipynb) that walks the full RedisVL MCP loop end to end, now including a JWT authentication section aligned with the optional auth feature shipped in #628.The branch has been rebased onto
main(v0.21.0) so it sits cleanly on top of the JWT auth work.What's in the notebook
HFTextVectorizerembeddings, load).default_embed_text_fieldso clients only ever send text.search-recordsandupsert-recordsvia a plainfastmcpclient.LlmAgentat the same endpoint withMcpToolset.server.authblock, then demonstrate coarse read/write gating.New auth section (Section 6)
stdiois never authenticated.RSAKeyPairand validates against its staticpublic_key, so the demo needs no external IdP.Authenticate RedisVL MCPhow-to guide.Downstream changes
docs/user_guide/how_to_guides/index.md— adds the notebook to the CLI Operations card, quick-reference table, and toctree (alongside the auth how-to from feat(mcp): optional JWT authentication for HTTP transports #628; rebase conflict resolved to keep both).Verification / Testing
The notebook was executed end to end against a live Redis (Search enabled), running every cell except the
%pip installcells — all cells passed, 0 errors:search-recordsvector, 3 resultsupsert-recordskeys_upserted=1, retrievable via follow-up searchsearch-recordstool call (real OpenAI call)upsert-recordstool callLive cells require Redis with Search and the
redisvl[mcp,sentence-transformers]extras; the ADK section additionally needsgoogle-adk,litellm, andOPENAI_API_KEY. Auth API usage (RSAKeyPair,BearerAuth,create_token(..., scopes=...), scope gating) mirrors the in-repo integration tests intests/integration/test_mcp/test_transport_auth.py.Kept as a draft.
Note
Low Risk
Documentation and notebook examples only; no application or MCP server code changes.
Overview
Adds
docs/user_guide/15_mcp.ipynb, an end-to-end user guide for serving a RedisVL index viarvl mcp: create/load an index, write and validate YAML config, start Streamable HTTP (terminal or notebook subprocess with MCP handshake readiness), callsearch-records/upsert-recordswithfastmcp, wire a Google ADKLlmAgentviaMcpToolset, and run a Section 6 JWT demo (second server on port 8001, read/write scope gating) aligned with the auth how-to. Includes security warnings, cleanup for both servers, and links tomcp.md/mcp_authentication.md.Updates
docs/user_guide/how_to_guides/index.mdto surface the notebook in the CLI Operations card, quick-reference table, and hidden toctree.Reviewed by Cursor Bugbot for commit 8c703e4. Bugbot is set up for automated code reviews on this repo. Configure here.