airbytehq / airbytehq/PyAirbyte

fix(mcp): PyAirbyte MCP sync_source_to_cache fails with AirbyteConnectorConfigurationMissingError

Abierto
#803 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
344
Forks
77
Merge medio
1 d 11 h
PR fusionados (30 d)
35

Descripción

# PyAirbyte MCP sync_source_to_cache Tool Bug Report

## Summary
The PyAirbyte MCP `sync_source_to_cache` tool consistently fails with `AirbyteConnectorConfigurationMissingError` when attempting to sync data from a declarative connector, even when providing valid configuration parameters.

## Environment
- PyAirbyte MCP v0.31.4 (Python v3.10.16)
- FastMCP version: 2.12.3
- MCP SDK version: 1.15.0

## Bug Description
The `sync_source_to_cache` tool fails during configuration validation at line 603 in `/airbyte/mcp/_local_ops.py` when calling `source.set_config()`. The error occurs regardless of how the `config` parameter is provided:

1. Empty object: `"config": {}`
2. Null value: `"config": null`
3. Omitted parameter (relying on default)

## Error Details
```
AirbyteConnectorConfigurationMissingError: Connector is missing configuration.
Provide via `set_config()`
Connector Name: 'source-rick-and-morty-api'
```

**Stack Trace:**
```
/airbyte/mcp/_local_ops.py:603 in sync_source_to_cache
source.set_config()

/airbyte/sources/base.py:295 in set_config
self.validate_config()

/airbyte/_connector_base.py:176 in validate_config
config = hydrate_config_from_secret_manager()

/airbyte/_connector_base.py:152 in _hydrated_config
return hydrate_config_from_secret_manager()

/airbyte/_connector_base.py:139 in get_config
raise exc.AirbyteConnectorConfigurationMissingError()
```

## Reproduction Steps
1. Create a valid declarative connector manifest (Rick and Morty API example)
2. Call `sync_source_to_cache` with parameters:
```json
{
"source_connector_name": "source-rick-and-morty-api",
"config": {},
"streams": ["characters"],
"manifest_path": "/path/to/rick_and_morty_manifest.yaml"
}
```
3. Tool fails with configuration missing error

## Expected Behavior
The tool should successfully sync data from the declarative connector using the provided manifest file, especially when the connector requires no authentication (empty config spec).

## Actual Behavior
Tool fails with `AirbyteConnectorConfigurationMissingError` during config validation, preventing any data sync operations.

## Connector Manifest Details
The test connector has an empty connection specification:
```yaml
spec:
type: Spec
connection_specification:
type: object
$schema: http://json-schema.org/draft-07/schema#
required: []
properties: {}
additionalProperties: true
```

## Impact
This bug blocks the complete PyAirbyte MCP testing pipeline, preventing:
- Local data synchronization testing
- SQL query testing on cached data
- End-to-end connector validation workflows

## Additional Context
- The Connector Builder MCP tools work correctly for manifest validation and stream testing
- The issue appears to be specific to the PyAirbyte MCP configuration handling
- This was discovered during comprehensive MCP server testing

## Logs
PyAirbyte logs written to: `/tmp/airbyte/logs/2025-09-26/airbyte-log-*.log`
Connector logs written to: `/tmp/airbyte/logs/source-rick-and-morty-api/source-rick-and-morty-api-log-*.log`

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.