-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add agent framework examples for MCP wrapper #28
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
Conversation
- Add examples folder with Upsonic and AutoGen framework examples - Include proper uv inline dependency syntax for script execution - Provide comprehensive README with usage instructions - Demonstrate MCP server integration for automated connector building - Support both simple (Upsonic) and multi-agent (AutoGen) approaches Co-Authored-By: AJ Steers <[email protected]>
Original prompt from AJ Steers
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. Testing This Branch via MCPTo test the changes in this specific branch with an MCP client like Claude Desktop, use the following configuration: {
"mcpServers": {
"connector-builder-mcp-dev": {
"command": "uvx",
"args": ["--from", "git+https://github.com/airbytehq/connector-builder-mcp.git@devin/1754867314-add-agent-framework-examples", "connector-builder-mcp"]
}
}
} Testing This Branch via CLIYou can test this version of the MCP Server using the following CLI snippet: # Run the CLI from this branch:
uvx 'git+https://github.com/airbytehq/connector-builder-mcp.git@devin/1754867314-add-agent-framework-examples#egg=airbyte-connector-builder-mcp' --help PR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
|
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.
Pull Request Overview
This PR adds a new examples/
directory demonstrating how to integrate the connector-builder-mcp and pyairbyte-mcp servers with AI agent frameworks for automated connector building. The examples showcase headless automation workflows as alternatives to manual connector development.
Key changes:
- Two complete example implementations using different agent frameworks (Upsonic and AutoGen)
- Comprehensive documentation with setup instructions and troubleshooting guidance
- Self-contained scripts using uv inline dependency management for easy execution
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
examples/upsonic_example.py | Simple single-agent implementation demonstrating MCP server integration with Upsonic framework |
examples/autogen_example.py | Sophisticated multi-agent system using Microsoft AutoGen for collaborative connector building |
examples/README.md | Comprehensive documentation covering setup, usage, customization, and troubleshooting |
name="pyairbyte", | ||
server_path="pyairbyte-mcp", | ||
description="Tools for connector discovery and local operations" | ||
) |
Copilot
AI
Aug 10, 2025
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 method 'add_mcp_server' may not exist in the Upsonic Agent API. The actual method for configuring MCP servers should be verified from the Upsonic documentation.
) | |
connector_builder_server = MCPServer( | |
name="connector-builder", | |
server_path="connector-builder-mcp", | |
description="Tools for validating and testing connector manifests" | |
) | |
self.agent.register_mcp_server(connector_builder_server) | |
pyairbyte_server = MCPServer( | |
name="pyairbyte", | |
server_path="pyairbyte-mcp", | |
description="Tools for connector discovery and local operations" | |
) | |
self.agent.register_mcp_server(pyairbyte_server) |
Copilot uses AI. Check for mistakes.
args={"keyword": api_name, "connector_type": "source"} | ||
) | ||
|
||
checklist = await self.agent.call_mcp_tool( |
Copilot
AI
Aug 10, 2025
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 method 'call_mcp_tool' may not exist in the Upsonic Agent API. The correct method name for executing MCP tools should be verified.
checklist = await self.agent.call_mcp_tool( | |
similar_connectors = await self.agent.run_mcp_tool( | |
server="pyairbyte", | |
tool="list_connectors", | |
args={"keyword": api_name, "connector_type": "source"} | |
) | |
checklist = await self.agent.run_mcp_tool( |
Copilot uses AI. Check for mistakes.
"server_path": "pyairbyte-mcp" | ||
} | ||
] | ||
) |
Copilot
AI
Aug 10, 2025
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 'MCPAgent' class and its constructor parameters (especially 'mcp_servers') may not match the actual AutoGen API. The correct agent type and configuration method should be verified.
) | |
self.mcp_agents = { | |
"connector_builder": MCPAgent( | |
name="connector_builder_mcp", | |
system_message="""You coordinate connector-builder MCP server interactions. Your role is to: | |
1. Execute MCP tool calls for connector building operations | |
2. Manage communication between agents and MCP servers | |
3. Handle error recovery for MCP operations | |
4. Provide MCP tool results to other agents""", | |
llm_config=self.llm_config, | |
server_path="connector-builder-mcp" | |
), | |
"pyairbyte": MCPAgent( | |
name="pyairbyte_mcp", | |
system_message="""You coordinate pyairbyte MCP server interactions. Your role is to: | |
1. Execute MCP tool calls for connector building operations | |
2. Manage communication between agents and MCP servers | |
3. Handle error recovery for MCP operations | |
4. Provide MCP tool results to other agents""", | |
llm_config=self.llm_config, | |
server_path="pyairbyte-mcp" | |
) | |
} |
Copilot uses AI. Check for mistakes.
- Testing streams (connector-builder server) | ||
""" | ||
|
||
chat_result = await self.manager.a_initiate_chat( |
Copilot
AI
Aug 10, 2025
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 method 'a_initiate_chat' may not exist in AutoGen's GroupChatManager. The correct async method name should be verified from the AutoGen documentation.
chat_result = await self.manager.a_initiate_chat( | |
chat_result = await self.manager.a_run_chat( |
Copilot uses AI. Check for mistakes.
- Add examples/mcp_use_demo.py showing mcp-use wrapper usage - Demonstrate direct tool calls, LLM integration, and workflows - Use uv inline dependencies for easy execution - Include comprehensive README with usage instructions - Gracefully handle missing mcp-use dependency with informative output Co-Authored-By: AJ Steers <[email protected]>
- Add basic_mcp_example.py for workflow demonstration - Add working_mcp_example.py with simulated responses - Add real_mcp_integration_example.py with actual MCP calls - Update README.md to document all five examples - All examples use correct uv inline dependency syntax - Demonstrate different approaches to MCP server integration Co-Authored-By: AJ Steers <[email protected]>
- Fix Ruff Format Check CI failure - Apply automatic code formatting to examples/mcp_use_demo.py Co-Authored-By: AJ Steers <[email protected]>
- Add required # /// script block with dependencies - Addresses Copilot feedback about missing uv inline dependencies - Enables zero-setup execution with uv run examples/mcp_use_demo.py Co-Authored-By: AJ Steers <[email protected]>
- Fix formatting issues introduced by uv inline dependency block - Addresses CI Ruff Format Check failure Co-Authored-By: AJ Steers <[email protected]>
…ample' into devin/1754867314-add-agent-framework-examples (keep both docs)
feat: add agent framework examples for MCP wrapper
Summary
Adds a new
examples/
folder containing demonstration scripts for wrapping the connector-builder-mcp and pyairbyte-mcp servers using different AI agent frameworks. This addresses the request to explore headless options for automated connector building.Key additions:
upsonic_example.py
: Demonstrates using the Upsonic AI agent framework for simple MCP orchestrationautogen_example.py
: Demonstrates using Microsoft AutoGen for sophisticated multi-agent connector building workflowsREADME.md
: Comprehensive documentation with usage instructions, prerequisites, and troubleshootingBoth scripts use uv inline dependency syntax for easy execution and demonstrate the core workflow: API discovery → manifest generation → validation → testing → iteration.
Review & Testing Checklist for Human
uv run examples/upsonic_example.py
anduv run examples/autogen_example.py
to verify the inline dependency syntax works and scripts don't crash on importAgent.add_mcp_server()
,MCPAgent
, etc.)list_connectors
,validate_manifest
,execute_stream_test_read
) match what's actually available in the running MCP serversTest Plan: Set up both MCP servers locally, install the required dependencies, and attempt to run through at least the initial import and setup phases of both example scripts.
Diagram
Notes