Skip to content

Commit 478680e

Browse files
committed
updated user guide
1 parent e8670ab commit 478680e

File tree

2 files changed

+30
-41
lines changed

2 files changed

+30
-41
lines changed

README.md

Lines changed: 29 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ IP 定位根据用户输入的 IP 地址,定位 IP 的所在位置
147147

148148
### stdio 传输(默认)
149149

150+
直接在客户端配置如下MCP Server即可。
151+
150152
```json
151153
{
152154
"mcpServers": {
@@ -165,59 +167,48 @@ IP 定位根据用户输入的 IP 地址,定位 IP 的所在位置
165167

166168
### SSE 传输
167169

168-
```json
169-
{
170-
"mcpServers": {
171-
"amap-mcp-server": {
172-
"command": "uvx",
173-
"args": [
174-
"amap-mcp-server",
175-
"sse"
176-
],
177-
"env": {
178-
"AMAP_MAPS_API_KEY": "your valid amap maps api key"
179-
}
180-
}
181-
}
182-
}
170+
SSE传输支持实时数据推送,适合远程部署MCP Server。
171+
172+
本地以SSE运行 `amap-mcp-server`
173+
174+
```bash
175+
$ export AMAP_MAPS_API_KEY=你的有效API Key
176+
$ uvx amap-mcp-server sse
177+
178+
INFO: Started server process [50125]
179+
INFO: Waiting for application startup.
180+
INFO: Application startup complete.
181+
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
183182
```
184183

185-
### Streamable HTTP 传输
184+
MCP客户端配置:
186185

187186
```json
188187
{
189188
"mcpServers": {
190189
"amap-mcp-server": {
191-
"command": "uvx",
192-
"args": [
193-
"amap-mcp-server",
194-
"streamable-http"
195-
],
196-
"env": {
197-
"AMAP_MAPS_API_KEY": "your valid amap maps api key"
198-
}
190+
"url": "http://0.0.0.0:8000/sse"
199191
}
200192
}
201193
}
202194
```
203195

204-
### 使用已运行的 SSE MCP 服务器
196+
### Streamable HTTP 传输
205197

206-
如果您已经在本地启动了 SSE MCP 服务器(例如在端口 9999 上运行),可以使用以下配置直接连接
198+
本地以Streamable HTTP运行 `amap-mcp-server`
207199

208-
```json
209-
{
210-
"mcpServers": {
211-
"amap-mcp-server": {
212-
"url": "http://localhost:9999/sse"
213-
}
214-
}
215-
}
216-
```
200+
```bash
201+
$ export AMAP_MAPS_API_KEY=你的有效API Key
202+
$ uvx amap-mcp-server streamable-http
217203

218-
### 使用已运行的 Streamable HTTP MCP 服务器
204+
INFO: Started server process [50227]
205+
INFO: Waiting for application startup.
206+
StreamableHTTP session manager started
207+
INFO: Application startup complete.
208+
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
209+
```
219210

220-
如果您已经在本地启动了 Streamable HTTP MCP 服务器(例如在端口 8000 上运行),可以使用以下配置直接连接
211+
MCP客户端配置
221212

222213
```json
223214
{
@@ -229,6 +220,4 @@ IP 定位根据用户输入的 IP 地址,定位 IP 的所在位置
229220
}
230221
```
231222

232-
将上述配置添加到您的配置文件中,并确保将`"your valid amap maps api key"`替换为您的实际高德地图API密钥。您可以在[高德开放平台](https://lbs.amap.com/)注册并获取API密钥。
233-
234-
223+
您可以在[高德开放平台](https://lbs.amap.com/)注册并获取API密钥。

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "amap-mcp-server"
7-
version = "0.1.8"
7+
version = "0.1.9"
88
description = "Python版本高德地图MCP Server"
99
readme = "README.md"
1010
requires-python = ">=3.10"

0 commit comments

Comments
 (0)