JBang MCP Examples
Learning how to interact with LLM from MCP Servers with JBang, Quarkus & Langchain4j
Overview
JBang MCP Examples is a project designed to demonstrate how to interact with Large Language Models (LLMs) from MCP (Multi-Cloud Platform) servers using JBang, Quarkus, and Langchain4j.
To use the JBang MCP Examples, clone the repository and run the provided commands in your terminal. You can execute Java files directly using JBang to see how they interact with LLMs.
- Demonstrates interaction with LLMs using Java. - Provides example scripts for various use cases. - Utilizes JBang for easy execution of Java programs.
- Learning how to set up and run Java applications that interact with LLMs.
- Exploring different functionalities of MCP servers.
- Experimenting with Quarkus and Langchain4j in a practical context.
Add to your AI client
Use these steps to connect JBang MCP Examples in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"jbang-mcp-examples-jabrena": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-jbang-mcp-examples-jabrena"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"jbang-mcp-examples-jabrena": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-jbang-mcp-examples-jabrena"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"jbang-mcp-examples-jabrena": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-jbang-mcp-examples-jabrena"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"jbang-mcp-examples-jabrena": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-jbang-mcp-examples-jabrena"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"jbang-mcp-examples-jabrena": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-jbang-mcp-examples-jabrena"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"jbang-mcp-examples-jabrena": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-jbang-mcp-examples-jabrena"
]
}
}
}FAQ
What is JBang?
JBang is a tool that allows you to run Java applications easily without the need for a complex setup.
Do I need to install anything to use these examples?
Yes, you need to have JBang and Maven installed on your machine.
Can I modify the example scripts?
Absolutely! Feel free to modify the scripts to suit your learning needs.