home / mcp / modelcontextprotocolserver

ModelContextProtocolServer

Java-based MCP server exposing calculator and weather tools via HTTP and stdio

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "innobridge-modelcontextprotocolserver": {
      "url": "http://localhost:8081/mcp/message"
    }
  }
}

You can run and interact with the ModelContextProtocolServer to access its tools over HTTP or via a local stdio process. This server exposes capabilities such as a calculator and current weather queries, enabling you to integrate these tools into your applications or testing scripts with ease.

How to use

To use the server, connect your MCP client to either the HTTP endpoint or launch the local stdio process. When using HTTP, you send requests to the server’s message endpoint and receive results that your application can consume. When using stdio, you run the server locally and communicate with it through the standard input/output transport, which provides a fast, self-contained integration for automated workflows.

How to install

Prerequisites you need before you start:

  • Java Development Kit (JDK) 8 or newer
  • A Java build tool available in your environment (Maven Wrapper is used in examples)

Step-by-step commands you should run to build and start the server locally:

./mvnw clean install
```

```
java -Dtransport.mode=stdio \
     -Dspring.main.web-application-type=none \
     -Dspring.main.banner-mode=off \
     -Dlogging.file.name=mcpserver.log \
     -jar target/mcpserver-0.0.1-SNAPSHOT.jar

Available tools

calculator

Basic calculator tool that performs arithmetic operations given an operation and operands.

get_current_weather

Provides the current weather for a specified location and format (e.g., Celsius).