feat(MCP): [4/5] add RedisVL MCP CLI#544
feat(MCP): [4/5] add RedisVL MCP CLI#544vishal-bala merged 35 commits intofeat/RAAE-1395-redisvl-mcpfrom
Conversation
…h-tool # Conflicts: # tests/integration/test_mcp/test_server_startup.py
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9441c1d942
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
rbs333
left a comment
There was a problem hiding this comment.
LGTM! figure this goes after the other stuff
…to feat/RAAE-1397/search-tool # Conflicts: # redisvl/mcp/server.py
… feat/RAAE-1398/upsert-tool
… feat/RAAE-1399-mcp-cli
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.
…tool # Conflicts: # redisvl/mcp/config.py # redisvl/mcp/filters.py # redisvl/mcp/server.py # redisvl/mcp/tools/__init__.py # tests/unit/test_mcp/test_config.py
df02343
into
feat/RAAE-1395-redisvl-mcp
) This PR is an aggregation of changes reviewed in the following PRs: - #531 - #532 - #539 - #540 - #544 - #547 <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Adds a new MCP server surface area that performs schema inspection, embedding, and optional write operations against Redis, increasing operational and correctness risk despite extensive validation and tests. Optional dependency gating and Python-version checks reduce impact on core installs but the new server path could affect Redis access patterns and resource lifecycle. > > **Overview** > Adds an optional **RedisVL MCP server** that binds to one existing Redis Search index and exposes a stable tool contract for `search-records` and (unless *read-only*) `upsert-records`, driven entirely by a YAML config. > > Introduces new MCP configuration/settings loading with env var substitution, schema inspection plus `schema_overrides`, reserved-field and capability validation (including native vs fallback hybrid search), plus guarded concurrency/timeouts and deterministic error mapping. Updates the `rvl` CLI and docs/README/installation to support `redisvl[mcp]` (Python 3.10+) and adds comprehensive unit/integration tests; also tweaks filter type hints and ignores `.codex/`. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 6e2fe5b. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->

Summary
spec/MCP.mdincomplete in practice and left users without a supported way to run RedisVL as an MCP server.rvl mcpcommand, wiring in lazy optional-dependency handling, and rounding out the MCP server/config/tooling surface with tests and documentation updates.Testing
uv run python -m pytest tests/unit/test_cli_mcp.py -quv run python -m pytest tests/unit/test_mcp -quv run rvluv run rvl mcp --helpuv run rvl mcp --config /tmp/redisvl_mcp_smoke/config.yamlagainst a live Redis containeruvx --from 'redisvl[mcp]' rvl mcp --config ...currently resolves the published package, which does not yet include the new extra/CLI path, so that install-path check is not green until a release is cutNote
Medium Risk
Adds a new MCP CLI entrypoint and introduces an
upsert-recordstool that can write data into Redis indexes (including embedding generation/serialization), which could impact data integrity and runtime behavior if misconfigured.Overview
Adds a new
rvl mcpsubcommand that lazily loads optional MCP dependencies, enforces Python >=3.10, and runs the MCP server over stdio with improved help/usage and error handling.Extends the MCP server to conditionally register a new
upsert-recordstool when not in read-only mode, and exports it viaredisvl.mcp.tools. The upsert tool validates request shape and schema, optionally generates missing embeddings via the configured vectorizer (with async/sync fallbacks), serializes HASH vector fields to buffers, and annotates backend failures as potentially partial writes.Includes comprehensive unit/integration tests covering CLI behavior, read-only tool registration, embedding/serialization behavior, and request validation; plus minor typing tweaks in
mcp/filters.pyto avoid newer annotation syntax.Reviewed by Cursor Bugbot for commit 9433eec. Bugbot is set up for automated code reviews on this repo. Configure here.