Skip to content

Conversation

aaronsteers
Copy link
Contributor

feat: add mcp-use integration demo example

Summary

This PR adds a comprehensive demo script and documentation showing how to use mcp-use as a vendor-neutral wrapper for the connector-builder-mcp server. The demo enables users to access connector development tools through any LLM provider instead of being locked into Claude Desktop.

Key additions:

  • examples/mcp_use_demo.py - Interactive demo script with 3 scenarios: direct tool calls, LLM integration, and multi-tool workflows
  • examples/README.md - Comprehensive documentation explaining integration benefits and usage patterns
  • Uses uv inline dependencies (# /// script) for zero-setup execution
  • Gracefully handles missing mcp-use dependency with informative fallback output

The demo showcases the strategic value of mcp-use: breaking vendor lock-in, enabling automation, and supporting custom connector development workflows.

Review & Testing Checklist for Human

  • Verify uv inline dependency syntax - Test that uv run examples/mcp_use_demo.py correctly installs and uses the declared dependencies
  • Test with actual mcp-use installation - Install mcp-use and verify the real MCP integration calls work correctly (current testing was done without mcp-use available)
  • Validate sample connector manifest - Ensure the hardcoded SAMPLE_MANIFEST in the script is valid and works with connector-builder-mcp tools
  • Verify MCP configuration - Check that the MCP_CONFIG STDIO transport setup correctly connects to connector-builder-mcp server
  • Test error handling scenarios - Verify graceful handling of missing dependencies, API keys, and connection failures

Recommended test plan:

  1. Run uv run examples/mcp_use_demo.py to verify base functionality and dependency handling
  2. Install mcp-use: pip install mcp-use and re-run the demo to test actual MCP calls
  3. Set OPENAI_API_KEY environment variable and test LLM integration demo
  4. Verify that all 11 connector-builder-mcp tools are discoverable and callable through mcp-use

Diagram

%%{ init : { "theme" : "default" }}%%
graph TD
    Demo["examples/mcp_use_demo.py<br/>Demo Script"]:::major-edit
    README["examples/README.md<br/>Documentation"]:::major-edit
    ConnectorMCP["connector-builder-mcp<br/>MCP Server"]:::context
    McpUse["mcp-use library<br/>Client Wrapper"]:::context
    
    Demo --> McpUse
    McpUse --> ConnectorMCP
    README --> Demo
    
    Demo -.->|"configures STDIO transport"| ConnectorMCP
    Demo -.->|"demonstrates 3 scenarios"| McpUse
    
    classDef major-edit fill:#90EE90,stroke:#333,stroke-width:2px
    classDef minor-edit fill:#87CEEB,stroke:#333,stroke-width:2px  
    classDef context fill:#f9f9f9,stroke:#333,stroke-width:1px
    
    subgraph Legend
        L1[Major Edit]:::major-edit
        L2[Minor Edit]:::minor-edit
        L3[Context/No Edit]:::context
    end
Loading

Notes

This integration demonstrates a key strategic opportunity: mcp-use enables vendor-neutral access to Airbyte's connector development tools, allowing users to:

  • Use any LLM provider (OpenAI, Anthropic, local models) instead of being locked to Claude Desktop
  • Build custom automation and CI/CD workflows around connector development
  • Combine connector-builder-mcp with other MCP servers for multi-server workflows

The demo was implemented with proper error handling since mcp-use wasn't available in the development environment. Critical: The actual MCP integration calls need testing with mcp-use installed to verify correctness.


Link to Devin run: https://app.devin.ai/sessions/25af23d56419463db0c2e41793455775
Requested by: @aaronsteers

- 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]>
@Copilot Copilot AI review requested due to automatic review settings August 10, 2025 23:22
Copy link
Contributor

Original prompt from AJ Steers
@Devin - let's explore <https://docs.mcp-use.com|https://docs.mcp-use.com> as a wrapper for connector builder MCP.

Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

Testing This Branch via MCP

To 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/1754867704-mcp-use-demo-example", "connector-builder-mcp"]
    }
  }
}

Testing This Branch via CLI

You 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/1754867704-mcp-use-demo-example#egg=airbyte-connector-builder-mcp' --help

PR Slash Commands

Airbyte Maintainers can execute the following slash commands on your PR:

  • /autofix - Fixes most formatting and linting issues
  • /poe <command> - Runs any poe command in the uv virtual environment

📝 Edit this welcome message.

@github-actions github-actions bot added the enhancement New feature or request label Aug 10, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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 comprehensive demo and documentation for integrating connector-builder-mcp with mcp-use, a vendor-neutral MCP client library. The integration breaks vendor lock-in from Claude Desktop and enables any LLM provider to access Airbyte's connector development tools.

  • Adds interactive demo script with 3 scenarios: direct tool calls, LLM integration, and multi-tool workflows
  • Provides comprehensive documentation explaining integration benefits and usage patterns
  • Uses uv inline dependency management for zero-setup execution with graceful fallback handling

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
examples/mcp_use_demo.py Interactive demo script showcasing mcp-use integration with connector-builder-mcp
examples/README.md Documentation explaining integration benefits, usage patterns, and strategic value

- Optional: OpenAI API key for LLM integration demo
"""

import asyncio
Copy link

Copilot AI Aug 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script is missing the required uv inline dependency specification comment block at the top. According to the PR description, this should use uv's # /// script syntax for zero-setup execution, but the dependencies are not declared in the file.

Copilot uses AI. Check for mistakes.

"mcpServers": {
"connector-builder": {
"command": "uv",
"args": ["run", "connector-builder-mcp"],
Copy link

Copilot AI Aug 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoding the command as 'uv' may cause issues if connector-builder-mcp is installed differently. Consider checking if the command exists or providing fallback options like 'connector-builder-mcp' directly.

Suggested change
"args": ["run", "connector-builder-mcp"],
# Dynamically select the command for connector-builder-mcp
if shutil.which("uv"):
mcp_command = "uv"
mcp_args = ["run", "connector-builder-mcp"]
elif shutil.which("connector-builder-mcp"):
mcp_command = "connector-builder-mcp"
mcp_args = []
else:
print("⚠️ Neither 'uv' nor 'connector-builder-mcp' found in PATH. MCP server may not start correctly.")
mcp_command = "connector-builder-mcp"
mcp_args = []
MCP_CONFIG = {
"mcpServers": {
"connector-builder": {
"command": mcp_command,
"args": mcp_args,

Copilot uses AI. Check for mistakes.

print(f" {result}")

except ImportError:
print("⚠️ langchain-openai not available - install with: pip install langchain-openai")
Copy link

Copilot AI Aug 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message suggests installing 'langchain-openai' but doesn't specify the exact package name format. Should be consistent with the package name used in the import statement.

Suggested change
print("⚠️ langchain-openai not available - install with: pip install langchain-openai")
print("⚠️ langchain_openai module not available - install with: pip install langchain-openai")
print(" (import as 'langchain_openai', install as 'langchain-openai')")

Copilot uses AI. Check for mistakes.

Copy link

github-actions bot commented Aug 10, 2025

PyTest Results (Fast)

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit 70251fe. ± Comparison against base commit 604a482.

♻️ This comment has been updated with latest results.

devin-ai-integration bot and others added 3 commits August 10, 2025 23:24
- 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant