Get the FREE Ultimate OpenClaw Setup Guide →

mcp -useful-tools

MCP Server useful tools, Spring AI MCP, Weather MCP, Stock MCP, Weather tool, Stock tool. https://mcphub.tools

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio tmstack-mcp-server-useful-tools mvn spring-boot:run \
  --env JAVA_HOME="path/to/java17" \
  --env MAVEN_OPTS="-Xmx1G"

How to use

This MCP server exposes a collection of practical tools built around the Model Context Protocol (MCP), including a weather capability and a stock information tool. When started, the server serves endpoints for weather data and synthetic stock quotes via HTTP, and it includes an SSE (Server-Sent Events) endpoint for streaming weather updates at /sse. You can query the weather tool to get current conditions for a city (for example,杭州), or use the stock tool to retrieve real-time-like stock information. The SSE endpoint allows you to subscribe to live-like weather updates, enabling lightweight real-time monitoring without polling. The server is designed to be a Spring Boot application packaged with Maven, leveraging Spring AI and related tooling to deliver MCP-compliant responses via simple HTTP interactions.

How to install

Prerequisites:

  • Java JDK 17 installed and JAVA_HOME set
  • Maven installed and available in PATH
  • Git installed

Steps:

  1. Clone the repository (or download the MCP server project): git clone https://github.com/yourorg/mcp-server-useful-tools.git cd mcp-server-useful-tools

  2. Build and run the server (Spring Boot via Maven): mvn -DskipTests package mvn spring-boot:run

  3. Verify the server is running:

    • Access the Weather MCP endpoint (Example): http://localhost:8080/sse
    • Check standard HTTP endpoints for weather and stock data as documented in the README

Notes:

  • The server is configured to run with Java 17 and Maven. If you need to customize memory, adjust MAVEN_OPTS or JAVA_OPTS accordingly.

Additional notes

Tips and considerations:

  • Ensure JAVA_HOME points to a Java 17 JDK installation.
  • The /sse endpoint provides a streaming interface for weather updates; use an EventSource client to consume real-time data.
  • The stock tool demonstrates formatted financial output; for programmatic consumption, consider parsing the structured response from the stock endpoint.
  • If you encounter port conflicts (8080), configure Spring Boot to use a different port in application.properties or via command-line overrides.
  • The MCP integration relies on standard HTTP endpoints; you can integrate these into automation workflows or n8n templates as demonstrated by the platform.

Related MCP Servers

Sponsor this space

Reach thousands of developers