ai-mcp
shubhamsharma2212/ai-mcp
A small Model Context Protocol (MCP) server over SSE, built with Java 21 and Spring AI. Exposes a developer toolbox plus a live Open-Meteo weather tool.
Instalação
npx convez-ai shubhamsharma2212/ai-mcp1 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
README
A tradução para o português deste README ainda está na fila.
ai-mcp
A tiny Model Context Protocol server that hands an AI assistant a few everyday developer tools — generate UUIDs, hash a string, base64 encode/decode, convert epochs to dates, and slugify text. This is just a demonstration , these tools can be used to fetch data from rest api, some logic, some events etc.
It's built with Spring AI and exposes the tools over SSE (Server-Sent Events), so any MCP-capable client (Claude Desktop, the MCP Inspector, your own agent) can connect and call them.
I built this mostly to get my hands dirty with Spring AI's MCP server support, but the tools are genuinely handy, so it doubles as something I actually keep running.
Stack
- Java 21
- Spring Boot 3.5.x
- Spring AI 1.1.7 (
spring-ai-starter-mcp-server-webmvc)
Running it
You don't need Maven installed — the wrapper is checked in:
./mvnw spring-boot:run
The server comes up on port 8080. On startup you'll see the MCP server register the tools in the logs.
To run the tests:
./mvnw test
The tools
| Tool | What it does |
|---|---|
generateUuid | Generate 1–50 random v4 UUIDs |
hashText | SHA-256 / SHA-1 / MD5 digest of some text (hex) |
base64 | Encode or decode base64 |
epochToDate | Unix epoch (seconds) → ISO-8601 timestamp, any time zone |
dateToEpoch | ISO-8601 timestamp → Unix epoch (seconds) |
slugify | Turn "Café au lait!" into cafe-au-lait |
getCurrentWeather | Current weather for a city, via the free Open-Meteo API |
The first five are pure, self-contained functions. getCurrentWeather is the odd
one out — it actually calls a public REST API (no key needed), which is there to
show how an MCP tool can wrap an external service.
Connecting a client
The SSE stream lives at http://localhost:8080/sse and messages go to
/mcp/message. The quickest way to poke at it is the official MCP Inspector:
npx @modelcontextprotocol/inspector
Point it at http://localhost:8080/sse, hit List Tools, and you should see all
six. Try generateUuid with count = 3 or hashText with
text = "hello", algorithm = "SHA-256".
To wire it into Claude Desktop, add an entry under mcpServers in its config that
points at the same SSE URL.
Notes
- MD5 and SHA-1 are there for checksums and legacy data — don't use them for anything security-sensitive.
- Bad input (an unknown algorithm, an out-of-range count, a malformed date) comes back as a clean error message rather than a stack trace.