Skip to content

Delegate RAG and query enrichment to vtk-mcp#33

Merged
vicentebolea merged 1 commit into
masterfrom
use-vtk-mcp
Jun 4, 2026
Merged

Delegate RAG and query enrichment to vtk-mcp#33
vicentebolea merged 1 commit into
masterfrom
use-vtk-mcp

Conversation

@vicentebolea

@vicentebolea vicentebolea commented Mar 20, 2026

Copy link
Copy Markdown
Member

Replaces local RAG infrastructure (ChromaDB, llama_index, rag-components) with vtk-mcp as the single source of VTK knowledge.

What changed

  • vtk_mcp_client.py: new HTTP JSON-RPC client — hybrid vector search (vector_search_examples + vector_search_docs), class hints, and full code validation via validate_vtk_code
  • client.py: context retrieval and validation always active when mcp_url is set; LLM has access to all vtk-mcp tools during generation; validate_vtk_code diagnostics fed back for retry
  • cli.py: --rag/--collection/--database replaced by --mcp-url
  • UI: RAG checkbox removed; context is always fetched when a vtk-mcp URL is configured
  • Models: updated to Anthropic claude-4.x, OpenAI gpt-4.1, NIM llama-3.3; default is anthropic/claude-sonnet-4-6
  • CI: uv-vtk-mcp-smoke job installs vtk-mcp and its GitHub-hosted deps via uv
  • Deleted: rag_chat_wrapper.py, build_rag_db.py, test_rag.py, rag-components/, data/, db/

Usage

# With vtk-mcp (context retrieval + tool access + code validation)
vtk-prompt "create a red sphere" --mcp-url http://localhost:8000 -t $API_KEY

# Without vtk-mcp (baseline)
vtk-prompt "create a cone" -t $API_KEY

@vicentebolea vicentebolea marked this pull request as ready for review May 15, 2026 02:18
@vicentebolea vicentebolea requested a review from bnmajor May 15, 2026 02:25
@vicentebolea vicentebolea self-assigned this May 15, 2026
Replaces local RAG infrastructure (ChromaDB, llama_index, sentence_transformers,
tree_sitter, rag-components submodule, data/examples, db/) with vtk-mcp as the
single source of VTK knowledge, context retrieval, and code validation.

When --mcp-url is set:
- Context is always fetched via hybrid vector search (vector_search_examples +
  vector_search_docs) and class hints (vtk_get_class_info, vtk_get_class_action_phrase)
- The LLM has access to all vtk-mcp tools during generation (agentic tool loop)
- Generated code is validated with validate_vtk_code; diagnostics trigger a retry

Changes:
- vtk_mcp_client.py: new HTTP JSON-RPC client wrapping vtk-mcp tools
- client.py: removed ChromaDB paths; rag param removed; mcp_url drives everything
- cli.py: --rag/--collection/--database replaced by --mcp-url
- UI: RAG checkbox removed; Top K active when vtk-mcp URL is set
- provider_utils.py: updated model lists (Anthropic claude-4.x, OpenAI gpt-4.1,
  NIM llama-3.3); default changed to anthropic/claude-sonnet-4-6
- pyproject.toml: removed all RAG deps; bumped vtk>=9.6.1
- CI: uv-vtk-mcp-smoke job installs vtk-mcp + GitHub deps via uv
- Deleted: rag_chat_wrapper.py, build_rag_db.py, test_rag.py, rag-components/,
  data/, db/
@vicentebolea vicentebolea requested review from jlee-kitware and removed request for bnmajor June 1, 2026 18:44
@vicentebolea vicentebolea linked an issue Jun 1, 2026 that may be closed by this pull request
@jlee-kitware

Copy link
Copy Markdown
Collaborator

+2

@jlee-kitware jlee-kitware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

+2
lots of files changed, assuming this is cleanup and you have tests to validate regressions

@jlee-kitware jlee-kitware self-requested a review June 4, 2026 12:09
@vicentebolea vicentebolea merged commit c9771c1 into master Jun 4, 2026
12 checks passed
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.

Add remote MCP support

2 participants