Skip to content

spec: RedisVL MCP framework specification#526

Closed
vishal-bala wants to merge 6 commits intomainfrom
feat/RAAE-1396/mcp-framework
Closed

spec: RedisVL MCP framework specification#526
vishal-bala wants to merge 6 commits intomainfrom
feat/RAAE-1396/mcp-framework

Conversation

@vishal-bala
Copy link
Collaborator

@vishal-bala vishal-bala commented Mar 3, 2026

This PR (not to be merged) introduces a specification document for the RedisVL MCP framework. The goal is to have a clear design document to guide agentic development on this feature.


Note

Medium Risk
Adds a new MCP server implementation with config/env parsing and async Redis index lifecycle management; while mostly additive and behind optional extras, it introduces new runtime behavior and dependency surface that could affect packaging and async resource handling.

Overview
Introduces an initial RedisVL MCP framework scaffold (redisvl/mcp) including MCPSettings (env-driven settings), YAML MCPConfig loading with strict validation and ${VAR} substitution, and a RedisVLMCPServer that manages async index creation/validation, vectorizer instantiation, concurrency limiting, and graceful shutdown.

Adds deterministic MCP-facing error mapping via RedisVLMCPError/map_exception, a draft spec/MCP.md defining the intended MCP tool contracts and lifecycle, plus unit/integration tests covering config validation, env overrides, error mapping, and server startup/shutdown behavior. Updates packaging to include an optional mcp extra (mcp + pydantic-settings) and refreshes uv.lock accordingly.

Written by Cursor Bugbot for commit 2929a97. This will update automatically on new commits. Configure here.

@vishal-bala vishal-bala requested review from nkanu17 and rbs333 March 3, 2026 16:59
@vishal-bala vishal-bala self-assigned this Mar 3, 2026
@jit-ci
Copy link

jit-ci bot commented Mar 3, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

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.

self._vectorizer = None

if self._index is not None:
await self._index.disconnect()
Copy link

Choose a reason for hiding this comment

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

Shutdown leaks Redis connection if vectorizer cleanup fails

Medium Severity

The shutdown() method does not wrap vectorizer cleanup in a try/finally block. If the vectorizer's aclose() or close() method raises an exception, execution stops and self._index.disconnect() is never called, permanently leaking the Redis connection. The index disconnect logic needs to be in a finally block so it runs regardless of whether vectorizer cleanup succeeds.

Fix in Cursor Fix in Web

@vishal-bala
Copy link
Collaborator Author

Closing this PR because I forgot I used the branch to do a spec PR - see #531 for the new spec PR.

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