Before you start
You will need:- A LambdaDB project API key
- Your project’s base URL
- Your project name
- Node.js 22.14.0 or later and npm
- An MCP client such as Claude Desktop
The LambdaDB MCP server is designed to connect to a single LambdaDB project per process. It uses a project-scoped API key and is read-only by default unless write tools are explicitly enabled.
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 stable npm package is@functional-systems/lambdadb-mcp@0.1.4. This guide pins that published version. 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.
The stdio receive buffer is limited to 10 MiB; exceeding it closes the connection. Split large tool inputs into smaller calls. This transport limit does not increase LambdaDB’s API request limits.
Alternatively, install the same version globally with npm install --global @functional-systems/lambdadb-mcp@0.1.4 and configure your client to run lambdadb-mcp with no arguments. Installed copies do not update themselves. To update a global install, run npm install --global @functional-systems/lambdadb-mcp@latest; to remove it, run npm uninstall --global @functional-systems/lambdadb-mcp. For pinned client configurations, review releases and change the version explicitly. @dev is an opt-in prerelease channel.
Environment variables
The installed package reads the process environment directly. It does not read the general CLI’s config file or automatically load
.env or .env.local. 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 should advertise these five tools:lambdadb_list_collectionslambdadb_get_collectionlambdadb_query_collectionlambdadb_list_docslambdadb_fetch_docs
- Call
lambdadb_list_collectionswith{ "size": 1 }to confirm the project connection. - Call
lambdadb_get_collectionfor a known collection. - Run
lambdadb_query_collectionwith a small query against that collection.
ref such as { "kind": "tag", "name": "release" }; omitting it reads from main. Strongly consistent reads are available only for query/fetch against a branch directly, including the default main branch. List does not support consistentRead. See Data versioning.
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 such as:lambdadb_create_collectionlambdadb_upsert_docslambdadb_delete_docs
embedding block in indexConfigs for native embeddings. The MCP server has no collection-schema update tool.
Upsert and delete accept an optional branch; omitting it writes to main. Creating a collection requires nonempty indexConfigs. Deleting documents requires exactly one of a nonempty ids array or a filter.
To enable them, change the environment value and restart the MCP server:
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 the required values were not supplied to the child process. 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