Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 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
14 changes: 10 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# Server Configuration
PORT=3000
# Environment Configuration
NODE_ENV=development

# FalkorDB Configuration
FALKORDB_HOST=localhost
FALKORDB_PORT=6379
FALKORDB_USERNAME=
FALKORDB_PASSWORD=
# Set to 'true' to use read-only queries by default (useful for replica instances)
FALKORDB_DEFAULT_READONLY=false

# MCP Configuration
MCP_API_KEY=your_mcp_api_key_here
# Redis Configuration (for key-value operations)
REDIS_URL=redis://localhost:6379
REDIS_USERNAME=
REDIS_PASSWORD=

# Logging Configuration (optional)
ENABLE_FILE_LOGGING=false
Comment thread
gkorland marked this conversation as resolved.
Outdated
20 changes: 0 additions & 20 deletions .eslintrc

This file was deleted.

98 changes: 52 additions & 46 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -1,74 +1,80 @@
name: Node.js CI/CD
name: CI/CD

on:
push:
branches: [ main, master, develop ]
branches: [ main, develop ]
pull_request:
branches: [ main, master ]
branches: [ main ]
release:
types: [ published ]

jobs:
build:
test:
name: Test & Build
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
node-version: [18.x, 20.x, 22.x]
Comment thread
gkorland marked this conversation as resolved.
Outdated

steps:
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build --if-present
- name: Lint code
run: npm run lint

- name: Lint
run: npm run lint --if-present
- name: Run tests with coverage
run: npm run test:coverage

- name: Test
run: npm test --if-present
env:
CI: true

docker:
needs: build
if: github.event_name != 'pull_request'
- name: Build project
run: npm run build

- name: Upload coverage to Codecov
if: matrix.node-version == '20.x'
uses: codecov/codecov-action@v4
Comment thread Fixed
Comment thread Dismissed
with:
file: ./coverage/lcov.info
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
Comment thread
gkorland marked this conversation as resolved.

publish:
Comment thread Fixed
name: Publish to NPM
needs: [test]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
environment:
name: Default
url: https://www.npmjs.com/package/falkordb-mcpserver/v/${{ github.event.release.tag_name }}
Comment on lines +59 to +62
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

Environment URL may be incorrect if release tags use a v prefix.

github.event.release.tag_name typically includes a v prefix (e.g., v1.0.1), but npm package URLs expect the bare version (1.0.1). This would produce a broken link like .../v/v1.0.1.

Consider stripping the prefix:

url: https://www.npmjs.com/package/falkordb-mcpserver/v/${{ github.event.release.tag_name }}

url: https://www.npmjs.com/package/falkordb-mcpserver/v/${{ github.event.release.tag_name  }}

Unfortunately, GitHub Actions expressions don't have a built-in replace, so you may need to accept a potentially imperfect URL or handle tag naming conventions (e.g., always tag without the v prefix, or use a step to compute the version).

🤖 Prompt for AI Agents
In @.github/workflows/node.yml around lines 58 - 61, The environment URL
currently interpolates github.event.release.tag_name which may include a leading
"v" and produce a broken npm URL; add a preceding workflow step that normalizes
the release tag into a plain version string (remove any leading "v"/"V" from
github.event.release.tag_name using a small shell or actions step to export
RELEASE_VERSION) and then set environment.url to use that normalized value
(replace usage of github.event.release.tag_name with the computed
RELEASE_VERSION) so the npm link becomes .../v/1.0.1 instead of .../v/v1.0.1.


steps:
- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Checkout code
uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
- name: Setup Node.js
uses: actions/setup-node@v4
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
node-version: '20.x'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=sha,format=long
type=ref,event=branch
type=ref,event=tag

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Install dependencies
run: npm ci

- name: Build project
run: npm run build

- name: Publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Comment thread Fixed
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,7 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# MCP and project-specific
logs/
*.mcp.log
100 changes: 100 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Development Commands

- **Build**: `npm run build` - Compiles TypeScript to JavaScript in `dist/`
- **Dev server**: `npm run dev` - Starts development server with hot-reloading using nodemon
- **Production start**: `npm start` - Runs the built application from `dist/index.js`
- **Lint**: `npm run lint` - Runs ESLint on TypeScript files
- **Test**: `npm test` - Runs Jest test suite
- **Test with coverage**: `npm test:coverage` - Runs tests with coverage report
Comment thread
gkorland marked this conversation as resolved.
Outdated

## Project Architecture

This is a Model Context Protocol (MCP) server that enables AI models to interact with FalkorDB graph databases through natural language. The server communicates via stdio transport and provides tools for graph operations.

### MCP Server Implementation
- **Entry point**: `src/index.ts` - Creates MCP server using `@modelcontextprotocol/sdk`
- **Communication**: Uses stdio transport for MCP protocol (not HTTP)
- **MCP Tools registered**:
- `query_graph` - Execute OpenCypher queries on specific graphs
- `list_graphs` - List all available graphs in the database
- `delete_graph` - Delete specific graphs
- `set_key`/`get_key` - Redis key-value operations for data storage
- **MCP Resources**: `graph_list` resource provides markdown-formatted graph listings

### Core Services
- **FalkorDB Service** (`src/services/falkordb.service.ts`):
- Singleton service managing FalkorDB connections
- Uses `falkordb` npm package
- Handles connection retries and pooling
- Main operations: `executeQuery()`, `listGraphs()`, `deleteGraph()`

- **Redis Service** (`src/services/redis.service.ts`):
- Manages Redis operations for key-value storage
- Used alongside graph operations

### Configuration
- **Config system** (`src/config/index.ts`): Centralized configuration using dotenv
- **Environment variables**: Defined in `.env` file (copy from `.env.example`)
- **Key variables**: `FALKORDB_HOST`, `FALKORDB_PORT`, `FALKORDB_USERNAME`, `FALKORDB_PASSWORD`

### Current Project Structure
```
src/
├── index.ts # MCP server entry point with tool/resource registration
├── services/
│ ├── falkordb.service.ts # FalkorDB connection and graph operations
│ └── redis.service.ts # Redis key-value operations
├── config/
│ └── index.ts # Centralized configuration using dotenv
├── models/ # TypeScript type definitions
│ ├── mcp.types.ts # MCP protocol interfaces
│ └── mcp-client-config.ts # Configuration models
└── utils/
└── connection-parser.ts # Utility functions
```

## Testing
- **Framework**: Jest with ts-jest preset
- **Test files**: Located alongside source files with `.test.ts` extension
- **Coverage**: Configured to exclude test files and type definitions
- **Test environment**: Node.js environment

## Key Dependencies
- `@modelcontextprotocol/sdk` - MCP protocol implementation
- `falkordb` - FalkorDB Node.js client
- `zod` - Schema validation for MCP tools

## MCP Integration Setup

### Claude Desktop Configuration
To use this server with Claude Desktop, add to `claude_desktop_config.json`:
```json
{
"mcpServers": {
"falkordb": {
"command": "node",
"args": ["/absolute/path/to/falkordb-mcpserver/dist/index.js"]
}
}
}
```

### Environment Configuration
Required environment variables in `.env`:
- `FALKORDB_HOST` - FalkorDB hostname (default: localhost)
- `FALKORDB_PORT` - FalkorDB port (default: 6379)
- `FALKORDB_USERNAME` - Optional authentication
- `FALKORDB_PASSWORD` - Optional authentication
- `REDIS_URL` - Redis connection for key-value operations

## Development Notes
- Uses ES modules (`"type": "module"` in package.json)
- TypeScript configuration in `tsconfig.json`
- Nodemon watches `src/**/*.ts` for development hot-reload
- **Important**: This is an MCP server, not a web server - it communicates via stdio transport
- Build output in `dist/` directory is executed by MCP clients
- The server automatically closes FalkorDB and Redis connections on exit
Loading