MCP Integration Errors

# Quick MCP Integration Bug Report

**Bug ID**: QS-MCP-ARRAY-DESERIALIZE-001

**Date**: November 28, 2025

**Severity**: High

**Component**: Quick MCP Client Integration Layer

## Executive Summary

Quick’s Model Context Protocol (MCP) client fails to properly parse Server-Sent Events (SSE) responses from MCP servers when the response contains arrays in the result field. This affects all MCP integrations that return collection data, making many third-party tools unusable.

## Technical Details

### Error Message

```

Cannot deserialize value of type `com.amazon.mcpV2.spec.McpSchema$CallToolResult`

from Array value (token `JsonToken.START_ARRAY`)

at [Source: UNKNOWN; byte offset: #UNKNOWN]

```

### Root Cause Analysis

1. **SSE Parsing Failure**: Quick’s MCP client does not properly handle the `data:` prefix standard in Server-Sent Events

2. **Schema Rigidity**: The deserialization logic expects single objects but cannot handle arrays

3. **JSON-RPC Wrapper Handling**: The client fails to properly extract the result field from valid JSON-RPC 2.0 responses

### Technical Root Cause - Schema Design Flaw

Quick’s Java implementation uses a rigid schema (`McpSchema$CallToolResult`) that only accepts object types. The MCP specification allows `result` to be any valid JSON type (object, array, string, number, boolean, null).

This is not a parsing bug - it’s a **fundamental schema design flaw** that makes Quick incompatible with the MCP specification.

**Fix Required**: Update `McpSchema$CallToolResult` to accept `JsonNode` or `Object` type instead of a specific POJO, allowing flexible deserialization of any valid JSON structure.

## Evidence from Production Logs

### Request Format (Correct)

```json

{

“jsonrpc”: “2.0”,

“method”: “tools/call”,

“id”: “request-123”,

“params”: {

"name": "example_list_items",

"arguments": {

  "filter": "active",

  "limit": 10

}

}

}

```

### Server Response (Valid MCP Protocol)

```

data: {“jsonrpc”: “2.0”, “id”: “request-123”, “result”: [{“id”: 1, “name”: “Item 1”}, {“id”: 2, “name”: “Item 2”}]}

```

### Response Validation

:white_check_mark: Valid SSE format with `data:` prefix

:white_check_mark: Valid JSON-RPC 2.0 structure

:white_check_mark: Proper content structure

:white_check_mark: Correct SSE termination (`\n\n`)

## Affected vs. Working Tools

### :cross_mark: Failing Tools (Array Responses)

- `list_devices` - Returns device array

- `list_applications` - Returns application array

- `list_alerts` - Returns alert array

- All other `list_*` operations across MCP integrations

### :white_check_mark: Working Tools (Object Responses)

- `get_device` - Returns single device object

- `get_application` - Returns single application object

- All `get_*` operations that return single objects

## Impact Assessment

### Immediate Impact

- 60-70% of MCP tools unusable

- All list/collection operations fail across MCP integrations

- User workflows requiring bulk data retrieval blocked

### Broader Impact

- Affects ANY MCP server integration returning arrays

- Limits third-party MCP tool ecosystem adoption

- Reduces Quick’s enterprise integration capabilities

## Reproduction Steps

1. Load any MCP integration with array-returning tools

2. Call a `list_*` operation (e.g., `list_devices`)

3. Observe deserialization error

4. Call equivalent `get_*` operation with single object response

5. Observe successful parsing

## Expected vs. Actual Behavior

### Expected

- Quick should parse SSE responses by stripping `data:` prefix

- Should handle both array and object responses in result field

- Should provide meaningful error messages for actual failures

### Actual

- Fails to parse valid SSE responses with arrays

- Throws generic deserialization errors

- Inconsistent behavior between array and object responses

## Testing Requirements

### Unit Tests

- SSE parsing with various prefixes and formats

- Array vs. object deserialization

- Error handling for malformed responses

### Integration Tests

- End-to-end MCP tool workflows

- Multiple third-party MCP server compatibility

- Performance under load

### Regression Tests

- Ensure existing single-object tools continue working

- Validate backward compatibility

## Business Justification

### Customer Impact

- Enterprise customers cannot fully utilize MCP integrations

- Workflow automation blocked for operations requiring bulk data

- Reduced ROI on Quick enterprise features

### Competitive Risk

- Other AI platforms with working MCP support gain advantage

- Customer churn risk for enterprise use cases

- Delayed adoption of new MCP-based integrations

## Priority Recommendation

**HIGH PRIORITY** - This bug blocks core enterprise integration functionality and affects the entire MCP ecosystem within Quick.

## Additional Context

### MCP Protocol Compliance

The Model Context Protocol specification clearly defines SSE as a valid transport mechanism and allows `result` to be any valid JSON type. Quick’s implementation must fully support the standard to ensure compatibility with the growing MCP ecosystem.

### Example Working Implementation

```python

# Correct SSE parsing

response_text = response.text # “data: {…}\n\n”

if response_text.startswith('data: '):

json_str = response_text.replace('data: ', '').strip()

data = json.loads(json_str)

result = data\['result'\]  # Can be array, object, or any JSON type

```

### Timeline Impact

Each day this bug remains unfixed reduces customer confidence in Quick’s enterprise integration capabilities and delays adoption of new MCP-based tools.

## References

- [MCP Specification](https://spec.modelcontextprotocol.io/)

- [JSON-RPC 2.0 Specification]( JSON-RPC 2.0 Specification )

- [Server-Sent Events (SSE) Standard](HTML Standard)

Hi. Thanks you for your question! :slight_smile: Many of our community Experts and folks from our team are on holiday right now. I asked “My Assistant” (universal chat) in Quick, and got this back.
@Brett Could you review and validate the answer below on Monday after you return from holiday?

”Based on the community question about MCP integration errors in Quick, here’s comprehensive troubleshooting guidance:

Common MCP Integration Errors and Solutions

1. Timeout Errors (HTTP 424)

Issue: MCP operations have a fixed 60-second timeout. Operations exceeding this limit automatically fail with an HTTP 424 error.

Solutions:

  • Break complex operations into smaller, sequential tasks

  • Optimize MCP server response times

  • Check for network latency issues between Quick and your MCP server

  • Verify the MCP server is responding within acceptable timeframes

2. Authentication Failures

Common symptoms: “Authentication failed,” “Token expired,” “Insufficient permissions”

Solutions:

  • Token Expiration: Choose “Reconnect” in the Quick console and complete the authentication flow again

  • OAuth Issues:

    • For servers with Dynamic Client Registration (DCR): No manual configuration needed - the system auto-registers

    • For manual configuration: Verify Client ID, Client Secret, Token URL, Auth URL, and Redirect URL are correct

  • Service Authentication: Confirm Client ID, Client Secret, and Token URL for service-to-service connections

  • API Key/Username-Password: Verify credentials with your MCP server administrator

3. Connection Failures

Issue: “Unable to connect to service,” “Server connectivity issues result in immediate failure without retry attempts”

Solutions:

  • Verify MCP server availability and health status

  • Check network connectivity between Quick and the MCP server

  • Validate authentication credentials are current

  • Ensure the MCP server endpoint URL is correct

  • Confirm the Amazon Quick callback URI is allow-listed by your MCP server provider

4. Tool Discovery and Registration Issues

Issue: “Could not load actions,” “Creation failed,” “Tool lists remain static after initial registration”

Solutions:

  • Manual Refresh Required: You must manually refresh actions to detect server-side changes

  • Capability Discovery: After authentication, verify the system successfully discovers:

    • Available tools and actions

    • Data sources and resources

    • Supported protocols and methods

    • Server metadata and capabilities

  • If tools aren’t appearing, try recreating the integration

5. Permission Errors

Issue: “Insufficient permissions,” “One or more parameters are invalid”

Solutions:

  • Verify you have Amazon Quick Author or higher role for action connectors

  • Confirm Amazon Quick Professional subscription is active

  • Check MCP server-side permissions for your account

  • Review required permissions for specific MCP server operations

6. Configuration Issues

Common problems: Invalid parameters, protocol mismatches

Solutions:

  • Supported Configurations:

    • Remote servers only (local stdio connections NOT supported)

    • HTTP streaming preferred over Server-Sent Events (SSE)

    • VPC connectivity NOT supported

  • Verify MCP server endpoint format matches provider requirements

  • Check authentication method matches your MCP server’s requirements

Troubleshooting Steps

  1. Check Integration Status:

    • Go to Quick console → Integrations

    • Locate your MCP integration

    • Review connection status and error messages

  2. Review Authentication:

    • Verify credentials haven’t expired

    • Confirm authentication method is correct for your MCP server

    • Re-authenticate if necessary

  3. Test Connection:

    • Try a simple operation first

    • Check MCP server logs for detailed error information

    • Verify network connectivity

  4. Refresh Actions:

    • In Integrations, select your MCP integration

    • Choose “Review tools”

    • Manually refresh to detect any server-side changes

  5. Check Limitations:

    • Custom HTTP headers are NOT supported

    • Only standard system headers are transmitted

    • Operations must complete within 60 seconds

Getting Additional Help

If issues persist after trying these solutions:

  • Check the specific MCP server provider’s documentation for authentication requirements

  • Review CloudWatch logs for detailed error messages

  • Contact your MCP server administrator to verify server-side configuration

  • Ensure your Quick callback URI is properly allow-listed”

  1. Its not a timeout. Its completing the call, it a deserialization issue. Its unable to decode standard mcp. Its a bug.

  2. Its not Auth. If it was auth, i’d not be this far along, QS woud’nt be able to event get the tool list Its a deserialisation issue, i’ve provided the error,

  3. See 2. And its agentCore, its all inside AWS.

  4. See 2. Its a deserialisation error.

  5. See above

    Quicksuite NEEDS to allow us to get to our error logs. It more i’m discovering about QS, the more it seems like this MCP integration has not been tested very well at all.

Thanks, @mrpackethead!

I have shared this thread with our team for integrations – to raise visibility.

In addition, I recommend filing a case with AWS Support where our team can dive into the details so that we can help you further. Here are the steps to open a support case. If your company has someone who manages your AWS account, you might not have direct access to AWS Support and will need to raise an internal ticket to your IT team or whomever manages your AWS account. They should be able to open an AWS Support case on your behalf. Hope this helps!

There is an open case which has already been escalated to the Qsuite Service Team.