ncloud-mcp-server 0.7.0__py3-none-any.whl

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.
@@ -0,0 +1,167 @@
1
+ Metadata-Version: 2.5
2
+ Name: ncloud-mcp-server
3
+ Version: 0.7.0
4
+ Summary: Lightweight MCP server for NAVER Cloud Platform (Ncloud): a few signed generic tools instead of one tool per API.
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Requires-Python: >=3.10
8
+ Requires-Dist: httpx>=0.27
9
+ Requires-Dist: mcp<3,>=2.0
10
+ Description-Content-Type: text/markdown
11
+
12
+ # ncloud-mcp-server
13
+
14
+ [한국어](https://github.com/revert12/ncloud-mcp-server/blob/main/README.ko.md) | **English**
15
+
16
+ A lightweight MCP server for NAVER Cloud Platform (Ncloud).
17
+
18
+ Instead of one tool per API, a **few signed, generic call tools** reach every Ncloud API.
19
+ The tool definitions are small, so connecting the server costs almost no conversation context.
20
+
21
+ > This is not an official NAVER Cloud project.
22
+
23
+ ## Tools
24
+
25
+ | Tool | Description |
26
+ |---|---|
27
+ | `ncp_profiles` | Usable profiles and zones, profiles disabled by the rules (with the reason), and whether writes are enabled. With `verify=true`, shows who owns each key (account ID, login alias, main/sub account). Secrets are never returned |
28
+ | `ncp_read` | 1 to 50 **read-only** API calls, run 5 at a time. Handles signing, `responseFormatType=json`, list parameter expansion, automatic paging, and `fields` to return only the fields you need. A failed item does not affect the others |
29
+ | `ncp_write` | Calls APIs that create, change or delete resources. **Registered only when the server runs with `NCP_ALLOW_WRITE=true`** |
30
+
31
+ ```jsonc
32
+ // Server list (only the fields you need)
33
+ ncp_read(calls=[{"service": "vserver", "action": "getServerInstanceList", "params": {"regionCode": "KR"},
34
+ "fields": ["serverName", "serverInstanceStatus.code", "privateIp"]}])
35
+
36
+ // Sub accounts (REST-style service)
37
+ ncp_read(calls=[{"service": "subaccount", "action": "/sub-accounts"}])
38
+
39
+ // Several regions at once
40
+ ncp_read(calls=[
41
+ {"service": "vserver", "action": "getServerInstanceList", "params": {"regionCode": "KR"}},
42
+ {"service": "vserver", "action": "getServerInstanceList", "params": {"regionCode": "JPN"}}
43
+ ])
44
+ ```
45
+
46
+ ## Safety
47
+
48
+ - **Reads and writes are separate tools.** `ncp_read` accepts only read actions such as
49
+ `get*`, `list*` and `describe*`, plus REST-style GETs. Ncloud's shared API gateway accepts even
50
+ delete actions over GET, so operations are classified by **action name**, not by HTTP method.
51
+ - Only actions **proven read-only** are allowed. On shared-gateway services an action counts as a read
52
+ only if it is a single path segment in camelCase starting with a read verb (`getServerInstanceList`).
53
+ Anything else, such as `terminateserverinstances`, `TerminateServerInstances` or
54
+ `terminateServerInstances/x`, is treated as a write and blocked.
55
+ - **Read actions that return secrets** (`getRootPassword`, `getRootPasswordServerInstanceList`, the NKS
56
+ `kubeconfig`) are blocked in `ncp_read`. If you really need one, add it to
57
+ `NCP_WRITE_ALLOWLIST` and call it with `ncp_write`.
58
+ - Writes are possible only through `ncp_write`, which appears only when the server runs with
59
+ `NCP_ALLOW_WRITE=true`. Each action must also be listed in `NCP_WRITE_ALLOWLIST` (comma separated).
60
+ Write requests are never retried.
61
+ - For shared-gateway services, write `vserver:stopServerInstances`. The shared gateway takes
62
+ GET and POST as the same call, so both are allowed.
63
+ - For REST-style services, put the method first: `POST subaccount:/sub-accounts`,
64
+ `DELETE subaccount:/sub-accounts/123`. An entry without a method allows GET only,
65
+ and allowing POST on a path does not allow DELETE on it.
66
+ - If you used an entry like `subaccount:/sub-accounts` for POST with 0.5.x or earlier, add the method.
67
+ - Callable services are limited to a per-zone allowlist (`src/ncp_mcp/endpoints.py`, based on the official
68
+ NCP API docs). To use a service that is not listed, add it explicitly, e.g. `NCP_MCP_EXTRA_SERVICES="gov:cdn"`.
69
+ - Read requests are retried up to 2 times on 429, 5xx and timeouts (`NCP_MCP_RETRIES`), and concurrent
70
+ requests are limited to 5 (`NCP_MCP_CONCURRENCY`).
71
+ - A single result is capped at 100,000 characters of JSON, about 25,000 tokens (`NCP_MCP_MAX_RESULT_CHARS`).
72
+ Beyond that, only the first list items are kept and `truncated` explains why. With several calls, `ncp_read` splits this
73
+ budget across them. If a result was cut, use `fields` to keep only the columns you need, or narrow the query.
74
+ - Every tool carries the standard MCP hints (`readOnlyHint` / `destructiveHint`). In your client's
75
+ permission settings we recommend **allowing `ncp_read`, and asking every time for `ncp_write`**.
76
+ (Claude Code example: `mcp__ncloud__ncp_read` in `permissions.allow`, `mcp__ncloud__ncp_write` in `permissions.ask`)
77
+ - Signed requests are sent only to the selected zone's API gateway domains (`*.apigw.ntruss.com` etc.).
78
+ - Keys never appear in error messages or results. The final permission boundary is the sub-account
79
+ permissions of the access key, so we recommend **a sub-account key with read-only permissions**.
80
+
81
+ ## Installation
82
+
83
+ Requires Python 3.10+ and [uv](https://docs.astral.sh/uv/).
84
+
85
+ **Claude Code**: register it with one command.
86
+
87
+ ```sh
88
+ claude mcp add ncloud --scope user -- uvx --from git+https://github.com/revert12/ncloud-mcp-server@v0.7.0 ncloud-mcp-server
89
+ ```
90
+
91
+ `--scope` picks where it is registered.
92
+ - `local` (default): only you, only in the current project (stored in `~/.claude.json`)
93
+ - `user`: only you, in every project
94
+ - `project`: stored in `.mcp.json` at the project root and shared with your team
95
+
96
+ Check with `claude mcp list`; remove with `claude mcp remove ncloud`.
97
+
98
+ **Other MCP clients**: add it to the config file directly.
99
+
100
+ ```jsonc
101
+ // .mcp.json
102
+ {
103
+ "mcpServers": {
104
+ "ncloud": {
105
+ "command": "uvx",
106
+ "args": ["--from", "git+https://github.com/revert12/ncloud-mcp-server@v0.7.0", "ncloud-mcp-server"]
107
+ }
108
+ }
109
+ }
110
+ ```
111
+
112
+ Pinning a version with a tag is recommended.
113
+
114
+ ## Credentials
115
+
116
+ The server reads `~/.ncloud/configure` (INI), the same file the Ncloud CLI uses. Each section is one profile.
117
+
118
+ ```ini
119
+ [mycompany-pub]
120
+ ncloud_access_key_id = <access key>
121
+ ncloud_secret_access_key = <secret key>
122
+ ncloud_zone = pub
123
+
124
+ [customer-a-gov]
125
+ ncloud_access_key_id = <gov access key>
126
+ ncloud_secret_access_key = <gov secret key>
127
+ ncloud_zone = gov
128
+ ```
129
+
130
+ **Profile rules** (a profile that breaks one is not used; `ncp_profiles` lists it under `disabled` with the reason)
131
+ - `ncloud_zone` (`pub`, `gov` or `fin`) is required.
132
+ - Profile names use lowercase letters, digits and hyphens, and **must end with the zone** (`-pub`, `-gov`, `-fin`),
133
+ so the zone is visible from the name alone. For the same reason `[DEFAULT]` cannot be used.
134
+ - With two or more profiles, every call must name its `profile`. There is no default profile.
135
+ - Usable profile names are written into the tool definitions as choices when the server starts.
136
+ Restart the MCP server after changing profiles.
137
+ - `ncp_profiles(verify=true)` asks STS (`caller-identity`) which NCP account and user each key really belongs to.
138
+
139
+ The Ncloud CLI can use the same profiles with `--profile <name>`.
140
+
141
+ - Setting the environment variables `NCLOUD_ACCESS_KEY`, `NCLOUD_SECRET_KEY` and `NCLOUD_ZONE` adds an `env-<zone>` profile.
142
+ - `NCP_MCP_CONFIG` changes the location of the config file.
143
+
144
+ ## Service endpoints
145
+
146
+ | Service | Endpoint |
147
+ |---|---|
148
+ | Default (shared gateway) | `https://ncloud.apigw.<zone>/<service>/v2/<action>` |
149
+ | `billing` | `https://billingapi.apigw.<zone>/billing/v1` |
150
+ | `subaccount` | `https://subaccount.apigw.<zone>/api/v1` |
151
+ | `sts` | `https://sts.apigw.<zone>/api/v1` |
152
+ | `vnks`, `vses`, `vcdss`, `source*`, etc. | See `SPECIAL` in `src/ncp_mcp/endpoints.py` |
153
+
154
+ `<zone>` is `ntruss.com` (public), `gov-ntruss.com` (government) or `fin-ntruss.com` (financial).
155
+
156
+ ## Development
157
+
158
+ ```sh
159
+ uv sync
160
+ uv run pytest
161
+ ```
162
+
163
+ See [CONTRIBUTING.md](https://github.com/revert12/ncloud-mcp-server/blob/main/CONTRIBUTING.md) for setup, the pre-commit secret scan, and how the read-only guard is verified.
164
+
165
+ ## License
166
+
167
+ MIT
@@ -0,0 +1,12 @@
1
+ ncp_mcp/__init__.py,sha256=r_R8Kh3cHUu7eX1_KtcbCVyIkL1hz91clhkr-C9b1aI,78
2
+ ncp_mcp/client.py,sha256=KsoZU3c01RkQyDeCgiXojQsIQM0CL1F07ZxbDlzTYEk,20907
3
+ ncp_mcp/config.py,sha256=GH1ndvr0eTt5n5QnxiFqva33q7n37RWSRBYuwYjN_zE,4158
4
+ ncp_mcp/endpoints.py,sha256=SFSJui2ROgWeNEMPSRdPKtQUi8MMtlehvUrBnSLgpXY,4297
5
+ ncp_mcp/guard.py,sha256=wmqK6PHcdYfrolpd9yOVP5tWRdyT6IoJPSMgPa8eY3k,5865
6
+ ncp_mcp/server.py,sha256=Y-LqzvMQjwZ69wwVeCq6x4TdnT4wITT-GL6-XYjxKkQ,11273
7
+ ncp_mcp/signer.py,sha256=PA6FOzj3IQittAosvbxKeONRbv058YfEnss8HrRtg1g,1132
8
+ ncloud_mcp_server-0.7.0.dist-info/METADATA,sha256=Q-VeZ7YVdaPBFZO99tsB6NiglkpqPEh508yop2s2kpQ,7955
9
+ ncloud_mcp_server-0.7.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
10
+ ncloud_mcp_server-0.7.0.dist-info/entry_points.txt,sha256=Ab5q9ypdaR0dOUpIN_ZHQ1l0iMh1KpdmXIEJ1EbQnjU,58
11
+ ncloud_mcp_server-0.7.0.dist-info/licenses/LICENSE,sha256=YXfu42trBM2md-tc7lDjo2M6yy0jn0NUNJtmb8ON2Mc,1087
12
+ ncloud_mcp_server-0.7.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.33.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ ncloud-mcp-server = ncp_mcp.server:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ncloud-mcp-server contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
ncp_mcp/__init__.py ADDED
@@ -0,0 +1,3 @@
1
+ """Lightweight MCP server for NAVER Cloud Platform."""
2
+
3
+ __version__ = "0.7.0"