Bndtools Usability Improvements through MCP and Remote Services

I’ve been posting about using OSGi Remote Services to implement Model Context Protocol Remote Tools. e.g.

and using Bndtools (and Bndtools Workspace Templates) to develop an example

Given Eclipse’s (and therefore Bndtools) OSGi-underneath, this makes it easy to create Remote Services that expose Bndtools and Eclipse tools capabilities as MCP Server-exposed MCP Tools.

In my own fork of the bnd repo:

I’ve created a branch ‘mcp_demo’ that has a new api bundle with one service interface here:

Note that this interface has annotations for MCP Tools (@Tool, @ToolParam). These are mostly text descriptions that can be exposed to LLMs via MCP Servers.

This service interface is implemented in the already existing bundle:

The impl adds a workspace template URI to the github repo preferences via the addWorkspaceTemplateURL method/tool, and the other method/tool will show the list of existing uris.

When run with a remote service admin implementation…e.g. via this bndrun file

bnd/bndtools.core/bndtools.win32.x86_65.rs.bndrun at mcp_demo · scottslewis/bnd · GitHub (.rs. == remote services)

rs == remote services

The impl will be exported and published for discovery (the bndrun uses zeroconf/jmdns advertising/discovery and ecf generic distribution…for simplicity).

With bndtools started in this manner, and exporting this service, it’s now possible for an MCP server to import this exported service, and register both of the two MCP tools defined…so that the MCP server can then expose those tools to any MCP client (e.g. Claude Desktop, GitHub Copilot, many others).

Here’s is a repo

that has both the OSGi-based MCP Server (bndtools.demo.mcpserver project), and a test MCP client (bndtools.demo.mcpclient project) that use the MCP stdio transport…i.e. the MCP client launches the MCP server as a separate process and communicates with it via stdin/stdout/standard error with both client and server processes running on localhost.

The point of all this is that with remote services (for discovery and comm between MCP server process and Eclipse/bndtools process) I’m wanting to try out asking the LLM to search github for ‘bndtools workspace templates’, and then asking the model to add found uri(s) for bndtools workspace templates via the addWorkspaceTemplateURL tool). Claude and the other LLMs should be able to use the description meta-data (i.e. @Tool and @ToolParam prose descriptions) to figure out when and how to do the workspace template uri add.

The code for all these pieces is mostly one class per bundle:

  1. service interface (in bndtools)
  1. service impl (in bndtools)
    bnd/org.bndtools.templating.gitrepo/src/org/bndtools/templating/jgit/tools/WorkspaceTemplateURLAddingToolsImpl.java at mcp_demo · scottslewis/bnd · GitHub

  2. The MCP server impl.:

  1. The test MCP Client:

My point in bringing it up here: I propose using MCP Servers with Remote Services exposing MCP Tools to LLMs…to help improve the overall usability of bndtools…and hopefully Eclipse as well. I chose adding workspace template uris because it’s an often inconvenient (to me) extra step that has to be taken to use bndtools effectively…with Remote Services in my case…and it’s one that could be automated by an LLM/Agent by allowing the agent to configure Bndtools/Eclipse directly at the data layer.

If anyone is interested in trying this out with their favorite AI coding assistant (most if not all now support MCP servers and using the stdio transport) please let me know if you want/need pointers for how to try it out (e.g. with the test MCP client or with the relevant coding assistant/agent).

Finally, I’m looking for input on other ways to improve the bndtools developer experience by allowing other sorts of data-layer/mcp tools-based interactions. So please say so if you have a good idea of something in bndtools/eclipse that could be appropriately automated by providing tools to an AI agent to do it, and defining the tool meta-data to allow the LLM to call/use the tool appropriately.

1 Like