-
Notifications
You must be signed in to change notification settings - Fork 16
Support MCP connections for the AI connector #499
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
Merged
chathuranga-jayanath-99
merged 17 commits into
wso2:mi-ext-alpha-release
from
ChinthakaJ98:mcp-changes
Feb 17, 2026
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
ed849c1
Support MCP connections in the AI connector
ChinthakaJ98 19b759a
Merge branch 'mi-ext-alpha-release' into mcp-changes
ChinthakaJ98 0ada0b7
Rename mediator
ChinthakaJ98 c1db97d
Update synapse configuration syntax
ChinthakaJ98 57c3d57
Handle tools types; mcp tools and tools with templates
chathuranga-jayanath-99 c945eff
Handle adding mcp tools configurations
chathuranga-jayanath-99 4b300ca
Avoid adding default tool schema to mcp tools
chathuranga-jayanath-99 9c8f78b
Handle populating values for edit form of MCP Tools
chathuranga-jayanath-99 e635f9f
Handle editing mcp tools values
chathuranga-jayanath-99 5c1d59a
Handle editing mcp tools while preserving order
chathuranga-jayanath-99 52b02fd
Handle adding new tools from already selected connection
chathuranga-jayanath-99 7a4f1f7
Refactor code
chathuranga-jayanath-99 7c6e473
Add mustache templates
chathuranga-jayanath-99 11bdb8c
Address reviewed comments
chathuranga-jayanath-99 582d5c8
Removed not used methods
chathuranga-jayanath-99 8aa70b8
Avoid adding empty edits; only add the text edit if it is not null.
chathuranga-jayanath-99 ffe0b7c
Handle new lines when adding mcp tools xml content
chathuranga-jayanath-99 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
623 changes: 588 additions & 35 deletions
623
...in/java/org/eclipse/lemminx/customservice/synapse/mediatorService/AIConnectorHandler.java
Large diffs are not rendered by default.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
...n/java/org/eclipse/lemminx/customservice/synapse/mediatorService/pojo/MCPToolRequest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| /* | ||
| * Copyright (c) 2026, WSO2 LLC. (http://www.wso2.com). | ||
| * | ||
| * All rights reserved. This program and the accompanying materials | ||
| * are made available under the terms of the Eclipse Public License v2.0 | ||
| * which accompanies this distribution, and is available at | ||
| * http://www.eclipse.org/legal/epl-v20.html | ||
| * | ||
| * SPDX-License-Identifier: EPL-2.0 | ||
| * | ||
| * Contributors: | ||
| * WSO2 LLC - support for WSO2 Micro Integrator Configuration | ||
| */ | ||
|
|
||
| package org.eclipse.lemminx.customservice.synapse.mediatorService.pojo; | ||
|
|
||
| import java.util.Map; | ||
|
|
||
| public class MCPToolRequest { | ||
|
|
||
| public String connectionName; | ||
| } |
25 changes: 25 additions & 0 deletions
25
.../java/org/eclipse/lemminx/customservice/synapse/mediatorService/pojo/MCPToolResponse.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| /* | ||
| * Copyright (c) 2026, WSO2 LLC. (http://www.wso2.com). | ||
| * | ||
| * All rights reserved. This program and the accompanying materials | ||
| * are made available under the terms of the Eclipse Public License v2.0 | ||
| * which accompanies this distribution, and is available at | ||
| * http://www.eclipse.org/legal/epl-v20.html | ||
| * | ||
| * SPDX-License-Identifier: EPL-2.0 | ||
| * | ||
| * Contributors: | ||
| * WSO2 LLC - support for WSO2 Micro Integrator Configuration | ||
| */ | ||
|
|
||
| package org.eclipse.lemminx.customservice.synapse.mediatorService.pojo; | ||
|
|
||
| import org.eclipse.lsp4j.Range; | ||
|
|
||
| import java.util.Map; | ||
|
|
||
| public class MCPToolResponse { | ||
|
|
||
| public Map<String, String> tools; | ||
| public String error; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...inx/src/main/resources/org/eclipse/lemminx/mediators/440/templates/mcpConnection.mustache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| <mcpConfigKey>{{mcpConnection}}</mcpConfigKey> |
3 changes: 3 additions & 0 deletions
3
...nx/src/main/resources/org/eclipse/lemminx/mediators/440/templates/mcpConnections.mustache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <mcpConnections> | ||
| {{#mcpConnections}}{{{.}}}{{/mcpConnections}} | ||
| </mcpConnections> |
2 changes: 1 addition & 1 deletion
2
...ipse.lemminx/src/main/resources/org/eclipse/lemminx/mediators/440/templates/tool.mustache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| <tool name="{{name}}" template="{{template}}"{{#resultExpression}} resultExpression="{{resultExpression}}"{{/resultExpression}} description="{{description}}"/> | ||
| <tool name="{{name}}" {{#isMCP}}type="mcp" mcpConnection="{{mcpConnection}}"{{/isMCP}}{{^isMCP}}template="{{template}}"{{#resultExpression}} resultExpression="{{resultExpression}}"{{/resultExpression}}{{/isMCP}} description="{{description}}"/> |
5 changes: 5 additions & 0 deletions
5
...pse.lemminx/src/main/resources/org/eclipse/lemminx/mediators/440/templates/tools.mustache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <tools> | ||
| {{#tools}} | ||
| {{{.}}} | ||
| {{/tools}} | ||
| </tools> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.