-
Notifications
You must be signed in to change notification settings - Fork 85
chore: introduces VSCodeMCPConnectionManager to talk to contributed MCP server MCP-131 #1111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/mcp-integration
Are you sure you want to change the base?
chore: introduces VSCodeMCPConnectionManager to talk to contributed MCP server MCP-131 #1111
Conversation
fbb8e1e
to
ca40afc
Compare
LogPayload, | ||
UserConfig, | ||
ConnectionManagerFactoryFn, | ||
} from '@himanshusinghs/mongodb-mcp-server'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is temporary until we release the mongodb-mcp-server with injectable connection manager work.
try { | ||
const serviceProvider = await NodeDriverServiceProvider.connect( | ||
connectParams.connectionString, | ||
connectParams.connectOptions, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's one thing that is bothering me here about connectOptions and that's the appName
attribute. In MCP server, we go a stretch to ensure the appName but we don't do that here. That means the appName
will be how VSCode extension sets it, in here.
Should we instead set the appName to something like vscode-mcp-xxx
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is relevant for analytics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went through the implementation and it seems mostly okay - I have mostly design suggestions.
One thing that might be curious to test out in the real world is how the LLM behaves when we switch connections - I've seen sometimes LLMs will pull certain results out of the context instead of invoking the tool again. For example, if you ask "what are my databases", then switch the connection, then ask again, the model might decide to just regurgitate the previous response until you actively ask it to fetch them again. We should see if that's a real problem and if it is, explore if exposing a resource for the current connection, that we update and send update notifications for, might solve it.
Until we send out another release containing the work from injectable connection manager, we will be using the privately scoped mongodb-mcp-server.
e2fcdf9
to
c3f72cb
Compare
Yea I have seen this as well! I don't think having resources are going to help in this case because resources are application controlled. Until user decide to put resource in context, LLM won't know if something is happening with the resources. The resource notifications are limited to the MCP client and wouldn't expect MCP client to pass the updated resource (even notification) to LLM without explicit user action. |
I would like to correct myself. From the docs on Resources, it seems applications are allowed to decide if they want to automatically include the resource in the context. In that case, we should certainly try if having resource changes the situation by any means. I will set up a follow up for this, if that sounds alright? |
Description
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes