Skip to content

[Feature]: Add support for logging capability #518

Description

@everm1nd

Problem statement

https://modelcontextprotocol.io/specification/draft/server/utilities/logging

The Model Context Protocol (MCP) provides a standardized way for servers to send structured log messages to clients. Clients can control logging verbosity by setting minimum log levels, with servers sending notifications containing severity levels, optional logger names, and arbitrary JSON-serializable data.

Currently there's no way to output debugging information to the client

Proposed solution

Expose logger from xmcp that will support methods as debug, info, error, etc. (corresponding to RFC 5424) as described here: https://modelcontextprotocol.io/specification/draft/server/utilities/logging#log-levels

Receive initial logging/setLevel request from client and store level

The logger should decide to send a message or not, depending on the log level and the method called

Package

xmcp (core framework)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions