[all-commits] [llvm/llvm-project] 9524bf: [lldb] Add Model Context Protocol (MCP) support to...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Fri Jun 20 08:48:25 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9524bfb27020d31b9474f595b7c0e5d2e1ac65f5
      https://github.com/llvm/llvm-project/commit/9524bfb27020d31b9474f595b7c0e5d2e1ac65f5
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2025-06-20 (Fri, 20 Jun 2025)

  Changed paths:
    M lldb/cmake/modules/LLDBConfig.cmake
    M lldb/include/lldb/Core/Debugger.h
    M lldb/include/lldb/Core/PluginManager.h
    A lldb/include/lldb/Core/ProtocolServer.h
    M lldb/include/lldb/Interpreter/CommandOptionArgumentTable.h
    M lldb/include/lldb/lldb-enumerations.h
    M lldb/include/lldb/lldb-forward.h
    M lldb/include/lldb/lldb-private-interfaces.h
    M lldb/source/Commands/CMakeLists.txt
    A lldb/source/Commands/CommandObjectProtocolServer.cpp
    A lldb/source/Commands/CommandObjectProtocolServer.h
    M lldb/source/Core/CMakeLists.txt
    M lldb/source/Core/Debugger.cpp
    M lldb/source/Core/PluginManager.cpp
    A lldb/source/Core/ProtocolServer.cpp
    M lldb/source/Interpreter/CommandInterpreter.cpp
    M lldb/source/Plugins/CMakeLists.txt
    A lldb/source/Plugins/Protocol/CMakeLists.txt
    A lldb/source/Plugins/Protocol/MCP/CMakeLists.txt
    A lldb/source/Plugins/Protocol/MCP/MCPError.cpp
    A lldb/source/Plugins/Protocol/MCP/MCPError.h
    A lldb/source/Plugins/Protocol/MCP/Protocol.cpp
    A lldb/source/Plugins/Protocol/MCP/Protocol.h
    A lldb/source/Plugins/Protocol/MCP/ProtocolServerMCP.cpp
    A lldb/source/Plugins/Protocol/MCP/ProtocolServerMCP.h
    A lldb/source/Plugins/Protocol/MCP/Tool.cpp
    A lldb/source/Plugins/Protocol/MCP/Tool.h
    M lldb/unittests/CMakeLists.txt
    M lldb/unittests/DAP/ProtocolTypesTest.cpp
    A lldb/unittests/Protocol/CMakeLists.txt
    A lldb/unittests/Protocol/ProtocolMCPServerTest.cpp
    A lldb/unittests/Protocol/ProtocolMCPTest.cpp
    M lldb/unittests/TestingSupport/TestUtilities.h

  Log Message:
  -----------
  [lldb] Add Model Context Protocol (MCP) support to LLDB (#143628)

This PR adds an MCP (Model Context Protocol ) server to LLDB. For
motivation and background, please refer to the corresponding RFC:
https://discourse.llvm.org/t/rfc-adding-mcp-support-to-lldb/86798

I implemented this as a new kind of plugin. The idea is that we could
support multiple protocol servers (e.g. if we want to support DAP from
within LLDB). This also introduces a corresponding top-level command
(`protocol-server`) with two subcommands to `start` and `stop` the
server.

```
(lldb) protocol-server start MCP tcp://localhost:1234
MCP server started with connection listeners: connection://[::1]:1234, connection://[127.0.0.1]:1234
```

The MCP sever supports one tool (`lldb_command`) which executes a
command, but can easily be extended with more commands.



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