{"id":30617492,"url":"https://github.com/qaware/mcp-server-kickstart","last_synced_at":"2025-08-30T10:48:20.675Z","repository":{"id":301386234,"uuid":"1009086310","full_name":"qaware/mcp-server-kickstart","owner":"qaware","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-02T14:54:37.000Z","size":176,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-26T09:42:28.635Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qaware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-26T14:54:09.000Z","updated_at":"2025-07-25T11:23:13.000Z","dependencies_parsed_at":"2025-06-26T16:31:01.761Z","dependency_job_id":"835a3e67-4822-4e4a-aadf-21a89e5b5805","html_url":"https://github.com/qaware/mcp-server-kickstart","commit_stats":null,"previous_names":["qaware/mcp-server-kickstart"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/qaware/mcp-server-kickstart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qaware%2Fmcp-server-kickstart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qaware%2Fmcp-server-kickstart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qaware%2Fmcp-server-kickstart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qaware%2Fmcp-server-kickstart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qaware","download_url":"https://codeload.github.com/qaware/mcp-server-kickstart/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qaware%2Fmcp-server-kickstart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272839679,"owners_count":25001862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-30T10:48:20.049Z","updated_at":"2025-08-30T10:48:20.651Z","avatar_url":"https://github.com/qaware.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MCP Server Kickstart 🚀\n\nA minimalistic Java framework for quickly creating [MCP (Model Context Protocol)](https://modelcontextprotocol.io) servers without the hassle of dealing with Jetty configuration, JSON handling, or reflection magic.\n\n## Features\n\n- **Annotation-based tools** - Just annotate your methods with `@McpTool` and `@McpParam`\n- **Automatic JSON schema generation** - No manual schema writing needed\n- **Fluent Builder API** - Clean and readable server configuration\n- **Zero configuration** - Sensible defaults, just add your tools and go\n- **Robust reflection handling** - Supports arrays, collections, and complex types\n- **Built-in Jetty server** - Production-ready HTTP server included\n- **Graceful shutdown** - Proper cleanup on application termination\n\n## Quick Start\n\n### 1. Clone and Build\n\n```bash\ngit clone https://github.com/qaware/mcp-server-kickstart.git\ncd mcp-server-kickstart\n./gradlew build\n```\n\n### 2. Create Your Tool Class\n\n```java\npublic class MyTools {\n    \n    @McpTool(\"Adds two numbers together\")\n    public int add(@McpParam(name = \"a\", description = \"First number\") int a,\n                   @McpParam(name = \"b\", description = \"Second number\") int b) {\n        return a + b;\n    }\n    \n    @McpTool(\"Gets information about files in a directory\")\n    public List\u003cString\u003e listFiles(@McpParam(name = \"directory\", description = \"Directory path\") String directory) {\n        return Arrays.stream(new File(directory).listFiles())\n                     .map(File::getName)\n                     .collect(Collectors.toList());\n    }\n}\n```\n\n### 3. Start Your Server\n\n```java\npublic class Server {\n\n    public static void main(String[] args) throws Exception {\n        McpServer.create()\n                 .serverInfo(\"My MCP Server\", \"1.0.0\")\n                 .port(8090)\n                 .addTool(new MyTools())\n                 .start();\n    }\n}\n```\n\n### 4. Run\n\n```\n./gradlew run\n```\n\nYour MCP server will be available at http://localhost:8090/sse\n\n### Debugging\n\nThe server logs all tool registrations and requests. Check the console output for:\n\n```\nINFO  - Creating MCP servlet 'My MCP Server' v1.0.0\nINFO  - Registering tools from: MyTools\nINFO  - MCP Server started successfully on http://localhost:8090\n```\n\n### Supported Types\n\nThe framework automatically handles JSON schema generation for:\n\n* Primitives: int, long, double, float, boolean\n* Strings: String\n* Arrays: int[], String[], etc.\n* Collections: List\u003cT\u003e, Set\u003cT\u003e, Collection\u003cT\u003e\n\n## Configuration\n\n### Server Configuration\n\n```java\nMcpServer.create()\n    .serverInfo(\"My Server\", \"2.0.0\")  // Server name and version\n    .port(8080)                        // HTTP port (default: 8090)\n    .addTool(new MyTools())            // Add tool instances\n    .addTool(new MoreTools())          // Add multiple tools\n    .start();\n```\n\n## Tool Methods\n\nMethods must be annotated with @McpTool(\"description\")\n\nAll parameters must be annotated with @McpParam(name = \"paramName\", description = \"...\")\n\nReturn types are automatically JSON-serialized\n\nExceptions are automatically caught and returned as error responses\n\n## Connecting to AI Tools\n\n### Codeium (KiloCode) ✅ Tested\n\nAdd this to your KiloCode MCP configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"java-kickstart-server\": {\n      \"url\": \"http://localhost:8090/sse\",\n      \"headers\": {\n        \"Authorization\": \"Bearer your-token-here\"\n      },\n      \"alwaysAllow\": [\"hello\", \"add\", \"getItems\"],\n      \"disabled\": false\n    }\n  }\n}\n```\n\n### Claude Desktop (Anthropic) ⚠️ Untested\n\nBased on documentation, this should work for Claude Desktop:\n\nLocation:\n\n* macOS: ~/Library/Application Support/Claude/claude_desktop_config.json\n* Windows: %APPDATA%\\Claude\\claude_desktop_config.json\n\nConfiguration:\n\n```json\n{\n  \"mcpServers\": {\n    \"my-java-server\": {\n      \"command\": \"node\",\n      \"args\": [\"path/to/your/mcp-server\"],\n      \"env\": {\n        \"SERVER_URL\": \"http://localhost:8090/sse\"\n      }\n    }\n  }\n}\n```\n\nNote: Claude Desktop configuration may differ - please check the official Claude MCP documentation for the exact format.\n\n### General MCP Clients\n\nAny MCP client should be able to connect to: http://localhost:8090/sse\n\n\n## Examples\n\n### Simple Calculator\n\n```java\npublic class Calculator {\n    \n    @McpTool(\"Performs basic arithmetic operations\")\n    public double calculate(@McpParam(name = \"operation\", description = \"Operation: +, -, *, /\") String op,\n                           @McpParam(name = \"a\") double a,\n                           @McpParam(name = \"b\") double b) {\n        return switch (op) {\n            case \"+\" -\u003e a + b;\n            case \"-\" -\u003e a - b;\n            case \"*\" -\u003e a * b;\n            case \"/\" -\u003e a / b;\n            default -\u003e throw new IllegalArgumentException(\"Unknown operation: \" + op);\n        };\n    }\n}\n```\n\n### File Operations\n\n```java\npublic class FileTools {\n    \n    @McpTool(\"Reads content from a file\")\n    public String readFile(@McpParam(name = \"path\", description = \"File path\") String path) throws IOException {\n        return Files.readString(Paths.get(path));\n    }\n    \n    @McpTool(\"Lists files in directory\")\n    public List\u003cString\u003e listDirectory(@McpParam(name = \"path\") String path) {\n        File dir = new File(path);\n        return dir.isDirectory() ? Arrays.asList(dir.list()) : List.of();\n    }\n}\n```\n\n### Working with Collections\n\n```java\npublic class DataTools {\n    \n    @McpTool(\"Filters a list of numbers\")\n    public List\u003cInteger\u003e filterNumbers(@McpParam(name = \"numbers\") List\u003cInteger\u003e numbers,\n                                      @McpParam(name = \"threshold\") int threshold) {\n        return numbers.stream()\n                     .filter(n -\u003e n \u003e threshold)\n                     .collect(Collectors.toList());\n    }\n}\n```\n\n## Building Fat JAR\n\n```\n./gradlew jar\njava -jar build/libs/mcp-server-kickstart-1.0.0.jar\n```\n\n## Requirements\n\n* Java 17+\n* Gradle 8.14.2+ (included via wrapper)\n\n## Dependencies\n\n- **MCP SDK**: `io.modelcontextprotocol.sdk:mcp:0.10.0`\n- **Jetty**: `org.eclipse.jetty:jetty-server:12.0.22`\n- **Jackson**: `com.fasterxml.jackson.core:jackson-databind:2.16.1`\n- **SLF4J**: `org.slf4j:slf4j-simple:2.0.9`\n\n## License\n\nMIT License - Feel free to use this in your projects!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqaware%2Fmcp-server-kickstart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqaware%2Fmcp-server-kickstart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqaware%2Fmcp-server-kickstart/lists"}