Skip to content

Copilot CLI couldn't handle BigInt in structured MCP response #4211

Description

@xj-ms

Describe the bug

When a MCP server returns big numbers in its response, Copilot CLI cannot handle it and fails with the following error. All ongoing tasks will be aborted

Execution failed: TypeError: Do not know how to serialize a BigInt

Image

Affected version

1.0.74-0

Steps to reproduce the behavior

Requires dotnet 10.

  1. Clone the repo https://github.com/xj-ms/StructuredContentBigIntMcp
  2. Launch Copilot CLI in the repo. The MCP server should be already configured with the local .mcp.json
  3. Ask Copilot to call the return_big_numbers tool
  4. Observe the failure

Image

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registry

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions