Skip to content

Conversation

aaronsteers
Copy link
Contributor

feat: add get_connector_manifest command to retrieve connector metadata

Summary

This PR adds a new MCP tool get_connector_manifest to the connector-builder-mcp project that allows retrieval of connector metadata YAML files from the connectors.airbyte.com endpoint. The function accepts a connector name (required) and version (optional, defaults to 'latest') and returns the raw metadata content as a string.

Key implementation details:

  • Uses the URL pattern: https://connectors.airbyte.com/metadata/airbyte/{connector_name}/{version}/metadata.yaml
  • Supports version prefix cleaning (removes 'v' if present)
  • Includes proper HTTP error handling and timeout (30s)
  • Follows existing code patterns for tool registration and HTTP requests
  • Returns descriptive error messages for failed requests

Note: The function name suggests it returns "manifest" files, but it actually fetches "metadata.yaml" files from the connectors.airbyte.com endpoint structure.

Review & Testing Checklist for Human

  • Test with multiple connector types: Verify the URL pattern works for both source and destination connectors (e.g., source-github, destination-postgres)
  • Test version handling: Try with specific versions, 'latest', and versions with 'v' prefix to ensure proper handling
  • Verify returned content utility: Check that the returned metadata.yaml content contains useful information for connector building workflows
  • Test error scenarios: Try with invalid connector names, network issues, and non-existent versions to ensure graceful error handling
  • Consider function naming: Evaluate if get_connector_manifest is the appropriate name given it returns metadata.yaml files, not traditional manifest.yaml files

Recommended test plan:

  1. Test the new tool via MCP client with known connectors like source-faker, destination-postgres
  2. Verify content format and usefulness for connector development workflows
  3. Test edge cases: invalid names, network failures, malformed versions

Diagram

%%{ init : { "theme" : "default" }}%%
graph TD
    Server["connector_builder_mcp/server.py"]:::context
    ConnectorBuilder["connector_builder_mcp/_connector_builder.py"]:::major-edit
    FastMCP["FastMCP App"]:::context
    ExternalAPI["connectors.airbyte.com"]:::context
    
    Server --> |registers tools| FastMCP
    ConnectorBuilder --> |register_connector_builder_tools| FastMCP
    ConnectorBuilder --> |HTTP GET requests| ExternalAPI
    
    subgraph "New Function"
        GetManifest["get_connector_manifest()"]:::major-edit
    end
    
    ConnectorBuilder --> GetManifest
    GetManifest --> |"GET /metadata/airbyte/{name}/{version}/metadata.yaml"| ExternalAPI
    
    subgraph Legend
        L1["Major Edit"]:::major-edit
        L2["Minor Edit"]:::minor-edit  
        L3["Context/No Edit"]:::context
    end

classDef major-edit fill:#90EE90
classDef minor-edit fill:#87CEEB
classDef context fill:#FFFFFF
Loading

Notes

  • URL Pattern Discovery: During development, I initially used an incorrect URL pattern (files/metadata/airbyte/...) and had to correct it to metadata/airbyte/... after investigating the actual connectors.airbyte.com bucket structure
  • Limited Testing: Only tested with destination-amazon-sqs during development - broader testing across connector types is needed
  • Function vs File Naming: There's a semantic mismatch where the function is named get_connector_manifest but fetches metadata.yaml files rather than traditional manifest.yaml files

Link to Devin run: https://app.devin.ai/sessions/050f37720b8f485a86ad1fbe51d5e013
Requested by: AJ Steers (@aaronsteers)

- Add get_connector_manifest function that fetches connector metadata YAML from connectors.airbyte.com
- Accepts connector_name (required) and version (optional, defaults to 'latest') parameters
- Uses correct URL pattern: https://connectors.airbyte.com/metadata/airbyte/{connector_name}/{version}/metadata.yaml
- Includes proper error handling for HTTP errors and invalid connectors
- Supports version cleaning (removes 'v' prefix if present)
- Registered with FastMCP app alongside existing tools
- Follows existing code patterns for HTTP requests and tool registration

Co-Authored-By: AJ Steers <[email protected]>
@Copilot Copilot AI review requested due to automatic review settings August 6, 2025 00:25
Copy link
Contributor

Original prompt from AJ Steers
@Devin - for connector-builder-mcp, please add a command: get_connector_manifest. Given a connector name, it should return the 'raw' github content from master, assuming the (approximate) file path: airbyte/integrations/airbyte-connectors/{connector-name}/manifest.yaml

Or ( better), pull from the versioned <http://connectors.airbyte.com|connectors.airbyte.com> endpoint, which could accept an optional version, defaulting to 'latest'.

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

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

github-actions bot commented Aug 6, 2025

👋 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/1754439247-add-get-connector-manifest", "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/1754439247-add-get-connector-manifest#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.

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 new MCP tool get_connector_manifest that retrieves connector metadata YAML files from the Airbyte connector registry. The tool enables users to fetch metadata information for any connector by name and optionally by version.

Key changes:

  • New function to fetch connector metadata from connectors.airbyte.com endpoint
  • Support for version handling with automatic prefix cleaning
  • Integration with existing FastMCP tool registration system
Comments suppressed due to low confidence (1)

connector_builder_mcp/_connector_builder.py:455

  • The function name 'get_connector_manifest' is misleading since it fetches metadata.yaml files, not manifest files. Consider renaming to 'get_connector_metadata' to better reflect its actual behavior.
def get_connector_manifest(

Copy link

github-actions bot commented Aug 6, 2025

PyTest Results (Full)

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

Results for commit 8431759. ± Comparison against base commit 36252a7.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Aug 6, 2025

PyTest Results (Fast)

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

Results for commit 8431759. ± Comparison against base commit 36252a7.

♻️ This comment has been updated with latest results.

- Add registry detection to identify manifest-only connectors
- Use manifest.yaml for manifest-only connectors, metadata.yaml for others
- Add proper error handling with fallback behavior
- Addresses feedback from @aaronsteers on PR #15

Co-Authored-By: AJ Steers <[email protected]>
@aaronsteers aaronsteers merged commit 53ee5ff into main Aug 6, 2025
13 checks passed
@aaronsteers aaronsteers deleted the devin/1754439247-add-get-connector-manifest branch August 6, 2025 18:15
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