|
27 | 27 | from documentdb_mcp.utils import to_boolean, to_integer |
28 | 28 | from documentdb_mcp.middlewares import UserTokenMiddleware, JWTClaimsLoggingMiddleware |
29 | 29 |
|
30 | | -__version__ = "0.1.11" |
| 30 | +__version__ = "0.1.12" |
31 | 31 |
|
32 | 32 | logger = get_logger(name="TokenMiddleware") |
33 | 33 | logger.setLevel(logging.DEBUG) |
@@ -742,7 +742,7 @@ def documentdb_mcp(): |
742 | 742 |
|
743 | 743 | if hasattr(args, "help") and args.help: |
744 | 744 |
|
745 | | - usage() |
| 745 | + parser.print_help() |
746 | 746 |
|
747 | 747 | sys.exit(0) |
748 | 748 |
|
@@ -1062,52 +1062,5 @@ def documentdb_mcp(): |
1062 | 1062 | sys.exit(1) |
1063 | 1063 |
|
1064 | 1064 |
|
1065 | | -def usage(): |
1066 | | - print( |
1067 | | - f"Documentdb Mcp ({__version__}): DocumentDB MCP Server\n\n" |
1068 | | - "Usage:\n" |
1069 | | - "-t | --transport [ Transport method: 'stdio', 'streamable-http', or 'sse' [legacy] (default: stdio) ]\n" |
1070 | | - "-s | --host [ Host address for HTTP transport (default: 0.0.0.0) ]\n" |
1071 | | - "-p | --port [ Port number for HTTP transport (default: 8000) ]\n" |
1072 | | - "--auth-type [ Authentication type for MCP server: 'none' (disabled), 'static' (internal), 'jwt' (external token verification), 'oauth-proxy', 'oidc-proxy', 'remote-oauth' (external) (default: none) ]\n" |
1073 | | - "--token-jwks-uri [ JWKS URI for JWT verification ]\n" |
1074 | | - "--token-issuer [ Issuer for JWT verification ]\n" |
1075 | | - "--token-audience [ Audience for JWT verification ]\n" |
1076 | | - "--token-algorithm [ JWT signing algorithm (required for HMAC or static key). Auto-detected for JWKS. ]\n" |
1077 | | - "--token-secret [ Shared secret for HMAC (HS*) or PEM public key for static asymmetric verification. ]\n" |
1078 | | - "--token-public-key [ Path to PEM public key file or inline PEM string (for static asymmetric keys). ]\n" |
1079 | | - "--required-scopes [ Comma-separated list of required scopes (e.g., documentdb.read,documentdb.write). ]\n" |
1080 | | - "--oauth-upstream-auth-endpoint [ Upstream authorization endpoint for OAuth Proxy ]\n" |
1081 | | - "--oauth-upstream-token-endpoint [ Upstream token endpoint for OAuth Proxy ]\n" |
1082 | | - "--oauth-upstream-client-id [ Upstream client ID for OAuth Proxy ]\n" |
1083 | | - "--oauth-upstream-client-secret [ Upstream client secret for OAuth Proxy ]\n" |
1084 | | - "--oauth-base-url [ Base URL for OAuth Proxy ]\n" |
1085 | | - "--oidc-config-url [ OIDC configuration URL ]\n" |
1086 | | - "--oidc-client-id [ OIDC client ID ]\n" |
1087 | | - "--oidc-client-secret [ OIDC client secret ]\n" |
1088 | | - "--oidc-base-url [ Base URL for OIDC Proxy ]\n" |
1089 | | - "--remote-auth-servers [ Comma-separated list of authorization servers for Remote OAuth ]\n" |
1090 | | - "--remote-base-url [ Base URL for Remote OAuth ]\n" |
1091 | | - "--allowed-client-redirect-uris [ Comma-separated list of allowed client redirect URIs ]\n" |
1092 | | - "--eunomia-type [ Eunomia authorization type: 'none' (disabled), 'embedded' (built-in), 'remote' (external) (default: none) ]\n" |
1093 | | - "--eunomia-policy-file [ Policy file for embedded Eunomia (default: mcp_policies.json) ]\n" |
1094 | | - "--eunomia-remote-url [ URL for remote Eunomia server ]\n" |
1095 | | - "--enable-delegation [ Enable OIDC token delegation ]\n" |
1096 | | - "--audience [ Audience for the delegated token ]\n" |
1097 | | - "--delegated-scopes [ Scopes for the delegated token (space-separated) ]\n" |
1098 | | - "--openapi-file [ Path to the OpenAPI JSON file to import additional tools from ]\n" |
1099 | | - "--openapi-base-url [ Base URL for the OpenAPI client (overrides instance URL) ]\n" |
1100 | | - "--openapi-use-token [ Use the incoming Bearer token (from MCP request) to authenticate OpenAPI import ]\n" |
1101 | | - "--openapi-username [ Username for basic auth during OpenAPI import ]\n" |
1102 | | - "--openapi-password [ Password for basic auth during OpenAPI import ]\n" |
1103 | | - "--openapi-client-id [ OAuth client ID for OpenAPI import ]\n" |
1104 | | - "--openapi-client-secret [ OAuth client secret for OpenAPI import ]\n" |
1105 | | - "\n" |
1106 | | - "Examples:\n" |
1107 | | - " [Simple] documentdb-mcp \n" |
1108 | | - ' [Complex] documentdb-mcp --transport "value" --host "value" --port "value" --auth-type "value" --token-jwks-uri "value" --token-issuer "value" --token-audience "value" --token-algorithm "value" --token-secret "value" --token-public-key "value" --required-scopes "value" --oauth-upstream-auth-endpoint "value" --oauth-upstream-token-endpoint "value" --oauth-upstream-client-id "value" --oauth-upstream-client-secret "value" --oauth-base-url "value" --oidc-config-url "value" --oidc-client-id "value" --oidc-client-secret "value" --oidc-base-url "value" --remote-auth-servers "value" --remote-base-url "value" --allowed-client-redirect-uris "value" --eunomia-type "value" --eunomia-policy-file "value" --eunomia-remote-url "value" --enable-delegation --audience "value" --delegated-scopes "value" --openapi-file "value" --openapi-base-url "value" --openapi-use-token --openapi-username "value" --openapi-password "value" --openapi-client-id "value" --openapi-client-secret "value"\n' |
1109 | | - ) |
1110 | | - |
1111 | | - |
1112 | 1065 | if __name__ == "__main__": |
1113 | 1066 | documentdb_mcp() |
0 commit comments