goose icon indicating copy to clipboard operation
goose copied to clipboard

STDIO extension logging

Open lily-de opened this issue 11 months ago • 0 comments

Through the MCP protocol, server logs can be surfaced to the client (in this case, goose). Being able to add logs to an MCP server and then see them in Goose can massively accelerate development.

Docs / code

Protocol Flow for Logging

  1. Capability Negotiation
Client                              Server
  |                                   |
  |        Initialize Request         |
  |--------------------------------->|
  | (includes ClientCapabilities)     |
  |                                  |
  |        Initialize Result         |
  |<---------------------------------|
  | (includes ServerCapabilities     |
  |  with logging: LoggingCapability)|
  |                                  |
  1. Log Level Configuration (Optional)
Client                              Server  |                                   |
  |     logging/setLevel Request      |
  |--------------------------------->|
  |   (sets desired logging level)    |
  |                                  |
  1. Log Message Flow
Client                              Server
  |                                   |
  |   notifications/message           |
  |<---------------------------------|
  | LoggingMessageNotification        |
  | {                                |
  |   level: "info",                 |
  |   logger: "component_name",      |
  |   data: "message"                |
  | }                                |

lily-de avatar Feb 27 '25 04:02 lily-de