Weather Java SSE Transport MCP Service
@stantonk
Java Model Context Protocol SSE HTTP Server with Jetty
Overview
What is Weather Java SSE Transport MCP Service?
A demonstration implementation of the Model Context Protocol java-sdk that includes a fast-agent for the MCP Client to interact with a Weather MCP server. It shows how to build an end-to-end system leveraging both local (Stdio Transport) and remote (HTTP SSE Transport) MCP servers while avoiding excessive Spring dependencies. Intended for developers learning about MCP server and client integration.
How to use Weather Java SSE Transport MCP Service?
Build the server with mvn clean package then start with java -jar mcp-server/target/mcp-server-1.0-SNAPSHOT.jar. Install the fast-agent using pip install uv, then uv pip install fast-agent-mcp, and run with uv run agent.py. Configure Claude and OpenAI API keys in fastagent.secrets.yaml. The server is configured in fastagent.config.yaml with transport "sse", a 10‑second read timeout, and URL http://localhost:8080/sse.
Key features of Weather Java SSE Transport MCP Service?
- Implements Model Context Protocol java‑sdk
- Includes fast-agent for MCP Client interaction
- Supports local Stdio and remote HTTP SSE transports
- Avoids pulling in Spring where possible
- Agent uses Claude Sonnet 3.7 for LLM decisions
- Agent autonomously selects tools from user prompts
Use cases of Weather Java SSE Transport MCP Service?
- Developer testing local MCP server interactions with an agent
- Agent‑based weather data retrieval using geographic tool chaining
- Demonstrating hybrid MCP server architecture (Stdio + SSE)
- Evaluating the MCP java‑sdk implementation end‑to‑end
- Experimenting with tool selection driven by natural language prompts
FAQ from Weather Java SSE Transport MCP Service
What runtime dependencies are required?
Java and Maven for the server, Python with uv for the fast-agent, and API keys for Claude and OpenAI (configured in fastagent.secrets.yaml).
What transport protocols are supported?
The server uses HTTP SSE (Server‑Sent Events) transport. The agent configuration can also connect