-
Notifications
You must be signed in to change notification settings - Fork 73
feat: add mcp client #1034
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
feat: add mcp client #1034
Conversation
d457ca4
to
637ae37
Compare
const content = typeof result === 'object' ? JSON.stringify(result) : String(result) | ||
return { | ||
output: { | ||
kind: OutputKind.Text, |
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 see we are hardcoding this, is that expected?
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.
yes, for not we hard code it as text, this might change as part of the future ux work
args?: string[] | ||
env?: Record<string, string> | ||
disabled?: boolean | ||
autoApprove?: string[] |
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.
what does this field do?
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 not currently used, the entire validation/approval logic for MCP tools has not been implemented yet, I think in the future we might support some global setting to auto approve all MCP tools
continue | ||
} | ||
const cfg: MCPServerConfig = { | ||
command: (entry as any).command, |
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.
nit: maybe put entry into a variable and typecast it to avoid having to keep using as any
@@ -6,11 +6,13 @@ import { ExecuteBash, ExecuteBashParams } from './executeBash' | |||
import { LspGetDocuments, LspGetDocumentsParams } from './lspGetDocuments' | |||
import { LspReadDocumentContents, LspReadDocumentContentsParams } from './lspReadDocumentContents' | |||
import { LspApplyWorkspaceEdit, LspApplyWorkspaceEditParams } from './lspApplyWorkspaceEdit' | |||
import path = require('path') |
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.
nit: is this being used?
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.
will remove.
Problem
Support MCP
Solution
Basic MCP client implementation
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.