convez.ai
MCP Server
malayab365

map-toolbox-server

malayab365/map-toolbox-server

Ver no GitHub
InicialPluginScore · de 0 a 100

MCP server in Spring boot

Instalação

$npx convez-ai malayab365/map-toolbox-server

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
28%
Último commit
há 5 meses
Versão
—
Issues abertas
0
Contribuidores
1

README

A tradução para o português deste README ainda está na fila.

MCP Toolbox Server

A Spring Boot (Spring AI) MCP server that exposes tools for connecting to common backend systems:

ConnectorTools
Oracle / JDBCoracleQuery, oracleUpdate, oracleListTables, oracleDescribeTable
MongoDBmongoListCollections, mongoFind, mongoInsert, mongoCount, mongoDelete
RedisredisGet, redisSet, redisDelete, redisKeys, redisTtl
KafkakafkaPublish, kafkaConsume
JSONjsonValidate, jsonPrettyPrint, jsonMinify, jsonPath
JMS / IBM MQmqSend, mqReceive

Each connector is injected lazily, so the server starts even when a backend is unreachable — the relevant tool simply returns a clear "not configured" error when called.

Requirements

  • Java 21
  • Maven 3.9+

Build & run

mvn clean package

SSE / HTTP transport (default)

java -jar target/mcp-toolbox-server-0.1.0.jar
  • SSE stream: GET http://localhost:8080/sse
  • Message post: POST http://localhost:8080/mcp/message

STDIO transport (e.g. Claude Desktop)

java -jar target/mcp-toolbox-server-0.1.0.jar --spring.profiles.active=stdio

The stdio profile disables the web server, banner, and console logging (stdout is reserved for the MCP protocol) and writes logs to ./mcp-toolbox-server.log.

Claude Desktop config

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "toolbox": {
      "command": "java",
      "args": [
        "-jar",
        "/absolute/path/to/mcp-toolbox-server-0.1.0.jar",
        "--spring.profiles.active=stdio"
      ],
      "env": {
        "ORACLE_URL": "jdbc:oracle:thin:@//db-host:1521/ORCLPDB1",
        "ORACLE_USER": "app",
        "ORACLE_PASSWORD": "secret",
        "MONGODB_URI": "mongodb://localhost:27017/appdb",
        "REDIS_HOST": "localhost",
        "KAFKA_BOOTSTRAP": "localhost:9092",
        "MQ_QMGR": "QM1",
        "MQ_CONN": "localhost(1414)"
      }
    }
  }
}

Configuration

All connection settings live in src/main/resources/application.yml and are overridable via environment variables:

Env varPurposeDefault
ORACLE_URL / ORACLE_USER / ORACLE_PASSWORDOracle JDBClocalhost:1521/XEPDB1
MONGODB_URIMongoDB connection stringmongodb://localhost:27017/appdb
REDIS_HOST / REDIS_PORTRedislocalhost:6379
KAFKA_BOOTSTRAPKafka brokerslocalhost:9092
MQ_QMGR / MQ_CHANNEL / MQ_CONN / MQ_USER / MQ_PASSWORDIBM MQdev defaults
SERVER_PORTHTTP port (SSE mode)8080

Adding a new connector

  1. Create a class in com.example.mcptoolbox.tools annotated with @Component.
  2. Add public methods annotated with @Tool(description = "..."); annotate parameters with @ToolParam.
  3. Register the bean in McpToolboxApplication#toolboxTools(...).

The @Tool descriptions are what the LLM sees, so keep them precise.

Project layout

src/main/java/com/example/mcptoolbox/
├── McpToolboxApplication.java     # entry point + tool registration
└── tools/
    ├── OracleDbTools.java
    ├── MongoTools.java
    ├── RedisTools.java
    ├── KafkaTools.java
    ├── JsonTools.java
    └── JmsMqTools.java
src/main/resources/
├── application.yml                # SSE mode + connector config
└── application-stdio.yml          # STDIO profile

Safety notes

  • oracleQuery rejects non-SELECT statements; writes go through oracleUpdate. Both run whatever SQL they're given — restrict the DB user's grants and consider read-only credentials in production.
  • redisKeys uses KEYS which can be expensive on large datasets.
  • Treat this server as privileged: anything that can reach the MCP endpoint can reach your backends with the configured credentials.
Ver o original no GitHub

Relacionados