Skip to content

Conversation

@LongSunnyDay
Copy link

@LongSunnyDay LongSunnyDay commented Jan 7, 2026

Summary

This PR adds two features to the MCP server:

1. Vertex AI (ADC) Authentication Support

Enables using Google Cloud Application Default Credentials instead of requiring a GOOGLE_API_KEY for Gemini providers.

Changes:

  • Added _is_vertex_ai_mode() helper to detect GOOGLE_GENAI_USE_VERTEXAI=true env var
  • Modified _validate_api_key() to skip validation for Gemini when using Vertex AI
  • Added CrossEncoderFactory class to create Gemini/OpenAI rerankers with proper auth
  • Integrated CrossEncoderFactory into graphiti_mcp_server.py
  • Added config-gemini-neo4j.yaml for Gemini + Neo4j configuration

Usage:

export GOOGLE_GENAI_USE_VERTEXAI=true
export GOOGLE_CLOUD_PROJECT=my-project
export GOOGLE_CLOUD_LOCATION=europe-west1

2. Auto-expand Subgroup Queries

When no group_ids are specified in search queries, the server now automatically expands to include all subgroups of the configured group.

Test plan

  • Tested graphiti MCP server startup with Vertex AI env vars
  • Verified LLM, Embedder, and Reranker clients all use ADC authentication
  • Confirmed Neo4j connection and index creation works

🤖 Generated with Claude Code

When using hierarchical group_ids (e.g., "project:business",
"project:procedures"), the MCP server's search functions now
automatically include all subgroups when no explicit group_ids
are provided.

Previously, calling search_nodes() or get_episodes() without
group_ids would only match the exact configured prefix, missing
all subgroup data.

Changes:
- Add get_matching_group_ids() helper that queries the database
  for all group_ids matching prefix OR prefix:*
- Update search_nodes, search_memory_facts, and get_episodes to
  use auto-expansion when no group_ids provided
- Maintain backward compatibility: explicit group_ids still work
  as before

Fixes getzep#1136
@danielchalef
Copy link
Member

danielchalef commented Jan 7, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@LongSunnyDay
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

danielchalef added a commit that referenced this pull request Jan 7, 2026
- Add _is_vertex_ai_mode() helper to detect GOOGLE_GENAI_USE_VERTEXAI env var
- Modify _validate_api_key() to skip validation for Gemini when using Vertex AI ADC
- Add CrossEncoderFactory class to create Gemini/OpenAI rerankers with proper auth
- Integrate CrossEncoderFactory into graphiti_mcp_server.py
- Add config-gemini-neo4j.yaml for Gemini + Neo4j configuration

This allows using Vertex AI Application Default Credentials instead of
requiring a GOOGLE_API_KEY for Gemini LLM, Embedder, and Reranker clients.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@LongSunnyDay LongSunnyDay changed the title feat(mcp): auto-expand subgroup queries when no group_ids specified feat(mcp): add Vertex AI support and auto-expand subgroup queries Jan 7, 2026
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.

2 participants