Skip to content

mcp kotlin server does not process JSONRPCRequest with null param, but python sdk may send with null param #42

Open
@shendaxia-sm

Description

@shendaxia-sm

Describe the bug

this request works with kotlin mcp server:

{“id”:“1”,“jsonrpc”:“2.0”,“method”:“tools/list”,“params”:{}}

but this request not works:

{“id”:“1”,“jsonrpc”:“2.0”,“method”:“tools/list”}

python sdk client send with null params, but kotlin sdk deserialize json with default null param, and will not invoker handler when param lis null

so kotlin sdk should set params default to EmptyJsonObject

To Reproduce
Steps to reproduce the behavior:
use python SSE Transport client send list tool command to a kotlin mcp server, will reproduce this issue.

Expected behavior
A clear and concise description of what you expected to happen.

Logs
If applicable, add logs to help explain your problem.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions