Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2db6776
Update dependencies, refactor server implementation, and add Redis se…
SecKatie Jul 25, 2025
7633849
Streamline to MCP-only architecture and enhance documentation
SecKatie Jul 27, 2025
96d702c
Fix module resolution and logging issues for ES modules
SecKatie Jul 28, 2025
32ab939
Enhance configuration, documentation, and CI/CD workflow
SecKatie Jul 28, 2025
02bce89
Add environment configuration for release workflow in GitHub Actions
SecKatie Jul 28, 2025
4f32b8c
Remove broken snyk test
SecKatie Jul 28, 2025
80267dc
ci: fix broken publish rule
SecKatie Jul 28, 2025
60778b4
chore: update version and enhance README with npm usage instructions
SecKatie Jul 28, 2025
9a3b4c2
Update src/mcp/prompts.ts
SecKatie Jul 28, 2025
98d560f
Merge pull request #1 from SecKatie/develop
SecKatie Jul 28, 2025
5206d09
feat: add read-only query support for replica instances
singhtanmay6735 Jan 28, 2026
ea60278
Merge pull request #2 from singhtanmay6735/feature/read-only-support
SecKatie Feb 2, 2026
1f99d35
Merge branch 'main' into rebase
gkorland Feb 8, 2026
feb4908
update
gkorland Feb 8, 2026
5a7ee62
Apply suggestion from @Copilot
gkorland Feb 8, 2026
6afbf5d
Potential fix for code scanning alert no. 10: Workflow does not conta…
gkorland Feb 8, 2026
387a664
Initial plan
Claude Feb 8, 2026
8616f19
Address PR review comments: fix concurrent init, improve error handli…
Claude Feb 8, 2026
b803fcf
Merge pull request #15 from FalkorDB/claude/sub-pr-14
gkorland Feb 8, 2026
5d7f215
Update .github/workflows/node.yml
gkorland Feb 8, 2026
acfbfb6
Update .env.example
gkorland Feb 8, 2026
4e02729
Update CONTRIBUTING.md
gkorland Feb 8, 2026
22f6095
Update CLAUDE.md
gkorland Feb 8, 2026
42473fc
Initial plan
Claude Feb 9, 2026
8b5185a
Address PR review comments: sanitize query logging, fix MCP level map…
Claude Feb 9, 2026
a2e403a
Merge pull request #16 from FalkorDB/claude/sub-pr-14
gkorland Feb 9, 2026
f7f154d
Update node.yml
gkorland Feb 12, 2026
f924c66
Update falkordb.service.ts
gkorland Feb 12, 2026
7d837bf
Initialize retryCount before initializing promise
gkorland Feb 12, 2026
bf0bbe3
update lock
gkorland Feb 15, 2026
7b95314
fix: suppress TS2589 deep type instantiation error in registerTool
gkorland Feb 23, 2026
a1f4111
fix: address security and reliability issues from code review
gkorland Feb 23, 2026
5d4d539
fix: improve FalkorDB service reliability and logging
gkorland Feb 23, 2026
80e1204
fix: address PR review findings from copilot reviewer
gkorland Feb 23, 2026
f50c816
feat: add Streamable HTTP transport support
gkorland Feb 23, 2026
09f4691
fix: improve Redis service reliability and fix review findings
gkorland Feb 23, 2026
beef955
docs: add HTTP transport testing instructions to README
gkorland Feb 23, 2026
1c674df
docs: add API key authentication usage to README
gkorland Feb 23, 2026
d238e32
feat: add Docker support for HTTP transport
gkorland Feb 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/services/falkordb.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ class FalkorDBService {
`Failed to execute ${readOnly ? 'read-only ' : ''}query on graph '${graphName}': ${error instanceof Error ? error.message : String(error)}`,
true
);

logger.error('Query execution failed', appError, { graphName, query, readOnly });

// Sanitize query for error logging using same truncation as debug logs
const safeQuery = query.substring(0, 100) + (query.length > 100 ? '...' : '');
logger.error('Query execution failed', appError, { graphName, query: safeQuery, readOnly });
throw appError;
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}
}
Expand Down
7 changes: 5 additions & 2 deletions src/services/logger.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,15 @@ export class Logger {
try {
// Format log data for MCP client
const logData = context ? `${message} | ${JSON.stringify(context)}` : message;


// Map WARN to warning for MCP spec compliance
const mcpLevel = level === 'WARN' ? 'warning' : level.toLowerCase();

// Send notification to MCP client
await this.mcpServer.server.notification({
method: 'notifications/message',
params: {
level: level.toLowerCase(),
level: mcpLevel,
data: logData,
logger: 'falkordb-mcp'
}
Expand Down
13 changes: 11 additions & 2 deletions src/services/redis.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,16 @@ class RedisService {
logger.info('Successfully connected to Redis');
this.retryCount = 0;
} catch (error) {

// Clean up failed client before retrying or throwing
if (this.client) {
try {
await this.client.disconnect();
} catch {
// Ignore disconnect errors
}
this.client = null;
}

if (this.retryCount < this.maxRetries) {
this.retryCount++;
logger.warn('Failed to connect to Redis, retrying...', {
Expand All @@ -63,7 +72,7 @@ class RedisService {
`Failed to connect to Redis after ${this.maxRetries} attempts: ${error instanceof Error ? error.message : String(error)}`,
true
);

logger.error('Redis connection failed permanently', appError);
throw appError;
}
Expand Down
18 changes: 9 additions & 9 deletions src/utils/connection-parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,26 +251,26 @@ describe('Connection Parser Utility', () => {
it('should handle edge case with multiple @ symbols', () => {
// Act
const result = parseFalkorDBConnectionString('falkordb://user@domain:pass@host:1234');
// Assert - implementation takes first @ as auth separator, but subsequent @ affects parsing

// Assert - after fixing parser to use lastIndexOf('@')
expect(result).toEqual({
host: 'domain',
port: 6379,
username: undefined,
password: 'user'
host: 'host',
port: 1234,
username: 'user@domain',
password: 'pass'
});
});
Comment thread
coderabbitai[bot] marked this conversation as resolved.

it('should handle edge case with multiple : in auth', () => {
// Act
const result = parseFalkorDBConnectionString('falkordb://user:pass:extra@host:1234');
// Assert - implementation takes first : as separator between user and pass

// Assert - after fixing parser to properly rejoin password with multiple ':'
expect(result).toEqual({
host: 'host',
port: 1234,
username: 'user',
password: 'pass'
password: 'pass:extra'
});
});
Comment on lines +264 to +275
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Test documents password truncation when it contains :.

auth.split(':') on user:pass:extra yields ['user', 'pass', 'extra'], and only parts[0] and parts[1] are used — extra is silently dropped. Passwords containing : are valid, so the parser should rejoin from index 1 onward (e.g., parts.slice(1).join(':')). Same follow-up as the @ issue above.

🤖 Prompt for AI Agents
In `@src/utils/connection-parser.test.ts` around lines 264 - 275, The test reveals
parseFalkorDBConnectionString currently truncates passwords containing ':'
because it does auth.split(':') and only uses parts[0] and parts[1]; fix
parseFalkorDBConnectionString so when parsing the auth segment you treat the
first ':' as the user/password separator and reconstruct the password by joining
any remaining parts (e.g., parts.slice(1).join(':')) instead of dropping extras,
ensuring username = parts[0] and password = joined remainder.

});
Expand Down
36 changes: 18 additions & 18 deletions src/utils/connection-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,52 +23,52 @@ interface FalkorDBConnectionOptions {
host: 'localhost',
port: 6379
};

// Handle empty or undefined input
if (!connectionString) {
return defaultOptions;
}

// Remove protocol prefix if present
let cleanString = connectionString;
if (cleanString.startsWith('falkordb://')) {
cleanString = cleanString.substring('falkordb://'.length);
}
// Parse authentication if present

// Parse authentication if present - use lastIndexOf to handle '@' in password
let auth = '';
let hostPort = cleanString;
if (cleanString.includes('@')) {
const parts = cleanString.split('@');
auth = parts[0];
hostPort = parts[1];

const lastAtIndex = cleanString.lastIndexOf('@');
if (lastAtIndex !== -1) {
auth = cleanString.slice(0, lastAtIndex);
hostPort = cleanString.slice(lastAtIndex + 1);
}

// Parse host and port
let host = 'localhost';
let port = 6379;

if (hostPort.includes(':')) {
const parts = hostPort.split(':');
host = parts[0] || 'localhost';
port = parseInt(parts[1], 10) || 6379;
} else {
host = hostPort || 'localhost';
}
// Parse username and password

// Parse username and password - handle multiple ':' in password
let username = undefined;
let password = undefined;

if (auth && auth.includes(':')) {
const parts = auth.split(':');
username = parts[0] || undefined;
password = parts[1] || undefined;
const firstColonIndex = auth.indexOf(':');
username = auth.slice(0, firstColonIndex) || undefined;
password = auth.slice(firstColonIndex + 1) || undefined;
} else if (auth) {
password = auth;
}

return {
host,
port,
Expand Down