@ecubelabs/mysql-mcp 1.1.0-next.1 → 1.1.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -489,7 +489,7 @@ profile과 alias는 환경 변수가 아니라 서버 실행 인자로 받습니
489
489
  ## 읽기 전용 강제
490
490
 
491
491
  Profile 이름이 `prod`로 시작하면(`prod`, `production`, `prod-ccn2`) `src/config/index.ts`가
492
- 두 가지를 합니다. `--profile`과 deprecated `MYSQL_PROFILE` 중 하나만 해당해도 마찬가지입니다.
492
+ 두 가지를 합니다. `--profile`이 있으면 그 값으로, 없으면 deprecated `MYSQL_PROFILE`로 판정합니다.
493
493
 
494
494
  - `ALLOW_INSERT_OPERATION`, `ALLOW_UPDATE_OPERATION`, `ALLOW_DELETE_OPERATION`,
495
495
  `ALLOW_DDL_OPERATION`을 `false`로 강제합니다.
@@ -506,10 +506,8 @@ prod profile이 쓰게 만들 수 없습니다. 시도하면 무시된 flag를 s
506
506
 
507
507
  - 정확히 `prod`일 때만이 아니라 `prod`로 시작하면 막는 이유: 인스턴스를 구분하려고
508
508
  `prod-ccn2` 같은 label을 붙이는 순간 금지가 빠지기 때문입니다.
509
- - `--profile`과 `MYSQL_PROFILE`이 다를 때 기동을 막지 않고 둘 중 하나라도 prod면 막는
510
- 이유: env에서 인자로 옮기는 도중에 둘 다 남은 설정에서 prod 쪽을 놓치지 않기
511
- 위해서입니다. 쓰기를 막는 것만으로 이미 안전하므로 서버를 죽이지 않고, 두 값이
512
- 다르면 stderr에 알립니다.
509
+ - `--profile`과 `MYSQL_PROFILE`이 다르면 표시·catalog·쓰기 판정 모두 `--profile`을
510
+ 따르고, stderr에 알립니다.
513
511
 
514
512
  다른 profile은 기본적으로 읽기 전용이지만 켤 수 있습니다. 그쪽의 `ALLOW_*`
515
513
  flag는 평범한 설정이기 때문입니다.
@@ -111,10 +111,9 @@ export const MYSQL_PROFILE = SERVER_ARGS.profile ? normalizeProfile(SERVER_ARGS.
111
111
  export function isWriteForbiddenProfile(profile) {
112
112
  return normalizeProfile(profile).startsWith('prod');
113
113
  }
114
- export const IS_WRITE_FORBIDDEN_PROFILE = isWriteForbiddenProfile(MYSQL_PROFILE) || isWriteForbiddenProfile(ENV_PROFILE);
114
+ export const IS_WRITE_FORBIDDEN_PROFILE = isWriteForbiddenProfile(MYSQL_PROFILE);
115
115
  if (SERVER_ARGS.profile && ENV_PROFILE && ENV_PROFILE !== MYSQL_PROFILE) {
116
- console.error(`[config] --profile "${MYSQL_PROFILE}" overrides MYSQL_PROFILE="${ENV_PROFILE}" for labels and the catalog` +
117
- (IS_WRITE_FORBIDDEN_PROFILE ? '; writes stay forbidden because one of them is a prod profile.' : '.'));
116
+ console.error(`[config] --profile "${MYSQL_PROFILE}" overrides MYSQL_PROFILE="${ENV_PROFILE}".`);
118
117
  }
119
118
  export const PROFILE_LABEL = MYSQL_PROFILE ? MYSQL_PROFILE.toUpperCase() : 'UNSPECIFIED';
120
119
  export const MYSQL_CATALOG_ENABLED = process.env.MYSQL_CATALOG_ENABLED !== 'false';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecubelabs/mysql-mcp",
3
- "version": "1.1.0-next.1",
3
+ "version": "1.1.0-next.2",
4
4
  "description": "Read-only MySQL MCP server that reaches its database through an SSH bastion, with per-environment profiles",
5
5
  "license": "MIT",
6
6
  "repository": {