Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
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
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ updates:
patterns:
- ai
- "@ai-sdk/*"
- voyage-ai-provider
- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,6 @@ The MongoDB MCP Server can be configured using multiple methods, with the follow
| `MDB_MCP_CONNECTION_STRING` / `--connectionString` | `<not set>` | MongoDB connection string for direct database connections. Optional, if not set, you'll need to call the connect tool before interacting with MongoDB data. |
| `MDB_MCP_DISABLED_TOOLS` / `--disabledTools` | `""` | Comma separated values of tool names, operation types, and/or categories of tools that will be disabled. |
| `MDB_MCP_DRY_RUN` / `--dryRun` | `false` | When true, runs the server in dry mode: dumps configuration and enabled tools, then exits without starting the server. |
| `MDB_MCP_EMBEDDINGS_VALIDATION` / `--embeddingsValidation` | `true` | When set to false, disables validation of embeddings dimensions. |
| `MDB_MCP_EXPORT_CLEANUP_INTERVAL_MS` / `--exportCleanupIntervalMs` | `120000` | Time in milliseconds between export cleanup cycles that remove expired export files. |
| `MDB_MCP_EXPORT_TIMEOUT_MS` / `--exportTimeoutMs` | `300000` | Time in milliseconds after which an export is considered expired and eligible for cleanup. |
| `MDB_MCP_EXPORTS_PATH` / `--exportsPath` | see below\* | Folder to store exported data files. |
Expand All @@ -421,8 +420,6 @@ The MongoDB MCP Server can be configured using multiple methods, with the follow
| `MDB_MCP_READ_ONLY` / `--readOnly` | `false` | When set to true, only allows read, connect, and metadata operation types, disabling create/update/delete operations. |
| `MDB_MCP_TELEMETRY` / `--telemetry` | `"enabled"` | When set to disabled, disables telemetry collection. |
| `MDB_MCP_TRANSPORT` / `--transport` | `"stdio"` | Either 'stdio' or 'http'. |
| `MDB_MCP_VECTOR_SEARCH_DIMENSIONS` / `--vectorSearchDimensions` | `1024` | Default number of dimensions for vector search embeddings. |
| `MDB_MCP_VECTOR_SEARCH_SIMILARITY_FUNCTION` / `--vectorSearchSimilarityFunction` | `"euclidean"` | Default similarity function for vector search: 'euclidean', 'cosine', or 'dotProduct'. |
| `MDB_MCP_VOYAGE_API_KEY` / `--voyageApiKey` | `""` | API key for Voyage AI embeddings service (required for vector search operations with text-to-embedding conversion). |

#### Logger Options
Expand Down Expand Up @@ -553,8 +550,8 @@ You can disable telemetry using:

The MongoDB MCP Server may offer functionality that is still in development and may change in future releases. These features are considered "preview features" and are not enabled by default. Generally, these features are well tested, but may not offer the complete functionality we intend to provide in the final release or we'd like to gather feedback before making them generally available. To enable one or more preview features, use the `previewFeatures` configuration option.

- For **environment variable** configuration, use a comma-separated string: `export MDB_MCP_PREVIEW_FEATURES="search,feature1,feature2"`.
- For **command-line argument** configuration, use a space-separated string: `--previewFeatures search feature1 feature2`.
- For **environment variable** configuration, use a comma-separated string: `export MDB_MCP_PREVIEW_FEATURES="feature1,feature2"`.
- For **command-line argument** configuration, use a space-separated string: `--previewFeatures feature1 feature2`.

List of available preview features:

Expand All @@ -566,6 +563,7 @@ List of available preview features:
- Start, stop, modify, and monitor stream processors.
- Diagnose processor issues with combined health reports including state, stats, and connection health.
- Requires Atlas API credentials with appropriate stream processing permissions. See [Atlas API Permissions](#atlas-api-permissions).
- `mcpUI` - Enables an optional web-based UI for interacting with the MCP server.

### Atlas API Access

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
"@vitejs/plugin-react": "^5.1.4",
"@vitest/coverage-v8": "^3.2.4",
"@vitest/eslint-plugin": "^1.6.9",
"ai": "^6.0.116",
"concurrently": "^9.2.1",
"duplexpair": "^1.0.2",
"eslint": "^9.34.0",
Expand Down Expand Up @@ -158,7 +159,6 @@
"@mongodb-js/devtools-proxy-support": "^0.7.5",
"@mongosh/arg-parser": "^5.0.2",
"@mongosh/service-provider-node-driver": "^5.0.2",
"ai": "^6.0.116",
"bson": "^7.2.0",
"express": "^5.1.0",
"lru-cache": "^11.2.6",
Expand All @@ -172,7 +172,6 @@
"oauth4webapi": "^3.8.5",
"openapi-fetch": "^0.15.0",
"ts-levenshtein": "^1.0.7",
"voyage-ai-provider": "^3.0.0",
"yaml": "^2.8.1",
"zod": "^3.25.76",
"prom-client": "^15.1.3"
Expand Down
45 changes: 3 additions & 42 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 0 additions & 40 deletions server.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,6 @@
"isRequired": false,
"format": "boolean"
},
{
"type": "named",
"name": "--embeddingsValidation",
"description": "When set to false, disables validation of embeddings dimensions.",
"isRequired": false,
"format": "boolean"
},
{
"type": "named",
"name": "--exportCleanupIntervalMs",
Expand Down Expand Up @@ -471,19 +464,6 @@
"description": "Either 'stdio' or 'http'.",
"isRequired": false
},
{
"type": "named",
"name": "--vectorSearchDimensions",
"description": "Default number of dimensions for vector search embeddings.",
"isRequired": false,
"format": "number"
},
{
"type": "named",
"name": "--vectorSearchSimilarityFunction",
"description": "Default similarity function for vector search: 'euclidean', 'cosine', or 'dotProduct'.",
"isRequired": false
},
{
"type": "named",
"name": "--voyageApiKey",
Expand Down Expand Up @@ -803,13 +783,6 @@
"isRequired": false,
"format": "boolean"
},
{
"type": "named",
"name": "--embeddingsValidation",
"description": "When set to false, disables validation of embeddings dimensions.",
"isRequired": false,
"format": "boolean"
},
{
"type": "named",
"name": "--exportCleanupIntervalMs",
Expand Down Expand Up @@ -954,19 +927,6 @@
"description": "Either 'stdio' or 'http'.",
"isRequired": false
},
{
"type": "named",
"name": "--vectorSearchDimensions",
"description": "Default number of dimensions for vector search embeddings.",
"isRequired": false,
"format": "number"
},
{
"type": "named",
"name": "--vectorSearchSimilarityFunction",
"description": "Default similarity function for vector search: 'euclidean', 'cosine', or 'dotProduct'.",
"isRequired": false
},
{
"type": "named",
"name": "--voyageApiKey",
Expand Down
15 changes: 0 additions & 15 deletions src/common/config/parseUserConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,20 +187,5 @@ function getWarnings(config: Partial<UserConfig>, cliArguments: string[]): strin
);
}

const searchEnabled = config.previewFeatures?.includes("search");
const embeddingsProviderConfigured = !!config.voyageApiKey;
if (searchEnabled && !embeddingsProviderConfigured) {
warnings.push(`\
Warning: Vector search is enabled but no embeddings provider is configured.
- Set an embeddings provider configuration option to enable auto-embeddings during document insertion and text-based queries with $vectorSearch.\
`);
}

if (!searchEnabled && embeddingsProviderConfigured) {
warnings.push(`\
Warning: An embeddings provider is configured but the 'search' preview feature is not enabled.
- Enable vector search by adding 'search' to the 'previewFeatures' configuration option, or remove the embeddings provider configuration if not needed.\
`);
}
return warnings;
}
17 changes: 1 addition & 16 deletions src/common/config/userConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
onlySubsetOfBaseValueOverride,
parseBoolean,
} from "./configUtils.js";
import { monitoringServerFeatureValues, previewFeatureValues, similarityValues } from "../schemas.js";
import { monitoringServerFeatureValues, previewFeatureValues } from "../schemas.js";
import { argMetadata, CliOptionsSchema as MongoshCliOptionsSchema } from "@mongosh/arg-parser/arg-parser";
import { TRANSPORT_PAYLOAD_LIMITS } from "../../transports/constants.js";

Expand Down Expand Up @@ -199,21 +199,6 @@ const ServerConfigSchema = z4.object({
"API key for Voyage AI embeddings service (required for vector search operations with text-to-embedding conversion)."
)
.register(configRegistry, { isSecret: true, overrideBehavior: "not-allowed" }),
embeddingsValidation: z4
.preprocess(parseBoolean, z4.boolean())
.default(true)
.describe("When set to false, disables validation of embeddings dimensions.")
.register(configRegistry, { overrideBehavior: oneWayOverride(true) }),
vectorSearchDimensions: z4.coerce
.number()
.default(1024)
.describe("Default number of dimensions for vector search embeddings.")
.register(configRegistry, { overrideBehavior: "override" }),
vectorSearchSimilarityFunction: z4
.enum(similarityValues)
.default("euclidean")
.describe("Default similarity function for vector search: 'euclidean', 'cosine', or 'dotProduct'.")
.register(configRegistry, { overrideBehavior: "override" }),
previewFeatures: z4
.preprocess(
(val: string | string[] | undefined) => commaSeparatedToArray(val),
Expand Down
2 changes: 0 additions & 2 deletions src/common/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ export enum ErrorCodes {
ForbiddenCollscan = 1_000_002,
ForbiddenWriteOperation = 1_000_003,
AtlasSearchNotSupported = 1_000_004,
NoEmbeddingsProviderConfigured = 1_000_005,
AtlasVectorSearchIndexNotFound = 1_000_006,
AtlasVectorSearchInvalidQuery = 1_000_007,
Unexpected = 1_000_008,
}

export class MongoDBError<ErrorCode extends ErrorCodes = ErrorCodes> extends Error {
Expand Down
4 changes: 0 additions & 4 deletions src/common/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,3 @@ export type PreviewFeature = (typeof previewFeatureValues)[number];

export const monitoringServerFeatureValues = ["health-check", "metrics"] as const;
export type MonitoringServerFeature = (typeof monitoringServerFeatureValues)[number];

export const similarityValues = ["cosine", "euclidean", "dotProduct"] as const;

export type Similarity = (typeof similarityValues)[number];
76 changes: 0 additions & 76 deletions src/common/search/embeddingsProvider.ts

This file was deleted.

Loading
Loading