modelcontextprotocol / modelcontextprotocol/java-sdk

MCP server in WAR on application server

Open
#763 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement P3 waiting for user
Dominant language
Java
Stars
3.7k
Forks
1.1k
Avg merge
1d 15h
Merged PRs (30d)
9

Description

I'm trying to create an MCP server using the servlet-based HttpServletStreamableServerTransportProvider. The application should be deployable as a WAR on an application server (e.g. Wiildfly).

I'm struggling to understand how I can get this to work. The class HttpServletStreamableServerTransportProvider, although annotated as @WebServlet, is not instantiable by the container and its only constructor is private such that it cannot be extended (although it is not final).

What is the indended way of getting an MCP servlet running in this usage scenario?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with HttpServletStreamableServerTransportProvider, its @WebServlet annotation, and its private constructor. Trace how the SDK expects an MCP servlet to be created and deployed in a WAR on an application server such as WildFly. Done means the supported deployment path is implemented or clearly documented for this usage scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.