Weather Java SSE Transport MCP Service

Weather Java SSE Transport MCP Service

Java Model Context Protocol SSE HTTP Server with Jetty

stantonk

Research & Data
Visit Server

README

Weather Java SSE Transport MCP Service

A working implementation Model Context Protocol java-sdk. Includes a fast-agent for the MCP Client to interact with the Weather mcp-server.

⚠️This isn't remotely production grade, just demonstrating how to build something working end to end that can leverage multiple MCP Servers both local (Stdio Transport) and remote (HTTP SSE Transport). Also avoids pulling in as much of Spring as possible, for those who don't want it.

In the demo, you'll see the agent:

  1. The agent uses Claude Sonnet 3.7 throughout for the LLM bits
  2. The agent calls out to the "fetch" websearch MCP Server tool to look up lat/long for each city I asked for.
  3. The agent then uses those lat/long values to call the weather MCP Server tool (implemented in this repository). You can see the calls being made in the upper half of the terminal split window.
  4. The agent summarizes the forecasts and determine which of the 4 cities is the warmest tomorrow.

The agent is figuring out which tools to call from the context of the user's inputted prompts.

Description of image

build and start Weather MCP Server

mvn clean package
java -jar java -jar mcp-server/target/mcp-server-1.0-SNAPSHOT.jar

install, configure, and start fast-agent

install

pip install uv
uv pip install fast-agent-mcp
uv run agent.py

Configure Claude and OpenAI api keys

cp fastagent.secrets.yaml.TEMPLATE fastagent.secrets.yaml

then add your api keys to that config file.

Note: Weather MCP Server config

Note, in fastagent.config.yaml we've configured the MCP Servers available to the agent, in this case our server uses the SSE HTTP Transport, this enables calling remote MCP Servers :).

mcp:
    servers:
        weather:
            transport: "sse"
            read_timeout_seconds: 10
            url: "http://localhost:8080/sse"

Lower level for testing

Connect to SSE stream

curl -v -H "Accept: text/event-stream" "http://localhost:8080/sse"

Send messages to /mcp/messages (note, include sessionId from SSE)

curl -X POST "http://localhost:8080/mcp/message?sessionId=b64ad193-6bb3-4e2e-b33c-27a23011acb4" -d '{"hi": "mynameis"}' | jq .

Things to check out:

  • https://github.com/youngsu5582/mcp-server-mysql

Recommended Servers

Crypto Price & Market Analysis MCP Server

Crypto Price & Market Analysis MCP Server

A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.

Featured
TypeScript
MCP PubMed Search

MCP PubMed Search

Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.

Featured
Python
dbt Semantic Layer MCP Server

dbt Semantic Layer MCP Server

A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.

Featured
TypeScript
mixpanel

mixpanel

Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.

Featured
TypeScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python
Nefino MCP Server

Nefino MCP Server

Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.

Official
Python
Vectorize

Vectorize

Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.

Official
JavaScript
Mathematica Documentation MCP server

Mathematica Documentation MCP server

A server that provides access to Mathematica documentation through FastMCP, enabling users to retrieve function documentation and list package symbols from Wolfram Mathematica.

Local
Python
kb-mcp-server

kb-mcp-server

An MCP server aimed to be portable, local, easy and convenient to support semantic/graph based retrieval of txtai "all in one" embeddings database. Any txtai embeddings db in tar.gz form can be loaded

Local
Python
Research MCP Server

Research MCP Server

The server functions as an MCP server to interact with Notion for retrieving and creating survey data, integrating with the Claude Desktop Client for conducting and reviewing surveys.

Local
Python