Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
90 changes: 78 additions & 12 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"globals": "^16.3.0",
"husky": "^9.1.7",
"knip": "^5.63.1",
"mongodb": "^6.19.0",
"mongodb": "^6.21.0",
"mongodb-runner": "^5.9.2",
"openapi-types": "^12.1.3",
"openapi-typescript": "^7.9.1",
Expand All @@ -112,7 +112,7 @@
"vitest": "^3.2.4"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.17.4",
"@modelcontextprotocol/sdk": "^1.22.0",
"@mongodb-js/device-id": "^0.3.1",
"@mongodb-js/devtools-proxy-support": "^0.5.3",
"@mongosh/arg-parser": "^3.19.0",
Expand Down
19 changes: 0 additions & 19 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ export class Server {
this.mcpServer.server.registerCapabilities({
logging: {},
resources: { listChanged: true, subscribe: true },
instructions: this.getInstructions(),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was similarly never part of capabilities and was previously ignored. Now it's correctly rejected. I moved it to base.ts where it should live.

});

// TODO: Eventually we might want to make tools reactive too instead of relying on custom logic.
Expand Down Expand Up @@ -301,24 +300,6 @@ export class Server {
}
}

private getInstructions(): string {
let instructions = `
This is the MongoDB MCP server.
`;
if (this.userConfig.connectionString) {
instructions += `
This MCP server was configured with a MongoDB connection string, and you can assume that you are connected to a MongoDB cluster.
`;
}

if (this.userConfig.apiClientId && this.userConfig.apiClientSecret) {
instructions += `
This MCP server was configured with MongoDB Atlas API credentials.`;
}

return instructions;
}

private async connectToConfigConnectionString(): Promise<void> {
if (this.userConfig.connectionString) {
try {
Expand Down
2 changes: 0 additions & 2 deletions src/tools/tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export abstract class ToolBase {
protected get annotations(): ToolAnnotations {
const annotations: ToolAnnotations = {
title: this.name,
description: this.description,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT the description should never have been part of the annotations and now is rejected as it's an unknown key.

};

switch (this.operationType) {
Expand Down Expand Up @@ -200,7 +199,6 @@ export abstract class ToolBase {
}

if (updates.description) {
existingTool.annotations.description = updates.description;
existingTool.description = updates.description;
this.description = updates.description;
}
Expand Down
Loading
Loading