diff --git a/README.md b/README.md index 945512a..f01b639 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,8 @@ "command": "uvx", "args": [ "ydb-mcp", - "--ydb-endpoint", "grpc://localhost:2136/local" + "--ydb-endpoint", "grpc://localhost:2136", + "--ydb-database", "/local" ] } } @@ -44,7 +45,8 @@ "command": "pipx", "args": [ "run", "ydb-mcp", - "--ydb-endpoint", "grpc://localhost:2136/local" + "--ydb-endpoint", "grpc://localhost:2136", + "--ydb-database", "/local" ] } } @@ -70,7 +72,8 @@ To get started with YDB MCP, you'll need to configure your MCP client to communi "command": "python3", "args": [ "-m", "ydb_mcp", - "--ydb-endpoint", "grpc://localhost:2136/local" + "--ydb-endpoint", "grpc://localhost:2136", + "--ydb-database", "/local" ] } } @@ -92,7 +95,8 @@ To use login/password authentication, specify the `--ydb-auth-mode`, `--ydb-logi "command": "uvx", "args": [ "ydb-mcp", - "--ydb-endpoint", "grpc://localhost:2136/local", + "--ydb-endpoint", "grpc://localhost:2136", + "--ydb-database", "/local", "--ydb-auth-mode", "login-password", "--ydb-login", "", "--ydb-password", "" @@ -113,7 +117,8 @@ To use access token authentication, specify the `--ydb-auth-mode` and `--ydb-acc "command": "uvx", "args": [ "ydb-mcp", - "--ydb-endpoint", "grpc://localhost:2136/local", + "--ydb-endpoint", "grpc://localhost:2136", + "--ydb-database", "/local", "--ydb-auth-mode", "access-token", "--ydb-access-token", "qwerty123" ] @@ -133,7 +138,8 @@ To use service account authentication, specify the `--ydb-auth-mode` and `--ydb- "command": "uvx", "args": [ "ydb-mcp", - "--ydb-endpoint", "grpc://localhost:2136/local", + "--ydb-endpoint", "grpc://localhost:2136", + "--ydb-database", "/local", "--ydb-auth-mode", "service-account", "--ydb-sa-key-file", "~/sa_key.json" ] diff --git a/ydb_mcp/server.py b/ydb_mcp/server.py index 81d6fcd..8426b1a 100644 --- a/ydb_mcp/server.py +++ b/ydb_mcp/server.py @@ -1003,7 +1003,12 @@ def get_credentials_factory(self) -> Optional[Callable[[], ydb.Credentials]]: # Clear any previous auth errors self.auth_error = None - supported_auth_modes = {AUTH_MODE_ANONYMOUS, AUTH_MODE_LOGIN_PASSWORD} + supported_auth_modes = { + AUTH_MODE_ANONYMOUS, + AUTH_MODE_LOGIN_PASSWORD, + AUTH_MODE_SERVICE_ACCOUNT, + AUTH_MODE_ACCESS_TOKEN, + } if self.auth_mode not in supported_auth_modes: self.auth_error = ( f"Unsupported auth mode: {self.auth_mode}. Supported modes: {', '.join(supported_auth_modes)}"