Skip to content

error receiving from stream: unexpected end of JSON input when using MCP #749

@incoming-th

Description

@incoming-th

Describe the bug

When running the docker cagent with the MCP DuckDuckGo toolset, the agent or MCP server fails to respond correctly or produces errors.

Version affected

version: "2"
agents:
  root:
    model: groq
    description: A helpful AI assistant
    instruction: |
      You are a knowledgeable assistant that helps users with various tasks.
      Be helpful, accurate, and concise in your responses. 
    
    toolsets:
      - type: mcp
        ref: docker:duckduckgo

models:
  groq:
    provider: openai
    model: llama-3.3-70b-versatile
    base_url: https://api.groq.com/openai/v1
    max_tokens: 8000
    temperature: 0.1

How To Reproduce

-Use the yaml above and run it with cagent run test.yaml --env-from-file .env

Expectation

The agent should return the output correctly.

Screenshots

Image Image

OS and Terminal type

-Windows 11
-Windows PowerShell

Additional context

The issue occurs specifically with mcp type toolsets using docker:duckduckgo even if the MCP server is available in MCP Toolkit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions