Update Kotlin-MCP-Server with STDIO support, logging & CORS ### Summary - Added support for STDIO transport mode (default behavior). - Configured CORS and migrated SSE server to Ktor's Netty engine. - Redirected logs to `./build/stdout.log` and updated log levels. - New `TestEnvironment` setup for integration testing. - Enhanced documentation with examples for server execution and MCP Inspector usage. - Introduced shadow JAR plugin for building runnable artifacts. ### Motivation and Context Improves server versatility and developer experience by enabling STDIO and refining setup. ## How Has This Been Tested? Unit tests, tested locally (see README.md in sample) **NB! sse plain configuration is not working at the moment** ## Breaking Changes No ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [ ] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [ ] My code follows the repository's style guidelines - [ ] New and existing tests pass locally - [ ] I have added appropriate error handling - [ ] I have added or updated documentation as needed ## Additional context <!-- Add any other context, implementation notes, or design decisions -->
25 lines
597 B
JSON
25 lines
597 B
JSON
{
|
|
"mcpServers": {
|
|
"stdio-server": {
|
|
"command": "java",
|
|
"args": [
|
|
"-Dorg.slf4j.simpleLogger.defaultLogLevel=off",
|
|
"-jar",
|
|
"./build/libs/kotlin-mcp-server-0.1.0-all.jar"
|
|
],
|
|
"env": {
|
|
},
|
|
"note": "For SSE connections, add this URL directly in your MCP Client"
|
|
},
|
|
"sse-server": {
|
|
"type": "sse",
|
|
"url": "http://127.0.0.1:3001/sse",
|
|
"note": "SSE with plain configuration"
|
|
},
|
|
"sse-ktor-server": {
|
|
"type": "sse",
|
|
"url": "http://127.0.0.1:3002/",
|
|
"note": "SSE with Ktor plugin"
|
|
}
|
|
}
|
|
}
|