mcpField
L
Langchain4j APP MCP HOST/Client For Spring boot MCP server

Langchain4j APP MCP HOST/Client For Spring boot MCP server

Local
github.com/thrkrdkDeveloper Tools0Updated 73w ago

About Langchain4j APP MCP HOST/Client For Spring boot MCP server

A Spring Boot client application using Langchain4j to connect an Ollama model with MCP servers over SSE or STDIO. It demonstrates tool use in a bot interface, with the final branch focused on STDIO.

Key features

  1. 01Ollama Qwen2.5-coder:14b connection
  2. 02MCP transport over SSE
  3. 03MCP transport over STDIO
  4. 04ToolProvider-based tool access
  5. 05Bot interface using AI Services

Use cases

  1. 01Trying MCP tools from a Spring Boot bot
  2. 02Connecting an Ollama model to an SSE MCP server
  3. 03Connecting an Ollama model to a STDIO MCP server

MCP support

The application acts as an MCP client, creating transports and an MCP Client for SSE and STDIO servers. It retrieves server tools through ToolProvider and invokes them from the bot.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Langchain4j APP MCP HOST/Client For Spring boot MCP server

  • Main branch : Initial start.
  • 01-connect-to-ai branch: Private LLM connection
    • Create Bot Interface
    • Connect to Ollama Qwen2.5-coder:14b
    • Ask For the information of the number 1 star war character
  • 02-use-mcp-server-sse: Connecting SSE Mcp Server
    • Change Ollama url by using kaggle and ngrok
    • Run Demo image in podman in SSE mode. Get the SSE URL from the podman image.
    • Create ChatLanguageModel for Ollama
    • Create Transport for MCP with SSE URL
    • Create MCP Client
    • MCP server needs ToolProvider to get the tools from the server.
    • Create an aiservices instance with Bot type.
    • Call the assistant with a tool.
  • 03-use-mcp-server-stadio: Connecting Stdio Mcp Server
    • Change Ollama url by using kaggle and ngrok
    • Run Demo image in podman in STDIO mode.
    • Create ChatLanguageModel for Ollama
    • Create Transport for MCP with STDIO
    • Create MCP Client
    • MCP server needs ToolProvider to get the tools from the server.
    • Create an aiservices instance with Bot type.
    • Call the assistant with a tool.

03-use-mcp-server-stadio is the FINAL BRANCH. all code is in this branch

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.