Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
|
e3cba2ee00 | |
|
028ae6891c | |
|
2f9de0f6fa | |
|
6697f3734a | |
|
56d15517b2 | |
|
bf535ca38a |
75
README.md
75
README.md
|
@ -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.
|
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
|
### Tools
|
||||||
|
|
||||||
1. `list_namespaces`
|
1. `list_namespaces`
|
||||||
|
@ -108,11 +112,76 @@ One more note that this `mcp-server-nacos` required Nacos version upper than `3.
|
||||||
|
|
||||||
## Installation
|
## 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
|
## 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
|
## Development
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[project]
|
[project]
|
||||||
name = "nacos-mcp-server"
|
name = "nacos-mcp-server"
|
||||||
version = "0.1.0"
|
version = "0.1.2"
|
||||||
description = "A simple Nacos MCP Server"
|
description = "A simple Nacos MCP Server"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.13"
|
requires-python = ">=3.13"
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
from mcp_server_nacos import main
|
||||||
|
|
||||||
|
main()
|
|
@ -17,7 +17,7 @@ import mcp.server.stdio
|
||||||
logger = logging.getLogger('mcp_server_nacos')
|
logger = logging.getLogger('mcp_server_nacos')
|
||||||
logger.info("Starting Nacos MCP Server")
|
logger.info("Starting Nacos MCP Server")
|
||||||
|
|
||||||
USER_AGENT = 'Nacos-MCP-Server:v0.1.0'
|
USER_AGENT = 'Nacos-MCP-Server:v0.1.2'
|
||||||
|
|
||||||
class Result:
|
class Result:
|
||||||
def __init__(self, code: int, message: str, data: Any):
|
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,
|
write_stream,
|
||||||
InitializationOptions(
|
InitializationOptions(
|
||||||
server_name="nacos",
|
server_name="nacos",
|
||||||
server_version="0.1.0",
|
server_version="0.1.2",
|
||||||
capabilities=server.get_capabilities(
|
capabilities=server.get_capabilities(
|
||||||
notification_options=NotificationOptions(),
|
notification_options=NotificationOptions(),
|
||||||
experimental_capabilities={},
|
experimental_capabilities={},
|
||||||
|
|
Loading…
Reference in New Issue