Repository navigation
feat(falkordb): add FalkorDB source and tools - #3692
Conversation
Adds a falkordb source type backed by the official falkordb-go/v2 client. Read-only queries are dispatched as GRAPH.RO_QUERY so the server itself enforces them, and dry runs return the GRAPH.EXPLAIN execution plan.
falkordb-cypher runs developer-authored parameterized statements; falkordb-execute-cypher runs agent-authored queries with optional server-enforced readOnly mode, dry_run plans, and opt-in graph override; falkordb-schema extracts labels, relationship types, sampled property shapes, indexes, constraints and statistics with a TTL cache; falkordb-list-graphs lists the graphs on the instance.
Runs the toolbox server against a live FalkorDB instance and exercises manifests plus all four tools over the HTTP API, including read-only enforcement, dry-run plans, graph override, and schema extraction. Also routes GRAPH.EXPLAIN directly over the redis connection since falkordb-go's ExecutionPlan mishandles the array reply.
FalkorDB creates graph keys lazily, so pointing the schema tool at a graph nothing has written to yet failed every query with 'Invalid graph operation on empty key'. Probe the graph first and report an empty schema instead, since this is the normal first-run experience.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request introduces support for FalkorDB as a new data source, implementing several native tools including falkordb-cypher, falkordb-execute-cypher, falkordb-list-graphs, and falkordb-schema. It also adds comprehensive integration tests, prebuilt configurations, and documentation. The review feedback highlights two key improvements: updating ConvertValue in the FalkorDB source to correctly handle non-pointer node and edge types within paths to ensure proper JSON serialization, and making the type assertion for the optional dry_run parameter in the execute-cypher tool more robust to prevent potential errors when the parameter is omitted.
8afb5f3 to
eb94a59
Compare
eb94a59 to
1242796
Compare
Handle value-type Node/Edge in ConvertValue defensively and treat a missing dry_run parameter as false instead of erroring.
7cec13d to
90655b8
Compare
|
@duwenxin99 could you add the |
The merge of main brought in googleapis#3703, which removed tools.SourceProvider and tools.GetCompatibleSource and added GetSourceName/ValidateSource to the Tool interface. The FalkorDB tools predate that refactor and merged cleanly as new files, so the break was silent: `go build ./...` fails on all four tools. Port them to the current shape, matching neo4jcypher. Also included: - escapeIdentifier now doubles backticks rather than stripping them, which is the openCypher escape and avoids discarding characters. - Set MinVersion: tls.VersionTLS12 on the source's TLS config. - Correct the stale DefaultExpiration doc comment in the cache package. - Add unit tests for ConvertValue (node/edge/path/nested recursion), escapeIdentifier and firstString; these packages previously had only YAML-parsing tests. Verified locally: go build ./... and go test ./cmd/... ./internal/... (363 packages) pass, go test -race passes on the falkordb packages, golangci-lint reports 0 issues, and tests/falkordb passes 14/14 against a live FalkorDB instance.
08212e4 to
0951398
Compare
|
@duwenxin99 do you have estimation on when it will be available to review? |
@galshubeli I left some comments but forgot to click "submit". Sorry about that. Let me know if there are questions regarding any of these. Thanks! |
The integration suite depended on an externally provisioned FalkorDB instance, which meant CI could not run it without host/port/graph substitutions and credentials. Start an ephemeral falkordb/falkordb container instead, following the same GenericContainer pattern as tests/arcadedb. The FALKORDB_* env vars still take precedence so the suite can be pointed at an external instance. Drop the now-unused env and substitutions from the CI shard.
Keep the first FalkorDB PR scoped to the core source and tool definitions. The schema cache, its cacheExpireMinutes config field and the accompanying docs are removed; caching can be proposed separately once the integration lands.
|
/gcbrun |
|
@duwenxin99 the |
|
@duwenxin99 what the status with the review? |
|
/gcbrun |
|
/gcbrun |
|
/gcbrun |
|
/gcbrun |
## Description Adds [FalkorDB](https://docs.falkordb.com/) — an open-source, low-latency graph database that speaks openCypher over the Redis protocol — as a supported source, modeled on the existing Neo4j integration. **What's included:** - **Source `falkordb`** (`internal/sources/falkordb/`) — connects via the official [`falkordb-go/v2`](https://github.com/FalkorDB/falkordb-go) client, which is built on `go-redis/v9` (already a toolbox dependency). Config: `host`, `port`, optional `username`/`password`/`tls`, a default `graph`, and `queryTimeoutMs`. - **Tool `falkordb-cypher`** — developer-authored parameterized Cypher statements (injection-safe via the client's parameter serialization). - **Tool `falkordb-execute-cypher`** — agent-authored queries. With `readOnly: true` queries are dispatched as `GRAPH.RO_QUERY`, so **the server itself rejects writes** (no client-side query classifier needed). A `dry_run` parameter returns the `GRAPH.EXPLAIN` execution plan without executing, and an opt-in `allowGraphOverride` flag exposes a `graph` parameter for multi-graph instances. Write queries return mutation counters (`nodesCreated`, `propertiesSet`, …). - **Tool `falkordb-schema`** — concurrent extraction of node labels, relationship types, sampled property shapes, connectivity patterns, indexes (including vector/full-text), constraints, and statistics, with a configurable TTL cache. Graphs that don't exist yet (FalkorDB creates graph keys lazily) return a valid empty schema. - **Tool `falkordb-list-graphs`** — lists the graphs on the instance via `GRAPH.LIST`. - **`--prebuilt falkordb`** config driven by `FALKORDB_HOST`/`FALKORDB_PORT`/`FALKORDB_GRAPH`/`FALKORDB_USERNAME`/`FALKORDB_PASSWORD`. - **Docs** under `docs/en/integrations/falkordb/` (source page, four tool pages, prebuilt-config page, MCP quickstart) — passing `.ci/lint-docs-source-page.sh`, `.ci/lint-docs-tool-page.sh`, and `.ci/lint-docs-sample-filters.sh`. - **Tests**: unit tests for every package, and an integration suite (`tests/falkordb/`, 14 subtests) covering manifests and all four tools over the HTTP API — including read-only rejection, dry-run plans, graph override + isolation, mutation stats, empty-graph schema, and populated schema extraction. - **CI**: a `falkordb` shard in `.ci/integration.cloudbuild.yaml` mirroring the Neo4j one. **Testing done:** `go test -race` green on all new packages; the integration suite passes against a live `falkordb/falkordb` container; `golangci-lint run` reports 0 issues; `go mod tidy` is clean; manually smoke-tested `--prebuilt falkordb` over both the `/api` and `/mcp` endpoints (MCP Inspector flow). **Note for maintainers:** the CI shard needs a FalkorDB instance reachable from the integration test project (a `falkordb/falkordb` container) and `falkordb_username`/`falkordb_password` secrets. Happy to coordinate on provisioning — see the issue below. FalkorDB (the company) will maintain this integration going forward. ## PR Checklist - [x] Make sure to open an issue as a bug/issue before writing your code! - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [ ] Make sure to add `!` if this involves a breaking change (not a breaking change) Fixes #3691 🦕 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Wenxin Du <[email protected]> Co-authored-by: duwenxin99 <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.10.0](v1.9.0...v1.10.0) (2026-08-27) ### Features * **falkordb:** Add FalkorDB source and tools ([#3692](#3692)) ([a94702c](a94702c)) * **firestore-mongodb:** Add firestore-execute-mql and firestore-get-… ([#3826](#3826)) ([4a85d75](4a85d75)) * **mcp:** Add Secure Parameters support as Toolbox experimental extension ([#3394](#3394)) ([9750d2d](9750d2d)) * **server/mcp:** Support com.google.cloud/toolbox.v1 extension in v20260728 ([#3801](#3801)) ([f4f7da6](f4f7da6)) * **skill:** Add fix-failing-tests skill for mcp-toolbox ([#3821](#3821)) ([168e69c](168e69c)) * **sources:** Support native read-only mode and dynamic tool annotations ([#3872](#3872)) ([c257022](c257022)), refs [#3615](#3615) [#3816](#3816) [#3618](#3618) [#3851](#3851) [#3619](#3619) [#3617](#3617) * **tool/mongodb:** Allow collection to be specified at runtime ([#3715](#3715)) ([7626eaf](7626eaf)) ### Bug Fixes * **cloud-storage:** Resolve symlinks when enforcing local path boundaries ([#3810](#3810)) ([c2ada64](c2ada64)) * **config:** Compare env var offsets in rune space when skipping comments ([#3856](#3856)) ([2e76934](2e76934)) * Merge prebuilt tools when reloading custom config ([#3864](#3864)) ([5a6d865](5a6d865)) * Normalize postgres UUIDs to strings ([#3806](#3806)) ([3b02f1d](3b02f1d)) * **postgres:** Filter background processes in postgres-list-active-queries ([#3885](#3885)) ([3d9e62a](3d9e62a)) * **test/alloydbainl:** Use explicit SQL alias prompts to stabilize AI… ([#3877](#3877)) ([50e45ed](50e45ed)) * **tests:** Prevent resource leaks by using context.WithoutCancel ([#3849](#3849)) ([f97a4f9](f97a4f9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.10.0](v1.9.0...v1.10.0) (2026-08-27) ### Features * **falkordb:** Add FalkorDB source and tools ([#3692](#3692)) ([a94702c](a94702c)) * **firestore-mongodb:** Add firestore-execute-mql and firestore-get-… ([#3826](#3826)) ([4a85d75](4a85d75)) * **mcp:** Add Secure Parameters support as Toolbox experimental extension ([#3394](#3394)) ([9750d2d](9750d2d)) * **server/mcp:** Support com.google.cloud/toolbox.v1 extension in v20260728 ([#3801](#3801)) ([f4f7da6](f4f7da6)) * **skill:** Add fix-failing-tests skill for mcp-toolbox ([#3821](#3821)) ([168e69c](168e69c)) * **sources:** Support native read-only mode and dynamic tool annotations ([#3872](#3872)) ([c257022](c257022)), refs [#3615](#3615) [#3816](#3816) [#3618](#3618) [#3851](#3851) [#3619](#3619) [#3617](#3617) * **tool/mongodb:** Allow collection to be specified at runtime ([#3715](#3715)) ([7626eaf](7626eaf)) ### Bug Fixes * **cloud-storage:** Resolve symlinks when enforcing local path boundaries ([#3810](#3810)) ([c2ada64](c2ada64)) * **config:** Compare env var offsets in rune space when skipping comments ([#3856](#3856)) ([2e76934](2e76934)) * Merge prebuilt tools when reloading custom config ([#3864](#3864)) ([5a6d865](5a6d865)) * Normalize postgres UUIDs to strings ([#3806](#3806)) ([3b02f1d](3b02f1d)) * **postgres:** Filter background processes in postgres-list-active-queries ([#3885](#3885)) ([3d9e62a](3d9e62a)) * **test/alloydbainl:** Use explicit SQL alias prompts to stabilize AI… ([#3877](#3877)) ([50e45ed](50e45ed)) * **tests:** Prevent resource leaks by using context.WithoutCancel ([#3849](#3849)) ([f97a4f9](f97a4f9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <[email protected]>
mcp-toolbox 1.10.0 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre>## [1.10.0](googleapis/mcp-toolbox@v1.9.0...v1.10.0) (2026-08-27) ### Features * **falkordb:** Add FalkorDB source and tools ([#3692](googleapis/mcp-toolbox#3692)) ([a94702c](googleapis/mcp-toolbox@a94702c)) * **mcp:** Add Secure Parameters support as Toolbox experimental extension ([#3394](googleapis/mcp-toolbox#3394)) ([9750d2d](googleapis/mcp-toolbox@9750d2d)) * **server/mcp:** Support com.google.cloud/toolbox.v1 extension in v20260728 ([#3801](googleapis/mcp-toolbox#3801)) ([f4f7da6](googleapis/mcp-toolbox@f4f7da6)) * **skill:** Add fix-failing-tests skill for mcp-toolbox ([#3821](googleapis/mcp-toolbox#3821)) ([168e69c](googleapis/mcp-toolbox@168e69c)) * **sources:** Support native read-only mode and dynamic tool annotations ([#3872](googleapis/mcp-toolbox#3872)) ([c257022](googleapis/mcp-toolbox@c257022)), refs [#3615](googleapis/mcp-toolbox#3615) [#3816](googleapis/mcp-toolbox#3816) [#3618](googleapis/mcp-toolbox#3618) [#3851](googleapis/mcp-toolbox#3851) [#3619](googleapis/mcp-toolbox#3619) [#3617](googleapis/mcp-toolbox#3617) * **tools/firestore-mongodb:** Add tools for execute mql and get schema ([#3826](googleapis/mcp-toolbox#3826)) ([4a85d75](googleapis/mcp-toolbox@4a85d75)) * **tool/mongodb:** Allow collection to be specified at runtime ([#3715](googleapis/mcp-toolbox#3715)) ([7626eaf](googleapis/mcp-toolbox@7626eaf)) ### Bug Fixes * **cloud-storage:** Resolve symlinks when enforcing local path boundaries ([#3810](googleapis/mcp-toolbox#3810)) ([c2ada64](googleapis/mcp-toolbox@c2ada64)) * **config:** Compare env var offsets in rune space when skipping comments ([#3856](googleapis/mcp-toolbox#3856)) ([2e76934](googleapis/mcp-toolbox@2e76934)) * Merge prebuilt tools when reloading custom config ([#3864](googleapis/mcp-toolbox#3864)) ([5a6d865](googleapis/mcp-toolbox@5a6d865)) * Normalize postgres UUIDs to strings ([#3806](googleapis/mcp-toolbox#3806)) ([3b02f1d](googleapis/mcp-toolbox@3b02f1d)) * **postgres:** Filter background processes in postgres-list-active-queries ([#3885](googleapis/mcp-toolbox#3885)) ([3d9e62a](googleapis/mcp-toolbox@3d9e62a)) | **OS/Architecture** | **Description** | **SHA256 Hash** | | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- | | [linux/amd64](https://storage.googleapis.com/mcp-toolbox-for-databases/v1.10.0/linux/amd64/toolbox) ([Signature](https://storage.googleapis.com/mcp-toolbox-for-databases/v1.10.0/linux/amd64/toolbox.asc)) | For **Linux** systems running on **Intel/AMD 64-bit processors**. | 7e15dba09e6f957f64ce5924a0aa06b12cdf83ab26119813b0fa40edab566dd4 | | [darwin/arm64](https://storage.googleapis.com/mcp-toolbox-for-databases/v1.10.0/darwin/arm64/toolbox) | For **macOS** systems running on **Apple Silicon** (M1, M2, M3, etc.) processors. | c994f06781462abba4171cb4844776c45605e391c57dc96adb3e130c81b53825 | | [darwin/amd64](https://storage.googleapis.com/mcp-toolbox-for-databases/v1.10.0/darwin/amd64/toolbox) | For **macOS** systems running on **Intel processors**. | 12ebf78d9d05e8f3fe90c5d02ae14f2ccd96cf036f3dfba430bc32e3cfeadfd4 | | [windows/amd64](https://storage.googleapis.com/mcp-toolbox-for-databases/v1.10.0/windows/amd64/toolbox.exe) | For **Windows** systems running on **Intel/AMD 64-bit processors**. | 734783941cb5864c0e5d4d78be625f8b12be23b01d94781d7fa7db9b3c25aac6 | | [windows/arm64](https://storage.googleapis.com/mcp-toolbox-for-databases/v1.10.0/windows/arm64/toolbox.exe) | For **Windows** systems running on **ARM 64-bit processors**. | d9be7c2ce1d2e29c20f2974cbac4cde857adad836cee565d2584f3fbcc97f096 |</pre> <p>View the full release notes at <a href="https://github.com/googleapis/mcp-toolbox/releases/tag/v1.10.0">https://github.com/googleapis/mcp-toolbox/releases/tag/v1.10.0</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!17982
Description
Adds FalkorDB — an open-source, low-latency graph database that speaks openCypher over the Redis protocol — as a supported source, modeled on the existing Neo4j integration.
What's included:
falkordb(internal/sources/falkordb/) — connects via the officialfalkordb-go/v2client, which is built ongo-redis/v9(already a toolbox dependency). Config:host,port, optionalusername/password/tls, a defaultgraph, andqueryTimeoutMs.falkordb-cypher— developer-authored parameterized Cypher statements (injection-safe via the client's parameter serialization).falkordb-execute-cypher— agent-authored queries. WithreadOnly: truequeries are dispatched asGRAPH.RO_QUERY, so the server itself rejects writes (no client-side query classifier needed). Adry_runparameter returns theGRAPH.EXPLAINexecution plan without executing, and an opt-inallowGraphOverrideflag exposes agraphparameter for multi-graph instances. Write queries return mutation counters (nodesCreated,propertiesSet, …).falkordb-schema— concurrent extraction of node labels, relationship types, sampled property shapes, connectivity patterns, indexes (including vector/full-text), constraints, and statistics, with a configurable TTL cache. Graphs that don't exist yet (FalkorDB creates graph keys lazily) return a valid empty schema.falkordb-list-graphs— lists the graphs on the instance viaGRAPH.LIST.--prebuilt falkordbconfig driven byFALKORDB_HOST/FALKORDB_PORT/FALKORDB_GRAPH/FALKORDB_USERNAME/FALKORDB_PASSWORD.docs/en/integrations/falkordb/(source page, four tool pages, prebuilt-config page, MCP quickstart) — passing.ci/lint-docs-source-page.sh,.ci/lint-docs-tool-page.sh, and.ci/lint-docs-sample-filters.sh.tests/falkordb/, 14 subtests) covering manifests and all four tools over the HTTP API — including read-only rejection, dry-run plans, graph override + isolation, mutation stats, empty-graph schema, and populated schema extraction.falkordbshard in.ci/integration.cloudbuild.yamlmirroring the Neo4j one.Testing done:
go test -racegreen on all new packages; the integration suite passes against a livefalkordb/falkordbcontainer;golangci-lint runreports 0 issues;go mod tidyis clean; manually smoke-tested--prebuilt falkordbover both the/apiand/mcpendpoints (MCP Inspector flow).Note for maintainers: the CI shard needs a FalkorDB instance reachable from the integration test project (a
falkordb/falkordbcontainer) andfalkordb_username/falkordb_passwordsecrets. Happy to coordinate on provisioning — see the issue below. FalkorDB (the company) will maintain this integration going forward.PR Checklist
!if this involves a breaking change (not a breaking change)Fixes #3691 🦕
🤖 Generated with Claude Code