|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: 'Introducing Model Context Protocol servers project' |
| 4 | +date: 2025-01-28 |
| 5 | +tags: ai |
| 6 | +synopsis: Introducing the Model Context Protocol servers project which provides a set of MCP servers implemented using Quarkus and Java. Starting with JDBC, filesystem and JavaFX. |
| 7 | +author: maxandersen |
| 8 | +--- |
| 9 | +:imagesdir: /assets/images/posts/mcpservers |
| 10 | +ifdef::env-github,env-browser,env-vscode[:imagesdir: ../assets/images/posts/mcpservers] |
| 11 | + |
| 12 | +Today, I'm excited to introduce the Model Context Protocol (MCP) servers project. |
| 13 | + |
| 14 | +Model Context Protocol is the recent approach to enable AI models to interact with your applications and services in a nice decoupled way. |
| 15 | + |
| 16 | +There is already a lot of MCP servers implemented in other languages, but this project is as far as I know the first one to |
| 17 | +provide a set of MCP servers implemented using Java and at least uniquely Quarkus. |
| 18 | + |
| 19 | +Intended to show-case the capabilities of the Model Context Protocol, and inspiration for what you can do with it - especially in Java. |
| 20 | + |
| 21 | +== The Servers |
| 22 | + |
| 23 | +At time of writing there are three servers implemented: |
| 24 | + |
| 25 | +JDBC:: Let your AI app introspect and interact to any JDBC-compatible database |
| 26 | + |
| 27 | +Filesystem:: Access the file system |
| 28 | + |
| 29 | +JavaFX:: Draw on a JavaFX canvas |
| 30 | + |
| 31 | +Each server is implemented using Quarkus and Java, and each server is available to easily run using JBang. |
| 32 | + |
| 33 | +== How to use the servers |
| 34 | + |
| 35 | +The general setup is to install JBang (no need for Java, Quarkus or any other Java tool installed). |
| 36 | + |
| 37 | +Then in your MCP client configure it with: |
| 38 | + |
| 39 | +`jbang [server-name]@quarkiverse/quarkus-mcp-servers [arguments]` |
| 40 | + |
| 41 | +Thus for example to run the JDBC server to connect to a MariaDB database you would do: |
| 42 | + |
| 43 | +`jbang mcp-jdbc-server@quarkiverse/quarkus-mcp-servers jdbc:mariadb://localhost:3306/test --user root --password mysecretpassword` |
| 44 | + |
| 45 | +and if you use a client that is compatible with Claude Desktop config this is how it would look for enabling all the servers: |
| 46 | + |
| 47 | +```json |
| 48 | +{ |
| 49 | + "mcpServers": { |
| 50 | + "jdbc": { |
| 51 | + "command": "jbang", |
| 52 | + "args": [ |
| 53 | + "jdbc@quarkiverse/quarkus-mcp-servers", |
| 54 | + "jdbc:sqlite:%{https://github.com/jpwhite3/northwind-SQLite3/raw/refs/heads/main/dist/northwind.db}" |
| 55 | + ] |
| 56 | + }, |
| 57 | + "jfx": { |
| 58 | + "command": "jbang", |
| 59 | + "args": [ |
| 60 | + "jfx@quarkiverse/quarkus-mcp-servers" |
| 61 | + ] |
| 62 | + }, |
| 63 | + "files": { |
| 64 | + "command": "/jbang", |
| 65 | + "args": [ |
| 66 | + "filesystem@quarkiverse/quarkus-mcp-servers", |
| 67 | + "~/code/quarkusio/quarkus", |
| 68 | + "~/code/jbangdev/jbang", |
| 69 | + ] |
| 70 | + } |
| 71 | + } |
| 72 | +} |
| 73 | +``` |
| 74 | + |
| 75 | +There are more examples for each server in their respective README files. |
| 76 | + |
| 77 | +== Conclusion |
| 78 | + |
| 79 | +This project is a fun way to show-case the capabilities of the Model Context Protocol, and inspiration for what you can do with it - especially in Java. |
| 80 | + |
| 81 | +I hope you will find it useful and fun to play with. |
| 82 | + |
0 commit comments