-
Notifications
You must be signed in to change notification settings - Fork 137
feat: Auto inject connected MCPs in UI #1695
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
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
92bd40e
feat: CLAUDE.md for ticket filing
tomkis 0c6d04d
feat: add example agent for github mcp
tomkis 847da72
feat: expose connectors list in the SDK
tomkis b1e9df4
feat: matching connectors with MCP demands
tomkis 5dd2c18
Update CLAUDE.md
tomkis 9750232
chore: fixing build
tomkis 273eb79
fix: claude prompting
tomkis 6a74436
feat: use cursor rules instead of claude.md
tomkis a77f9b5
chore: make MCP client optional
tomkis e30bc36
chore: remove selection of MCP in GUI
tomkis 4255f2a
docs: mcp
tomkis c2af686
docs: remove trailing reference
tomkis 45da49c
docs: bump
tomkis 9c9ec69
docs: connectors - better clarity
tomkis 0ac3af1
fix: docs post rebase
tomkis 08574e7
fix: post rebase
tomkis 4b1a3f5
fix: revert docs changes in stable
tomkis 2833911
fix: typing
tomkis 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # File Issue in GitHub | ||
|
|
||
| ## Overview | ||
|
|
||
| The goal is to draft GitHub ticket as a markdown that can be copy pasted. | ||
|
|
||
| If avaialble use Github MCP. | ||
|
|
||
| ## Workflow | ||
|
|
||
| When filing issues to i-am-bee/agentstack: | ||
|
|
||
| 1. Read appropriate template from `.github/ISSUE_TEMPLATE/` first: | ||
| - `bug_report.md` for bugs | ||
| - `feature_request.md` for features | ||
|
|
||
| 2. Follow template structure exactly | ||
|
|
||
| 3. Ask the user to specify if something is unclear based on the template and their initial prompt. | ||
|
|
||
| 4. If available use Github MCP to search duplicates | ||
|
|
||
| 5. Before filing the ticket in github show the full ticket that you are about to file to have it confirmed by the user. Show this as a markdown. | ||
|
|
||
| 6. Once user is happy, you can either submit the ticket if GH MCP is available otherwise dump as markdown. | ||
|
|
||
| ## Rules | ||
|
|
||
| - Keep the ticket extremely concise | ||
| - Don't provide implementation details. Your goal is to define the problem and its potential consequences, not to propose a solution. |
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,11 @@ | ||
| # Finding Breaking Changes | ||
|
|
||
| Repo is i-am-bee/agentstack | ||
|
|
||
| Finding breaking changes requires GitHub MCP. You need to find all merged PRs that has been merged in main since the last release tag. | ||
|
|
||
| If the PR introduces breaking change then it will be labeled with `breaking-change` label which you can use for filtering. | ||
|
|
||
| Knowing which PRs introdcude breaking change would allow you to go through all the comments and find the reason behind the breaking change. | ||
|
|
||
| List and provide all the PRs with brief descirptions about what are the introduced breaking changes. |
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,16 @@ | ||
| # Write Documentation for Agent Stack | ||
|
|
||
| There's a common pattern in how documentation is written specifically in docs/agent-development folder. The folder serves to demonstrate all capabilities for agent builders. | ||
|
|
||
| There's a certain pattern how the documentation is written. | ||
|
|
||
| ## How to write good documentation | ||
|
|
||
| 1. Closely examine agent-development folder to see all patterns | ||
| 2. Analyse user's prompt and think about proper plan how to ensure consistency | ||
| 3. Analyse code base to see all the connections for what is being documented | ||
| 4. Propose the documentation page | ||
|
|
||
|
|
||
| ### Documentation Rules | ||
| - Don't use em dashes |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| { | ||
| "python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python", | ||
| "python.analysis.typeCheckingMode": "basic", | ||
| "python.analysis.diagnosticMode": "openFilesOnly" | ||
| "python.analysis.diagnosticMode": "openFilesOnly", | ||
| "cursorpyright.analysis.diagnosticMode": "openFilesOnly", | ||
| "cursorpyright.analysis.typeCheckingMode": "basic" | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # Copyright 2025 © BeeAI a Series of LF Projects, LLC | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| import json | ||
| from collections.abc import AsyncGenerator | ||
| from typing import Annotated | ||
|
|
||
| from a2a.types import Message | ||
| from mcp import ClientSession | ||
|
|
||
| from agentstack_sdk.a2a.extensions.services.mcp import MCPServiceExtensionServer, MCPServiceExtensionSpec | ||
| from agentstack_sdk.a2a.types import RunYield | ||
| from agentstack_sdk.server import Server | ||
|
|
||
| server = Server() | ||
|
|
||
|
|
||
| @server.agent() | ||
| async def github_mcp_agent( | ||
| mcp_service: Annotated[ | ||
| MCPServiceExtensionServer, | ||
| MCPServiceExtensionSpec.single_demand(suggested=("github",)), | ||
| ], | ||
| ) -> AsyncGenerator[RunYield, Message]: | ||
| """Lists tools""" | ||
|
|
||
| if not mcp_service: | ||
| yield "MCP extension hasn't been activated, no tools are available" | ||
| return | ||
|
|
||
| async with mcp_service.create_client() as client: | ||
| if client is None: | ||
| yield "MCP client not available." | ||
| return | ||
|
|
||
| read, write = client | ||
| async with ClientSession(read_stream=read, write_stream=write) as session: | ||
| await session.initialize() | ||
| me_result = await session.call_tool("get_me", {}) | ||
| result_dict = me_result.model_dump() if hasattr(me_result, "model_dump") else me_result | ||
| yield json.dumps(result_dict, indent=2, default=str) | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| server.run() |
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
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.
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.
The problem is that client can provide
{platform_url}/foobarlike in other url fields.