[all-commits] [llvm/llvm-project] a49df8: [lldb] Adopt JSONTransport in the MCP Server (#155...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Mon Aug 25 10:55:52 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a49df8ec7d9529b52d0aeefed4dd52b03049f69e
      https://github.com/llvm/llvm-project/commit/a49df8ec7d9529b52d0aeefed4dd52b03049f69e
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    M lldb/include/lldb/Protocol/MCP/Server.h
    M lldb/source/Plugins/Protocol/MCP/ProtocolServerMCP.cpp
    M lldb/source/Plugins/Protocol/MCP/ProtocolServerMCP.h
    M lldb/source/Protocol/MCP/Server.cpp
    M lldb/unittests/ProtocolServer/ProtocolMCPServerTest.cpp

  Log Message:
  -----------
  [lldb] Adopt JSONTransport in the MCP Server (#155034)

This PR adopts JSONTransport in the MCP server implementation. It
required a slight change in design in the relationship between the two
server classes. Previously, these two had an "is-a" connection, while
now they have a "has-a" connection.

The "generic" protocol server in Protocol/MCP now operates using a
single connection (Transport). This matches the design in DAP where each
DAP instance has its own connection. The protocol server in Plugins
still supports multiple clients and creates a new server instance for
each connection.

I believe the new design makes sense in the long term (as proved by DAP)
and allows us to make the server stateful if we choose to do so. There's
no reason that multiple client support can't live in the generic
protocol library, but for now I kept it in ProtocolServerMCP to avoid
creating unnecessary abstractions.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list