OSRS MCP服务器

用于与Old School RuneScape(OSRS)Wiki API和数据文件交互的服务器,提供搜索Wiki和访问游戏数据定义的工具。

  • by JayArrowz
  • JavaScript
  • 本地部署
  • 38 星标
  • 更新于
在 GitHub 查看 JayArrowz/mcp-osrs

使用说明

OSRS MCP服务器

MCP服务器,用于与Old School RuneScape(OSRS)Wiki API和数据文件交互。该服务器提供搜索OSRS Wiki和通过模型上下文协议访问游戏数据定义的工具。

工具

此服务器实现了以下工具:

OSRS Wiki方法

  1. osrs_wiki_search -在OSRS Wiki中搜索与搜索词匹配的页面
  2. osrs_wiki_get_page_info -获取OSRS Wiki上特定页面的信息
  3. osrs_wiki_parse_page -获取特定OSRS Wiki页面的解析HTML内容

游戏数据搜索方法

  1. search_varptypes -在varptypes.txt文件中搜索存储玩家状态和进度的玩家变量(varps)
  2. search_varbittypes -在varbittypes.txt文件中搜索存储varps中单个位的可变位(varbits)
  3. search_iftypes -在iftypes.txt文件中搜索游戏UI中使用的接口定义
  4. search_invtypes -在invtypes.txt文件中搜索游戏中的库存类型定义
  5. search_loctypes -在loctypes.txt文件中搜索游戏世界中的位置/对象类型定义
  6. search_npctypes -在npctypes.txt文件中搜索NPC(非玩家角色)定义
  7. search_objtypes -在objtypes.txt文件中搜索游戏中的对象/项目定义
  8. search_rowtypes -在rowtypes.txt文件中搜索各种接口中使用的行定义
  9. search_seqtypes -在seqtypes.txt文件中搜索动画序列定义
  10. search_soundtypes -在soundtypes.txt文件中搜索游戏中的音效定义
  11. search_spottypes -在spottypes.txt文件中搜索点动画(图形效果)定义
  12. search_spritetypes -在spritetypes.txt文件中搜索界面中使用的sprite图像定义
  13. search_tabletypes -在tabletypes.txt文件中搜索接口选项卡定义

通用数据文件方法

  1. search_data_file -在数据目录中搜索任何文件以查找匹配的条目
  2. get_file_details -获取数据目录中文件的详细信息
  3. list_data_files -列出数据目录中的可用数据文件

大交易所价格

  1. search_ge_items -按名称搜索Grand Exchange可交易项目。返回商品ID、名称、购买限额和酒精值
  2. get_ge_latest -通过ID获取特定商品的最新Grand Exchange最高价和最低价
  3. get_ge_timeseries -以给定的时间间隔(5m、1h、6h、24h)获取项目的历史时间序列价格数据。最多返回365个数据点

玩家查询

  1. lookup_player -从官方核心中查找OSRS玩家的统计数据(技能、老板、线索卷轴和活动)

安装

通过Smithery安装

通过以下方式自动安装Claude Desktop的mcp-osrs 铁匠铺:

npx @smithery/cli@latest install @jayarrowz/mcp-osrs --client claude

先决条件

  • Node.js(v16或更高版本)
  • npm或纱线

安装软件包

# Clone the repository
git clone https://github.com/jayarrowz/mcp-osrs.git
cd mcp-osrs

# Install dependencies
npm install

# Build the package
npm run build

使用Claude Desktop

将以下内容添加到您的 claude_desktop_config.json:

使用npx

{
  "mcpServers": {
    "osrs": {
      "command": "npx",
      "args": ["-y", "@jayarrowz/mcp-osrs"]
    }
  }
}

直接Node.js

{
  "mcpServers": {
    "osrs": {
      "command": "node",
      "args": ["/path/to/mcp-osrs/dist/index.js"]
    }
  }
}

替换 /path/to/mcp-osrs 使用存储库的实际路径。

例子

搜索OSRS Wiki

// Search for information about the Abyssal whip
const result = await callTool("osrs_wiki_search", { 
  search: "Abyssal whip" 
});

获取页面信息

// Get information about a specific wiki page
const pageInfo = await callTool("osrs_wiki_get_page_info", { 
  titles: "Abyssal_whip" 
});

搜索游戏数据

// Search for items in the object definitions
const items = await callTool("search_objtypes", { 
  query: "dragon",
  page: 1,
  pageSize: 10
});

列出可用数据文件

// Get a list of all data files
const files = await callTool("list_data_files", {});

搜索大交换项目

// Search for tradeable items by name
const items = await callTool("search_ge_items", { 
  query: "dragon scimitar",
  page: 1,
  pageSize: 10
});

获取GE最新价格

// Get the latest high/low prices for an item
const prices = await callTool("get_ge_latest", { 
  itemId: 2 // Cannonball
});

获取GE价格历史记录

// Get time-series price data for an item
const history = await callTool("get_ge_timeseries", { 
  itemId: 2,
  timestep: "1h"
});

查找玩家

// Look up an OSRS player's stats
const stats = await callTool("lookup_player", { 
  playerName: "Zezima"
});

发展

# Install dependencies
npm install

# Start the server in development mode
npm start

# Build the server
npm run build

许可证

此MCP服务器根据MIT许可证获得许可。这意味着您可以根据MIT许可证的条款和条件自由使用、修改和分发软件。有关更多详细信息,请参阅项目存储库中的LICENSE文件。