Inside Java
Read post

Pairing In-Process and Hosted Embeddings for Java MCP Tool Development

A deep dive into the design of a Java MCP server for urgency scoring, built for a JavaOne 2026 demo. The server exposes a single tool that scores support ticket complaints on a 0–10 urgency scale. It supports two embedding strategies behind the same stable MCP interface: in-process MiniLM embeddings via DJL (384-dimensional, no external dependencies) and hosted OpenAI embeddings (1536-dimensional, production-quality semantics). Each embedding path has its own DeepNetts feed-forward scorer trained specifically against that representation, making the two scorers incompatible with each other. The Helidon framework handles MCP server bootstrapping via annotations (@Mcp.Path, @Mcp.Server, @Mcp.Tool), while the inference stack is loaded lazily. The in-process path is recommended for development, integration testing, and CI; the hosted path is used for semantic validation when credentials and network access are available.

    #java#deep-learning#mcp#embeddings
Jul 25•10m read time•From inside.java
Post cover image
Table of contents
Why Build an MCP Server?How to Obtain Custom Score ModelsOne Tool, Two Inference PathsWhy Both In-Process and Provider-Backed Embeddings ExistVector Compatibility Is Not EnoughProvider Choice Stays Out of the Tool NameFinal Thoughts
2.3K Impressions
Inside Java's image
Inside Java

Inside Java is a resource for Java developers, offering insights, tutorials, and updates on the Java...

693 Followers

•

1.2K Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard