Skip to content

Can't make native image support local STDIO MCP server #5081

@asm0dey

Description

@asm0dey

Please do a quick search on GitHub issues first, there might be already a duplicate issue for the one you are about to create.
If the bug is trivial, just go ahead and create the issue. Otherwise, please take a few moments and fill in the following sections:

Bug description
When I call ./gradlew nativeCompile on this repository: https://github.com/asm0dey/git-mcp-spring/, I'm not getting any errors, however, when I'm trying to use the resulting binary as an mcp in LMStudio, it doesn't seem to work.
The usual Java build works there correctly

Environment
Linux amd64
Spring AI 2.0.0-SNAPSHOT
Spring Boot 4.0.1-SNAPSHOT
Java 25.0.1.r25-nik
Please provide as many details as possible: Spring AI version, Java version, which vector store you use if any, etc

Visually, the same behaviour reproduces on Spring Boot 3 and the latest stable version of Spring AI

Steps to reproduce
In LMStudio, add the following block to mcp:

    "git": {
      "command": "<path>/git-mcp-spring/build/native/nativeCompile/git-mcp-spring"
    }

Open a new chat, turn on the MCP server, and try to use it

OTOH, if you add it as:

    "git": {
      "command": "<path>/java",
    "args": {
      "-jar",
      "<path>/git-mcp-spring/build/libs/git-mcp-spring-0.0.1-SNAPSHOT.jar"
    }

It works roughly as expected - at least it can use the declared tools

Expected behavior
Tools should be available OOTB

Minimal Complete Reproducible example
Please provide a failing test or a minimal complete verifiable example that reproduces the issue.
Bug reports that are reproducible will take priority in resolution over reports that are not reproducible.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions