← ClaudeAtlas

mcp-serverlisted

Add or change an MCP tool or server on this repo's shared mcp-common scaffolding — the McpTool SPI, transport-neutral ToolDefinition/ToolResult, the three transports, path confinement, MCP_USAGE.md and the *IT tests. Use when exposing functionality over MCP, wiring a new server, or when the user says "MCP tool", "MCP server", "stdio transport", or "streamable HTTP".
adamw7/tools · ★ 10 · AI & Automation · score 72
Install: claude install-skill adamw7/tools
# MCP Server Skill Expose functionality over the Model Context Protocol using `mcp-common`, the shared scaffolding behind all three servers here (`data` uniqueness, `code/context`, `adopt`). Transport, registration and error handling are already solved — a new tool writes none of that. ## The SPI — a tool never mentions the MCP SDK ```java public class MyTool implements McpTool { // Function<Map<String,Object>, ToolResult> @Override public ToolDefinition getToolDefinition() { return new ToolDefinition("my_tool", "What it does, for the model.", Map.of("type", "object", "properties", Map.of("path", Map.of("type", "string")), "required", List.of("path"))); } @Override public ToolResult apply(Map<String, Object> arguments) { String path = ToolArguments.requiredString(arguments, "path"); return ToolResult.success(answer); // or ToolResult.error(message) } } ``` - `ToolDefinition` (name, description, JSON-schema map) and `ToolResult` (`success` / `error`) are the SPI's **own transport-neutral types**; `AbstractMcpConfiguration` translates them into the SDK's `Tool` and `CallToolResult`. Do not import `io.modelcontextprotocol` from a tool. - Parse arguments with `ToolArguments`: `requiredString`, `requiredInt`, `optionalString`, `optionalBoolean`, `optionalInt`, `optionalBoundedInt` — don't hand-roll casts out of the map. - **Don't catch-and-wrap fo