Java SDK MCP Server

Java SDK MCP Server

java-sdk-mcp-server•bymoises-paschoalick

A Java-based Model Context Protocol server implementing STDIO/JSON message handling and exposing calculator, greeter and info tools.

License: MIT•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Implements an MCP server over STDIO and JSON with an initial handshake and a request-processing loop.
  • •Provides a calculator tool that evaluates basic mathematical expressions.
  • •Provides a greeter tool that returns a personalized greeting for a given name.
  • •Provides a get_info tool returning information about the MCP server.

BEST FOR

  • •Evaluating basic mathematical expressions through an MCP tool.
  • •Generating personalized greetings via an MCP tool.
  • •Retrieving server information from an MCP client.

ABOUT JAVA-SDK-MCP-SERVER

Java SDK MCP Server is cataloged as an MCP server attributed to moises-paschoalick. A Java-based Model Context Protocol server implementing STDIO/JSON message handling and exposing calculator, greeter and info tools. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Java SDK MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Como o servidor processa mensagens MCP?

O servidor envia um handshake inicial e então lê cada linha da entrada, interpreta o JSON e processa a requisição.

Upstream README

View this exact version on GitHub

README.md · a1560c73f547 · Fetched 2026-11-13 14:03:16 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

Java SDK MCP Server

Este projeto demonstra como criar um Model Context Protocol (MCP) Server usando somente o Java SDK. O MCP é um protocolo que permite que ferramentas de IA conversem com sistemas externos de forma padronizada.

📋 Pré-requisitos

  • Java 24 ou superior
  • Maven 3.6+
  • Git

🚀 Como Executar o Projeto

1. Clone o repositório

git clone https://github.com/moises-paschoalick/java-sdk-mcp-server.git
cd java-sdk-mcp-server

2. Navegue para o diretório do projeto MCP

cd java-mcp

3. Compile o projeto

mvn clean compile

4. Execute o projeto

mvn exec:java

Ou crie um JAR executável e execute:

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

🏗️ Estrutura do Projeto

java-sdk-mcp-server/
├── java-mcp/
│   ├── src/
│   │   ├── main/
│   │   │   ├── java/
│   │   │   │   └── org/example/
│   │   │   │       └── Main.java
│   │   │   └── resources/
│   │   └── test/
│   ├── pom.xml
│   └── .gitignore
├── README.md
├── test-examples.md
└── .gitignore

🔧 Funcionalidades Implementadas

O servidor MCP implementa as seguintes ferramentas:

1. calculator

Calculadora simples que avalia expressões matemáticas básicas.

Parâmetros:

  • expression: Expressão matemática (ex: "2 + 3", "10 * 5")

Exemplo de uso:

{
  "expression": "15 + 25"
}

2. greeter

Saudação personalizada.

Parâmetros:

  • name: Nome da pessoa para saudar

Exemplo de uso:

{
  "name": "João"
}

3. get_info

Obtém informações sobre o servidor MCP.

Parâmetros: Nenhum

🧪 Testando com MCP Inspector

Para testar o servidor usando o MCP Inspector:

1. Instale o MCP Inspector

npm install -g @modelcontextprotocol/inspector

2. Execute o servidor

cd java-mcp
mvn clean package

3. Execute o MCP Inspector

# Obtenha o caminho completo do JAR
FULL_PATH=$(pwd)/target/java-mcp-1.0-SNAPSHOT.jar
echo $FULL_PATH

# Execute o inspector
npx @modelcontextprotocol/inspector java -jar $FULL_PATH

4. No Inspector:

  • Verifique a conexão do servidor no painel de conexão
  • Navegue para a aba "Tools" para ver as ferramentas disponíveis
  • Teste cada ferramenta clicando nelas e visualizando a resposta
  • Monitore os logs no painel de Notificações

🔌 Integrando com Claude Desktop

Para usar este MCP server com Claude Desktop:

1. Obtenha o caminho completo do JAR

cd java-mcp
FULL_PATH=$(pwd)/target/java-mcp-1.0-SNAPSHOT.jar
echo $FULL_PATH

2. Configure o Claude Desktop

  1. Abra as preferências do Claude Desktop
  2. Navegue para a seção "MCP Servers"
  3. Adicione um novo servidor com a seguinte configuração:
{
  "java-mcp-example": {
    "command": "java",
    "args": [
      "-jar",
      "$FULL_PATH"
    ]
  }
}

📚 Dependências Principais

  • Jackson: Para processamento JSON
  • SLF4J: Para logging

🔍 Exemplo de Implementação

O servidor é implementado usando uma abordagem simplificada que simula o comportamento do MCP usando STDIO e JSON:

// Configurar entrada e saída
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));

// Enviar handshake inicial
sendHandshake(writer);

// Loop principal para processar mensagens
String line;
while ((line = reader.readLine()) != null) {
    JsonNode request = mapper.readTree(line);
    processRequest(request, writer);
}

🎯 Próximos Passos

  1. Adicionar mais ferramentas: Implemente ferramentas para operações de arquivo, consultas de banco de dados, etc.
  2. Implementar recursos: Adicione suporte para recursos (Resources) do MCP
  3. Adicionar autenticação: Implemente mecanismos de segurança
  4. Melhorar logging: Adicione logging estruturado e métricas
  5. Testes automatizados: Implemente testes unitários e de integração
  6. CI/CD: Configure pipeline de build e deploy

📖 Recursos Adicionais

🤝 Contribuindo

  1. Faça um fork do projeto
  2. Crie uma branch para sua feature (git checkout -b feature/AmazingFeature)
  3. Commit suas mudanças (git commit -m 'Add some AmazingFeature')
  4. Push para a branch (git push origin feature/AmazingFeature)
  5. Abra um Pull Request

📄 Licença

Este projeto está sob a licença MIT. Veja o arquivo LICENSE para mais detalhes.

🆘 Suporte

Se você encontrar algum problema ou tiver dúvidas, por favor abra uma issue no repositório.

📝 Sobre

Este projeto usa apenas o Java SDK para implementar um MCP Server. Para a implementação baseada em Spring, consulte o repositório spring-ai-mcp-server.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Java SDK MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/java-sdk-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools