Skip to main content
Glama

MCPet

MCPet

MCPet:人工智能时代的怀旧虚拟宠物体验!这款基于模型上下文协议 (MCP) 的服务器让您可以领养、饲养和玩耍您的专属数字伙伴,它会随着您的照料而不断进化。您可以喂养它、给它洗澡、一起玩游戏,看着它从幼崽长成成年宠物。即使您不在,您的宠物状态也会随着时间而变化——就像经典的电子宠物一样,但由现代人工智能通过模型上下文协议驱动。立即领养您的数字朋友吧!

这是一个基于 TypeScript 的 MCP 服务器,实现了一个虚拟宠物模拟系统。它通过提供宠物护理和互动工具来演示 MCP 的核心概念。

特征

虚拟宠物类型

  • 从四种宠物类型中选择:
    • 猫——有点喜怒无常,但很可爱
    • 狗——精力充沛,总是很高兴见到你
    • 龙——独特而火热的个性
    • 外星人——神秘而好奇

宠物的生命周期

  • 观察你的宠物经历四个阶段的进化:
    • 婴儿——体型娇小,脆弱不堪
    • 儿童——成长和嬉戏
    • 青少年——精力充沛、不断发展
    • 成年——完全成长并富有智慧

统计管理

  • 通过管理五个关键统计数据来照顾您的宠物:
    • 饥饿——让你的宠物吃饱
    • 快乐——和你的宠物一起玩耍,让它们开心
    • 健康——整体幸福感受其他统计数据的影响
    • 能量——活动时消耗,休息时补充
    • 清洁——定期洗澡让你的宠物保持清新

工具

  • create_pet - 领养具有自定义名称和类型的新宠物
  • check_pet - 查看宠物的当前状态和统计数据
  • feed_pet - 使用不同的食物选择喂养您的宠物:
    • 零食——少量补充饥饿感
    • 膳食——均衡营养
    • 盛宴——最大限度的进食(但可能不健康)
  • play_with_pet - 玩不同的游戏:
    • 球 - 轻度运动
    • 追逐 - 高能量乐趣
    • 益智游戏——智力刺激
  • clean_pet - 给你的宠物洗澡以恢复清洁
  • put_to_bed - 让你的宠物睡觉以恢复能量

动画

  • 针对每种宠物类型和活动的动态 ASCII 艺术动画
  • 随机的框架创造了生动有趣的体验
  • 特殊动画:
    • 吃不同的食物
    • 玩各种游戏
    • 沐浴
    • 睡眠
    • 生病
    • 还有更多!

发展

安装依赖项:

npm install

构建服务器:

npm run build

对于使用自动重建的开发:

npm run watch

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 MCPet:

npx -y @smithery/cli install @shreyaskarnik/mcpet --client claude

要与 Claude Desktop 一起使用,请添加服务器配置:

在 MacOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "mcpet": { "command": "node", "args": ["/path/to/mcpet/build/index.js"], "env": { "PET_DATA_DIR": "/path/to/writable/directory" } } } }

注意: PET_DATA_DIR环境变量指定了宠物数据的存储位置。请确保该目录具有写入权限。

调试

由于 MCP 服务器通过 stdio 进行通信,调试起来可能比较困难。我们建议使用MCP Inspector

npx @modelcontextprotocol/inspector node /path/to/mcpet/build/index.js

检查器将提供一个界面,用于直接测试您的宠物互动。

使用示例

向克劳德询问以下问题:

  • “你能创造一只名叫 Whiskers 的猫宠物吗?”
  • “我的宠物怎么样了?”
  • “你能给我的宠物喂一顿饭吗?”
  • “我想和我的宠物玩追逐游戏”
  • “我的宠物看起来很脏,你能给它洗澡吗?”
  • “我的宠物看起来很累,你能把它放到床上睡觉吗?”
-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

这是人工智能时代的怀旧虚拟宠物体验,您可以收养、养育并与自己的数字伙伴一起玩耍,它会根据您的照顾而不断进化。

  1. 特征
    1. 虚拟宠物类型
    2. 宠物的生命周期
    3. 统计管理
    4. 工具
    5. 动画
  2. 发展
    1. 安装
      1. 通过 Smithery 安装
      2. 调试
    2. 使用示例

      Related MCP Servers

      • -
        security
        A
        license
        -
        quality
        Serves as a guardian of development knowledge, providing AI assistants with curated access to latest documentation and best practices.
        Last updated -
        4
        87
        52
        TypeScript
        MIT License
      • A
        security
        A
        license
        A
        quality
        Enables AI assistants to check software end-of-life dates and support status using the endoflife.date API, providing accurate information on software lifecycle, security status, and upgrade recommendations in real-time.
        Last updated -
        5
        1
        JavaScript
        MIT License
        • Apple
      • A
        security
        A
        license
        A
        quality
        A Model Context Protocol server that enables AI clients to interact with virtual Ubuntu desktops, allowing them to browse the web, run code, and control instances through mouse/keyboard actions and bash commands.
        Last updated -
        5
        9
        JavaScript
        MIT License
      • -
        security
        A
        license
        -
        quality
        A server that enables AI assistants like Claude to interact with Roam Research graphs through a standardized interface, providing comprehensive tools for content creation, search, retrieval, and optional memory management.
        Last updated -
        1
        Python
        MIT License
        • Apple

      View all related MCP servers

      MCP directory API

      We provide all the information about MCP servers via our MCP API.

      curl -X GET 'https://glama.ai/api/mcp/v1/servers/shreyaskarnik/mcpet'

      If you have feedback or need assistance with the MCP directory API, please join our Discord server