内容
# 耶路撒冷城市MCP

通过与AI助手对话,直接从 [yerevan-city.am](https://yerevan-city.am) 订购杂货。只需说出您需要什么,代理就会为您找到产品并建立购物车。
设置一次(您只需要通过短信确认您的手机号码),之后它就可以持续工作 - 无需手动打开网站并搜索产品。
**设计安全**:代理永远不会支付或下订单 - 它只会建立购物车。结账和付款始终由您在自己的浏览器或应用程序中完成。
## 代理可以执行的操作
- 按名称搜索产品
- 显示您保存的配送地址
- 从购物车中添加或删除产品
- 显示购物车内容和总价格
## 安装
1. 下载此文件夹并构建项目:
```bash
npm install
npm run build
```
2. 在AI助手的设置中连接服务器。
**Claude 代码** - 在终端中运行:
```bash
claude mcp add yerevan-city -- node /full/path/to/dist/index.js
```
**Claude 桌面版** - 打开MCP服务器配置文件(设置 → 开发者 → 编辑配置)并添加:
```json
{
"mcpServers": {
"yerevan-city": {
"command": "node",
"args": ["/full/path/to/dist/index.js"]
}
}
}
```
保存后重启应用程序。
**Codex CLI** - 在终端中运行:
```bash
codex mcp add yerevan-city -- node /full/path/to/dist/index.js
```
或直接添加到 `~/.codex/config.toml`:
```toml
[mcp_servers.yerevan-city]
command = "node"
args = ["/full/path/to/dist/index.js"]
```
**opencode** - 添加到 `opencode.json`:
```json
{
"mcp": {
"yerevan-city": {
"type": "local",
"command": ["node", "/full/path/to/dist/index.js"],
"enabled": true
}
}
}
```
**Antigravity** - 从编辑器的代理面板打开MCP商店,选择“管理MCP服务器”→“查看原始配置”,并添加到 `~/.gemini/config/mcp_config.json`:
```json
{
"mcpServers": {
"yerevan-city": {
"command": "node",
"args": ["/full/path/to/dist/index.js"]
}
}
}
```
3. 完成。告诉助手类似“订购牛奶和面包” - 首次触摸购物车时,它将要求您通过短信确认手机号码,之后它将保持登录状态。
## 技术细节
登录是一次性的手机 + 短信步骤;然后会话缓存在本地,因此它可以在重启后继续工作。
### 工具
- `request_login_code` / `confirm_login_code` - 一次性手机 + 短信登录
- `search_products` - 自由文本产品搜索
- `list_addresses` - 帐户的保存的配送地址
- `add_to_cart` / `remove_from_cart` - 构建购物车,按件数或按重量
- `get_cart` - 当前购物车内容和总价格
### 开发
```bash
npm install
npm run typecheck
npm test
npm run build
npm start
```
## 许可证
免费用于个人和其他非商业用途。商业用途需要单独的付费许可证 - 有关详细信息,请参见 [LICENSE](LICENSE),并通过 [GitHub](https://github.com/tjvjk/) 联系我们安排。
## 免责声明
这是一个教育性、非官方项目 - 连接AI代理到第三方Web API的示例。它按原样提供,不提供任何形式的保证。它与Yerevan City / City Supermarket没有任何关联、认可或赞助。
## 待办事项
- 没有现有yerevan-city.am帐户的电话号码,流程如何表现?
- 这在Windows上如何工作?在Linux上呢?
- 发布npm包并通过npx安装
- 添加格式化程序和lint器
- 如果帐户没有保存的地址(不仅是显式给出的地址)怎么办?
- 添加Carrefour,Zovk,Sas,88,Tsiran以找到更好的价格