Skip to content

Conversation

@david-morales
Copy link

Summary

Adds optional username parameter to FalkorDB configuration to support authentication in FalkorDB instances that require username+password authentication.

Problem

Previously, the MCP server's FalkorDB configuration only supported the password field, making it impossible to connect to FalkorDB instances that require both username and password for authentication.

Solution

This PR adds username support across the MCP server configuration chain:

  • src/config/schema.py: Add optional username field to FalkorDBProviderConfig
  • src/services/factories.py: Extract username from config or FALKORDB_USERNAME environment variable
  • src/graphiti_mcp_server.py: Pass username parameter to FalkorDriver constructor

Configuration Example

database:
  provider: "falkordb"
  providers:
    falkordb:
      uri: "redis://localhost:6379"
      username: "myuser"          # NEW: optional username
      password: "mypassword"
      database: "my-graph"

Or via environment variable:

export FALKORDB_USERNAME="myuser"
export FALKORDB_PASSWORD="mypassword"

Backwards Compatibility

The username parameter is optional (str | None = None), maintaining full backwards compatibility with existing configurations that only use password authentication.

Testing

Tested with FalkorDB instance requiring username+password authentication. The MCP server successfully connects and performs all operations (search, add_memory, get_episodes).

Add optional username parameter to FalkorDB configuration to support
authentication in FalkorDB instances that require it. Previously, only
password authentication was supported, making it impossible to connect
to FalkorDB instances with username+password authentication.

Changes:
- Add username field to FalkorDBProviderConfig schema
- Extract username from config/environment in DatabaseDriverFactory
- Pass username parameter to FalkorDriver constructor
- Support FALKORDB_USERNAME environment variable

The username parameter is optional and backwards compatible with
existing configurations that only use password authentication.
@danielchalef
Copy link
Member

danielchalef commented Dec 20, 2025

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

@david-morales
Copy link
Author

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

danielchalef added a commit that referenced this pull request Dec 20, 2025
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