Skip to content

Commit 339e1a7

Browse files
authored
1.0.7 (#29)
* chor: init 1.0.7 * refactor: modularize api client and add api key auth - Replaced monolithic KomodoClient with modular Resource Pattern - Integrated official 'komodo_client' package - Added API Key authentication support - Added JSDoc documentation for all API classes - Updated all tools to use new API structure - Removed custom Axios implementation * chore: setup linting, formatting and implement graceful shutdown - Add ESLint and Prettier configuration (.eslintrc.json, .prettierrc) - Add lint and format scripts to package.json - Fix all linting errors and strict type warnings across the codebase - Refactorchore: setup linting, formatting and implement graceful shutdown * feat: add helmet middleware for enhanced security * fix: tests and graceful shutdown * docs: add detailed descriptions for tools and environment schema * docs: changelog * docs: adjusting documentation * fix: correct server name in MCP server instance creation * docs: clarify valid Komodo credentials in README
1 parent caf1e6e commit 339e1a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+3702
-1801
lines changed

.eslintrc.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"extends": [
4+
"plugin:@typescript-eslint/recommended",
5+
"prettier",
6+
"plugin:prettier/recommended"
7+
],
8+
"parserOptions": {
9+
"ecmaVersion": 2020,
10+
"sourceType": "module"
11+
},
12+
"rules": {
13+
"@typescript-eslint/no-explicit-any": "warn",
14+
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
15+
"prettier/prettier": "warn"
16+
}
17+
}

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "all",
4+
"singleQuote": true,
5+
"printWidth": 120,
6+
"tabWidth": 2
7+
}

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8080
- Updated all transport layers to utilize the new centralized logger for consistent output.
8181
- **Standardization**: Standardized log component tags and session management for consistent filtering.
8282

83+
--------------------------------------------------------------
84+
85+
## [1.0.7] (#29)
86+
87+
### Added
88+
- **Security**: Integrated `helmet` middleware to enhance HTTP security headers for the SSE transport.
89+
- **Authentication**: Added support for API Key authentication (`KOMODO_API_KEY`, `KOMODO_API_SECRET`) as an alternative to username/password login.
90+
91+
### Changed
92+
- **Documentation**: Added comprehensive JSDoc documentation for the core `KomodoMCPServer` class, environment configuration schemas, and all tool definitions.
93+
- **Refactoring**: Modularized the API client structure for better maintainability.
94+
- **Stability**: Improved graceful shutdown handling for both Stdio and SSE transports to ensure clean resource release.
8395

96+
### Fixed
97+
- **Tests**: Resolved issues in the test suite and improved logger mocking for tests.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Comming soon: Pre-built n8n workflows for automated container health checks and
125125
- **Komodo** v1.19.5 or later
126126
- **Docker** (for containerized deployment)
127127
- **Node.js 20+** (for local development)
128-
- Valid Komodo credentials (username/password)
128+
- **Valid Komodo credentials** (API Key/Secret or username/password)
129129

130130
### Integration Guides
131131
- **[Claude Desktop](examples/claude/)** - Direct MCP integration

examples/claude/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ Copy the following configuration into the file. You can also download our [templ
3030
"-i",
3131
"-e", "MCP_TRANSPORT=stdio",
3232
"-e", "KOMODO_URL=https://your-komodo-server.com:9120",
33-
"-e", "KOMODO_USERNAME=your-username",
34-
"-e", "KOMODO_PASSWORD=your-password",
33+
"-e", "KOMODO_API_KEY=your-api-key",
34+
"-e", "KOMODO_API_SECRET=your-api-secret",
3535
"ghcr.io/mp-tool/komodo-mcp-server:latest"
3636
]
3737
}
3838
```
3939

40-
**Important:** Replace `KOMODO_URL`, `KOMODO_USERNAME`, and `KOMODO_PASSWORD` with your actual Komodo credentials.
40+
**Important:** Replace `KOMODO_URL`, `KOMODO_API_KEY`, and `KOMODO_API_SECRET` with your actual Komodo credentials.
41+
*Note: You can alternatively use `KOMODO_USERNAME` and `KOMODO_PASSWORD` if you prefer.*
4142

4243
### 3. Restart Claude
4344
Completely quit and restart Claude Desktop. You should now see in the tool's list, below the websearch toggle, the `Komodo MCP Server` and its available tools.

examples/claude/claude_desktop_config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"-i",
99
"-e", "MCP_TRANSPORT=stdio",
1010
"-e", "KOMODO_URL=https://komodo.example.com:9120",
11-
"-e", "KOMODO_USERNAME=username",
12-
"-e", "KOMODO_PASSWORD=password",
11+
"-e", "KOMODO_API_KEY=your-api-key",
12+
"-e", "KOMODO_API_SECRET=your-api-secret",
1313
"ghcr.io/mp-tool/komodo-mcp-server:latest"
1414
]
1515
}

examples/compose/.env.example

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@
1010
# - Docker network: http://komodo-core:9120
1111
KOMODO_URL=https://localhost:9120
1212

13-
# Komodo Authentication
13+
# Komodo API Key (Recommended)
14+
# Obtain this from your Komodo server configuration
15+
KOMODO_API_KEY=your-komodo-api-key
16+
KOMODO_API_SECRET=your-komodo-api-secret
17+
18+
# Komodo Authentication (Alternative)
1419
# Create a dedicated user in Komodo for the MCP server
1520
# Recommended: Create a dedecaded user with read-only or limited permissions
1621
KOMODO_USERNAME=mcp-user

examples/compose/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,14 @@ nano .env
2121
**Required settings:**
2222
```dotenv
2323
KOMODO_URL=https://your-komodo-server.com:9120
24-
KOMODO_USERNAME=your-username
25-
KOMODO_PASSWORD=your-password
24+
25+
# Option A: API Key (Recommended)
26+
KOMODO_API_KEY=your-api-key
27+
KOMODO_API_SECRET=your-api-secret
28+
29+
# Option B: Username/Password
30+
# KOMODO_USERNAME=your-username
31+
# KOMODO_PASSWORD=your-password
2632
```
2733

2834
### 3. Start Server

examples/compose/compose.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ services:
77
environment:
88
# Komodo Connection
99
KOMODO_URL: ${KOMODO_URL:-https://komodo.example.com:9120}
10-
KOMODO_USERNAME: ${KOMODO_USERNAME:-username}
11-
KOMODO_PASSWORD: ${KOMODO_PASSWORD:-password}
10+
KOMODO_API_KEY: ${KOMODO_API_KEY:-your-komodo-api-key}
11+
KOMODO_API_SECRET: ${KOMODO_API_SECRET:-your-komodo-api-secret}
12+
# Optional: Komodo Authentication
13+
# KOMODO_USERNAME: ${KOMODO_USERNAME:-username}
14+
# KOMODO_PASSWORD: ${KOMODO_PASSWORD:-password}
1215

1316
ports:
1417
- 3000:${MCP_PORT:-3000}
@@ -25,7 +28,7 @@ services:
2528

2629
# Health check
2730
healthcheck:
28-
test: ["CMD", "node", "-e", "process.exit(0)"]
31+
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
2932
interval: 30s
3033
timeout: 10s
3134
retries: 3

0 commit comments

Comments
 (0)