Compare commits

..

6 Commits
0.1.0 ... main

Author SHA1 Message Date
杨翊 SionYang e3cba2ee00
Fix no found executor by stating with python -m (#2) 2025-06-10 19:21:31 +08:00
杨翊 SionYang 028ae6891c
Fix no found executor by stating with python -m (#1) 2025-06-10 14:45:50 +08:00
杨翊 SionYang 2f9de0f6fa
Update build.yml 2025-04-25 14:30:48 +08:00
杨翊 SionYang 6697f3734a
test 2025-04-25 14:28:42 +08:00
xiweng.yy 56d15517b2 Upgrade version to 0.1.1 2025-04-14 11:04:32 +08:00
xiweng.yy bf535ca38a Add install and configuration doc to README.md. 2025-04-14 11:01:06 +08:00
5 changed files with 79 additions and 7 deletions

View File

@ -8,8 +8,12 @@ This MCP(Model Context Protocol) Server is for Nacos interaction and automation.
Please note that `mcp-server-nacos` is currently in early development. The functionality and available tools are subject to change and expansion as we continue to develop and improve the server. And also note that `mcp-server-nacos` only provide read, search and list operation, not support any write operation for current version. Write operation is planning supported in future versions.
One more note that this `mcp-server-nacos` required Nacos version upper than `3.0.0`, because of depended on the [Nacos Admin API](https://nacos.io/en/swagger/admin/) in 3.x.
One more note that this `mcp-server-nacos` required version:
```markdown
1. Nacos version required upper `3.0.0`, because of depended on the [Nacos Admin API](https://nacos.io/en/swagger/admin/) in 3.x.
2. python version required 3.x, recommend upper `3.13`.
```
### Tools
1. `list_namespaces`
@ -108,11 +112,76 @@ One more note that this `mcp-server-nacos` required Nacos version upper than `3.
## Installation
TODO
### Using uv (recommended)
When using [`uv`](https://docs.astral.sh/uv/) no specific installation is needed. We will
use [`uvx`](https://docs.astral.sh/uv/guides/tools/) to directly run *mcp-server-nacos*.
### Using PIP
Alternatively you can install `mcp-server-nacos` via pip:
```
pip install mcp-server-nacos
```
After installation, you can run it as a script using:
```
python -m mcp_server_nacos
```
## Configuration
TODO
### Usage with Claude Desktop
Add this to your `claude_desktop_config.json`:
<details>
<summary>Using uvx</summary>
```json
"mcpServers": {
"git": {
"command": "uvx",
"args": [
"nacos-mcp-server",
"--host",
"your_nacos_host",
"--port",
"your_nacos_main_port, such as 8848",
"--access_token",
"your_nacos_access_token, get from `login` api: /nacos/v3/auth/user/login with `username` and `password`"
],
}
}
```
> You may need to put the full path to the `uvx` executable in the `command` field. You can get this by running `which uvx` on MacOS/Linux or `where uvx` on Windows.
</details>
<details>
<summary>Using pip installation</summary>
```json
"mcpServers": {
"git": {
"command": "python",
"args": [
"-m",
"nacos-mcp-server",
"--host",
"your_nacos_host",
"--port",
"your_nacos_main_port, such as 8848",
"--access_token",
"your_nacos_access_token, get from `login` api: /nacos/v3/auth/user/login with `username` and `password`"
],
}
}
```
</details>
## Development

View File

@ -1,6 +1,6 @@
[project]
name = "nacos-mcp-server"
version = "0.1.0"
version = "0.1.2"
description = "A simple Nacos MCP Server"
readme = "README.md"
requires-python = ">=3.13"

View File

@ -0,0 +1,3 @@
from mcp_server_nacos import main
main()

View File

@ -17,7 +17,7 @@ import mcp.server.stdio
logger = logging.getLogger('mcp_server_nacos')
logger.info("Starting Nacos MCP Server")
USER_AGENT = 'Nacos-MCP-Server:v0.1.0'
USER_AGENT = 'Nacos-MCP-Server:v0.1.2'
class Result:
def __init__(self, code: int, message: str, data: Any):
@ -146,7 +146,7 @@ async def main(host: str, port: int, access_token:str):
write_stream,
InitializationOptions(
server_name="nacos",
server_version="0.1.0",
server_version="0.1.2",
capabilities=server.get_capabilities(
notification_options=NotificationOptions(),
experimental_capabilities={},

View File

@ -157,7 +157,7 @@ wheels = [
[[package]]
name = "nacos-mcp-server"
version = "0.1.0"
version = "0.1.2"
source = { editable = "." }
dependencies = [
{ name = "httpx" },