Skip to content

Add protocol logging option to MCP client and server #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jakemac53 opened this issue Mar 24, 2025 · 0 comments · Fixed by #102
Closed

Add protocol logging option to MCP client and server #4

jakemac53 opened this issue Mar 24, 2025 · 0 comments · Fixed by #102
Labels
P2 A bug or feature request we're likely to work on package:dart_mcp

Comments

@jakemac53
Copy link
Contributor

It would be nice to be able to get a full transcript of all messages sent.

We have to be careful (especially on the server side) not to just call print or write to stdout, since that will break the protocol, so having a logging framework makes sense.

On the client side, we should distinguish the logs between each server connection - maybe with separate files per server connection.

@jakemac53 jakemac53 added package:dart_mcp P2 A bug or feature request we're likely to work on labels Mar 24, 2025
@jakemac53 jakemac53 changed the title Add logging option to MCP client and server Add protocol logging option to MCP client and server Apr 15, 2025
jakemac53 added a commit that referenced this issue May 2, 2025
Closes #4.

- Used this functionality to test the invalid protocol message flow, which does appear to work fine as is (json_rpc_2 handles it well for us), but is now tested.
- Made some small breaking changes to the constructors for MCPClient/MCPServer/MCPBase so they all accept a single positional parameter for the stream channel, and this support is implemented once in MCPBase.
sigurdm pushed a commit to sigurdm/ai that referenced this issue May 6, 2025
Closes dart-lang#4.

- Used this functionality to test the invalid protocol message flow, which does appear to work fine as is (json_rpc_2 handles it well for us), but is now tested.
- Made some small breaking changes to the constructors for MCPClient/MCPServer/MCPBase so they all accept a single positional parameter for the stream channel, and this support is implemented once in MCPBase.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 A bug or feature request we're likely to work on package:dart_mcp
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant