Before you start
Both connection methods require Node.js 22.14.0 or later, npm, and an MCP client. Account-based CLI setup also requires access to the OS credential store. For direct package setup, obtain:- A LambdaDB project API key
- Your project’s base URL
- Your project name
The MCP package is read-only by default. Guided CLI
init defaults to enabling write tools in its generated connection; disable them under Change options if you want read-only access.Connect with the CLI
Install the LambdaDB CLI, then run:0.7.0 generates a launch command pinned to that CLI version, which runs MCP 0.8.0 through lambdadb mcp. The bridge reads the selected OS credential or environment variable and forwards the project’s base URL, name, and key to the MCP process. It adds no account-management tools and stores no key value in generated agent files. A saved OS credential needs the same OS user and access to the unlocked store; an environment-held key must be available to the agent process.
Restart or reload the agent and verify the connection. After upgrading the CLI or changing its selected project, rerun
init for the same agents and scope to update their pinned settings. Existing agent connections do not automatically follow projects use.
The numbered steps below describe direct package setup, which supplies connection details through the MCP environment rather than the CLI bridge.
Step 1: Get your LambdaDB connection details
From LambdaDB Cloud, collect the following values for the project you want to expose to your MCP client:- Base URL
- Project name
- Project API key
Step 2: Choose the published package
The npm package is@functional-systems/lambdadb-mcp. This guide covers version 0.8.0; the commands below use the latest stable release. No source checkout or build is required.
--help or --version mode; use npm metadata to check the package version. Protocol messages use stdout and diagnostics use stderr.
Alternatively, install globally with npm install --global @functional-systems/lambdadb-mcp@latest and configure your client to run lambdadb-mcp with no arguments. Installed copies do not update themselves; run the same install command to update or npm uninstall --global @functional-systems/lambdadb-mcp to remove it. The client configuration below pins version 0.8.0 for reproducible launches. Review releases and update the version explicitly.
Transport limit
The documented MCP server release has a 10 MiB stdio receive-buffer limit (10,485,760 bytes). Exceeding it closes the connection. Split large tool inputs into smaller calls; bulk tools accept document arrays, not local paths or URLs. This transport limit does not increase LambdaDB’s API request limits.Environment variables
The three project variables are required together: setting any one of them selects this explicit configuration, and a missing one fails startup.
With none of the three set, the server starts disconnected and adds
lambdadb_connect, lambdadb_connection_status, and lambdadb_cancel_connection. lambdadb_connect returns a verification link and code; after you sign in and approve one project in the browser, the server saves a project key in the OS credential store and reuses it on later starts. Until a project is connected, the data tools return not_connected. The connection tools are not added when the project variables are set, and a service that does not offer this flow returns connect_not_offered; use the project variables in that case. See Connect without a key for the optional variables and credential-store requirements.
When launched directly, the installed package reads the process environment. It does not read the general CLI’s config file or automatically load .env or .env.local; the CLI bridge resolves CLI credentials and supplies this environment for you. LAMBDADB_ENV_FILE is only for the source repository’s development launchers. Set secrets through your client’s protected local configuration or environment forwarding; do not put the key in command arguments.
Step 3: Add the server to your MCP client
For Claude Desktop, open Settings → Developer → Edit Config and merge this entry intoclaude_desktop_config.json, preserving existing servers. This uses the official local-server configuration format.
Step 4: Verify the connection
Open your client’s server/tool list (in Claude Desktop, Manage connectors → lambdadb). A read-only connection configured with the project variables should advertise these 11 tools:lambdadb_list_collectionslambdadb_get_collectionlambdadb_query_collectionlambdadb_list_docslambdadb_fetch_docslambdadb_list_brancheslambdadb_list_tagslambdadb_list_aliaseslambdadb_get_branchlambdadb_get_taglambdadb_get_alias
- Call
lambdadb_list_collectionswith{ "size": 1 }to confirm the project connection. - Call
lambdadb_get_collectionfor a known collection. ItsindexConfigsinclude each field’sdescriptionwhen one is set, which helps an assistant choose fields. - Run
lambdadb_query_collectionwith a small query against that collection.
ref such as { "kind": "tag", "name": "release" }; omitting it reads from main. Use lambdadb_list_branches, lambdadb_list_tags, and lambdadb_list_aliases to discover refs when main is not the intended target. Each returns one page in name order: pass size (1–100; the server default is 10) and, while the response carries nextPageToken, pass it back as pageToken to read the next page. Each branch owns its index schema and a tag pins one, so before searching a ref other than main, read its indexConfigs with lambdadb_get_branch, lambdadb_get_tag, or lambdadb_get_alias. A tag that is still waiting for its first snapshot has snapshotId, snapshotCommittedAt, and dataUpdatedAt set to null and numDocs: 0 until a build publishes its captured writes. Query, fetch, and list accept consistentRead: true with a branch ref, including the default main branch, or an alias that currently targets a branch; a tag ref or an alias that targets a tag rejects it. Reads of a tag, or of an alias that targets a tag, already include the writes the tag captured. See Data versioning.
Query, fetch, and list follow the service result and ID limits. List also accepts optional filter, fields, includeVectors, partitionFilter, and sort: one to four objects, each mapping one field to "asc" or "desc", as in the list API; an empty sort is rejected before any request. Keep size small while exploring and use fields to leave out large stored fields. For example, these lambdadb_list_docs arguments list main by category, including its pending writes:
nextPageToken as pageToken and repeat every other argument unchanged. With a substring filter, a page can hold fewer than size documents, or none, while nextPageToken is present; keep calling lambdadb_list_docs until it is absent. A page token is bound to size, sort, consistentRead, filter, fields, partitionFilter, includeVectors, and ref, and a changed argument returns HTTP 400.
For example, pass these arguments to lambdadb_query_collection for the sample collection created in the CLI guide:
query for match-all, and size: 0 with nonempty facets for counts only.
Native reranking
The MCP server accepts optionalrerank on lambdadb_query_collection. For the sample collection above, pass:
rerank or passing null keeps existing search behavior. Applied results preserve the final score, envelope retrievalScore, server order, and top-level rerank metadata, including docsUrl downloads. Check rerank.status before interpreting scores; fallback uses original search scores and exposes no partial reranking scores. See Native reranking for custom criteria, candidate depth, and failure/query restrictions. Reranking is available through the read tool and does not require enabling write tools.
Bayesian hybrid search
The MCP server accepts the Bayesian request throughlambdadb_query_collection. Add collectionName for a collection with the example’s body and bodyEmbedding fields. Without reranking, pass top-level candidateSize; with reranking, omit it and use rerank.candidateSize. The read tool preserves result scores and rerank metadata, including downloaded results.
Optional: Enable write tools
The LambdaDB MCP server can also expose write operations:
The MCP server accepts all 49 fixed text analyzer presets when creating collections.
The create and update tools accept an
embedding block in indexConfigs for native embeddings; schema updates follow the index schema update rules. Their indexConfigs schemas also accept an optional description on every field, including nested objectIndexConfigs children; on update, omitting it or passing null keeps the stored description and "" clears it. A text field takes substringIndex: true for substring filters only in lambdadb_create_collection, and reads return it so that an update built from them keeps it. lambdadb_query_collection, lambdadb_list_docs, and lambdadb_delete_docs accept substring clauses in queries and filters.
Every tool takes collectionName. The other inputs are:
A typical versioning workflow creates a branch from
main, writes and evaluates on it, pins a tag once the intended data is committed, and then retargets the serving alias:
candidate and restore it from the tag, pass these arguments to lambdadb_rollback_branch after the user confirms:
branch go to main. asOf is an integer Unix epoch millisecond cutoff. Branch and tag sources can be a branch or a tag, never an alias; a tag source does not accept asOf, and alias targets cannot be aliases. main cannot be deleted, and a branch or tag still referenced by an alias cannot be deleted until the alias is retargeted or removed. Without asOf, a new branch or tag takes its source’s committed snapshot, if one exists, together with the writes still pending on the source; with asOf, it takes only the latest retained committed snapshot at or before the cutoff. Captured pending writes appear in ordinary reads of a new branch after a build commits them, and pending bulk imports after indexing, so verify the data before relying on a new ref; see what a branch and a tag capture. Bulk inputs must fit the transport limit; the tool does not accept local paths or URLs.
For direct package setup, enable them by changing the environment value and restarting the MCP server:
init and restart the agent; lambdadb mcp uses its --write-tools flag rather than an inherited environment setting.
Successful writes are accepted before committed search visibility is verified. Confirm expected documents with subsequent reads; tool success alone is not an indexing readiness check.
Troubleshooting
If the server starts but tools fail:- Verify that base URL, project name, and project API key all belong to the same LambdaDB project.
- Confirm that the project API key is still valid.
- Check the MCP client logs for startup or tool-call errors.
- Run the server locally first to make sure the process starts with the expected environment variables.
- Confirm that the client launches the pinned npm package or the intended installed executable.
- Restart the MCP client after editing its configuration.
- If you expect write tools, make sure
LAMBDADB_MCP_ENABLE_WRITE_TOOLS=trueis set.
- Check that the Node executable visible to the client is version 22.14.0 or newer, and that
npxis on its PATH. ForENOENT, use the absolute path returned bycommand -v npxon macOS/Linux orwhere npxon Windows, and ensure Node is also reachable. - A missing-variable error means only some of the three project variables were supplied to the child process; set all three, or none to use the connection tools. Editing a checkout’s
.env.localdoes not configure an npm-launched server. - Use
trueorfalsefor write opt-in; an invalid boolean fails startup. - Check npm/network errors if the pinned package cannot be downloaded. Check JSON syntax and restart the server after configuration changes.
- On macOS, Claude Desktop logs are under
~/Library/Logs/Claude; on Windows,%APPDATA%\Claude\logs. Inspectmcp.logandmcp-server-lambdadb.loglocally, without sharing credentials or document data.
Optional: Build from source
For development, use a release tag and Node.js 22.14.0 or later:.env.local locally, then run npm run start:env. The source launcher selects LAMBDADB_ENV_FILE when set, otherwise .env.local if present, otherwise .env. Exported values take precedence. Direct node dist/index.js does not load these files. See the repository README for development and Inspector usage.
Next steps
- Learn how to create collections in Create a collection
- Learn how to list documents in List data
- Learn how to search collections in Search overview