langchain4j-mcp-server-patterns

Installation
Summary

Standardized MCP server implementation patterns with LangChain4j for extending AI capabilities.

  • Provides tool providers, resource providers, and prompt template patterns to expose custom capabilities through the Model Context Protocol
  • Supports multiple transport mechanisms including stdio for local processes and HTTP for remote servers
  • Includes Spring Boot integration, multi-server configuration, and dynamic tool discovery with context-aware filtering
  • Implements security patterns for tool access control, resource validation, and protection against prompt injection from untrusted external servers
SKILL.md

LangChain4j MCP Server Implementation Patterns

Overview

Use this skill to design and implement Model Context Protocol (MCP) integrations with LangChain4j.

The main concerns are:

  • defining a clean tool, resource, and prompt surface
  • choosing the right transport and bootstrap model
  • filtering unsafe capabilities before exposing them to agents or applications

Keep SKILL.md focused on the implementation flow. Use the bundled references for expanded examples and API-level detail.

When to Use

Use this skill when:

  • building a Java MCP server that exposes tools, resources, or prompts
  • integrating LangChain4j with one or more external MCP servers
  • wiring MCP support into a Spring Boot application
Related skills

More from giuseppe-trisciuoglio/developer-kit

Installs
862
GitHub Stars
246
First Seen
Feb 3, 2026