Skip to content

Commit 9322529

Browse files
docs: 增加零基础 OpenRouter 配置与启动详细步骤
1 parent 12c8a09 commit 9322529

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,42 @@ docs-cli remove react --version 18.2.0
447447
- **Searching/Finding:** Accepts specific versions, partials, or ranges (`X.Y.Z`, `X.Y`, `X`, `X.x`). Falls back to the latest older version if the target doesn't match. Omitting the version targets the latest available. Explicitly searching `--version ""` targets unversioned documents.
448448
- **Unversioned Docs:** Libraries can have documentation stored without a specific version (by omitting `--version` during scrape). These can be searched explicitly using `--version ""`. The `find-version` command will also report if unversioned docs exist alongside any semver matches.
449449

450+
## 本地配置 OpenRouter 详细步骤(零基础操作指引)
451+
452+
### 1. 打开 .env 文件
453+
- 路径:`~/MCP/MCP DOC Server/docs-mcp-server-main/.env`
454+
- 用文本编辑器(如 TextEdit、记事本、VSCode)打开。
455+
456+
### 2. 填写你的 OpenRouter 信息
457+
用下面内容替换(或补充)你的 `.env` 文件:
458+
459+
```
460+
OPENAI_API_KEY=你的OpenRouter Key
461+
OPENAI_API_BASE=https://openrouter.ai/api/v1
462+
MODEL_ID=qwen/qwen2.5-vl-3b-instruct:free
463+
```
464+
465+
> 说明:
466+
> - `OPENAI_API_KEY` 用你的 OpenRouter Key(如上示例)。
467+
> - `OPENAI_API_BASE` 固定为 `https://openrouter.ai/api/v1`
468+
> - `MODEL_ID``qwen/qwen2.5-vl-3b-instruct:free`
469+
470+
### 3. 保存 .env 文件
471+
472+
### 4. 重启 MCP Server
473+
- 关闭之前的 MCP Server 终端窗口(如有)。
474+
- 在 MCP 目录下重新运行:
475+
476+
```bash
477+
npm run dev:server
478+
```
479+
480+
- 等待出现 `Build success``Watching for changes` 字样。
481+
482+
---
483+
484+
如遇到任何问题,把报错内容发给开发者或技术支持即可。
485+
450486
## Development & Advanced Setup
451487

452488
This section covers running the server/CLI directly from the source code for development purposes. The primary usage method is now via the public Docker image as described in "Method 2".

0 commit comments

Comments
 (0)