github / github/copilot-cli

Copilot CLI couldn't handle BigInt in structured MCP response

Open
#4,211 5 comments 3 reactions 0 assignees View on GitHub
area:mcp triaged
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

### 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](https://github.com/user-attachments/assets/076fe79c-39b0-447c-b076-624fa938b36c)

### 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](https://github.com/user-attachments/assets/ca911c34-26d2-4016-96fd-57c3d4d7d0dd)

### Expected behavior

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure from the repository's .mcp.json configuration by calling the return_big_numbers tool from the StructuredContentBigIntMcp project. Trace where the structured MCP response is serialized and identify the handling of BigInt values. Done means the response no longer raises the serialization error or aborts ongoing tasks.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
api, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.