RuneMate MCP服务器
一 主控程序 (模型上下文协议)服务器,允许AI编码代理访问老派RuneScape游戏缓存。直接从编辑器中查询项目统计信息、NPC定义、对象配置等。
先决条件
- Java 17+
- OSRS游戏缓存 磁盘上(通常由安装 RuneLite)
服务器在以下位置查找缓存 ~/.runelite/jagexcache/oldschool/LIVE 默认情况下。要使用其他位置,请设置 OSRS_CACHE_DIR 环境变量:
export OSRS_CACHE_DIR=/path/to/jagexcache/oldschool/LIVE设置
下载最新 runemate-mcp-*-all.jar 从 发布,然后将其添加到MCP客户端配置中。
克劳德代码
添加到您的Claude Code MCP设置中(~/.claude/claude_code_config.json):
{
"mcpServers": {
"runemate": {
"command": "java",
"args": ["-jar", "/path/to/runemate-mcp-1.0.0-all.jar"]
}
}
}克劳德桌面版
添加到您的Claude桌面配置(claude_desktop_config.json):
{
"mcpServers": {
"runemate": {
"command": "java",
"args": ["-jar", "/path/to/runemate-mcp-1.0.0-all.jar"]
}
}
}来源
如果您更喜欢从源代码运行而不是使用JAR:
{
"mcpServers": {
"runemate": {
"command": "./gradlew",
"args": ["-q", "--console=plain", "run"],
"cwd": "/path/to/runemate-mcp"
}
}
}工具
cache-lookup
通过ID或字段值过滤查找OSRS游戏缓存定义。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
type | string | Yes | 定义类型(请参阅下面支持的类型) |
id | integer | 否 | 要加载的特定定义ID |
filter | object | 否 | 要筛选的字段名/值对 |
limit | integer | 否 | 返回的最大结果数(默认值:25) |
提供其中之一 id 用于直接查找或 filter 搜索。
支持的类型: combatgauge, dbrow, dbtable, enum, inventory, item, npc, object, spotanim, struct, varbit, worldentity
示例:
// Load a specific NPC by ID
{ "type": "npc", "id": 239 }
// Search for NPCs by name (case-insensitive substring match)
{ "type": "npc", "filter": { "name": "Guard" }, "limit": 5 }
// Look up an item
{ "type": "item", "id": 4151 }
// Find objects by name
{ "type": "object", "filter": { "name": "Oak" }, "limit": 10 }
// Find NPCs with a specific action
{ "type": "npc", "filter": { "actions": "Pickpocket" }, "limit": 5 }筛选匹配规则:
- 字符串 --不区分大小写的子字符串匹配(例如。
"guard"火柴"Guard captain") - 数组 --如果任何元素等于该值,则匹配(不区分大小写)
- 数字/其他 --通过字符串比较进行精确匹配
cache-schema
列出缓存定义类型的可用字段名和类型,以便您知道哪些字段可以与 cache-lookup 过滤器。无参数调用以列出所有支持的类型。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
type | string | 否 | 要检查的定义类型。省略列出所有类型。 |
示例:
// List all supported cache types
{}
// Get fields for item definitions
{ "type": "item" }
// Get fields for NPC definitions
{ "type": "npc" }返回每个字段的名称和类型(例如。 String, int, int[], Map),使其易于构建准确 cache-lookup 过滤器。
api-lookup
在RuneMate游戏API中按关键字搜索类、方法和字段。返回匹配的类定义及其方法签名和Javadoc描述。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
query | string | 是 | 要搜索的类名、方法名或关键字 |
type | string | 否 | 筛选条件 class, interface,或 enum |
limit | integer | 否 | 返回的最大结果数(默认值:10) |
示例:
// Find the Npcs utility class
{ "query": "Npcs" }
// Search for query builder classes
{ "query": "newQuery", "limit": 5 }
// Find prayer-related enums
{ "query": "prayer", "type": "enum" }
// Look up coordinate/location classes
{ "query": "Coordinate" }结果包括类名、包、种类(类/接口/枚举)、Javadoc描述、超类、接口以及所有公共/受保护成员及其签名。ID常量类(例如。, ItemID, NpcID)包括类条目,但不包括单个常量--use cache-lookup 对于那些。
docs-search
按关键字搜索RuneMate开发人员文档。返回按词频排列的最相关文档部分。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
query | string | 是 | 要搜索的关键字 |
limit | integer | 否 | 返回的最大结果数(默认值:5) |
示例:
// Search for querying documentation
{ "query": "query builder" }
// Find pathfinding-related docs
{ "query": "pathfinding", "limit": 3 }
// Look up settings/configuration
{ "query": "settings gradle plugin" }结果包括 path, title, section,以及 content 每个匹配文档部分的字段。各部分按以下方式划分 ## 标题和按关键字出现次数评分(标题匹配比内容加权3倍)。
建筑
./gradlew assemble # Compile the project
./gradlew shadowJar # Build the fat JAR (build/libs/runemate-mcp-*-all.jar)
./gradlew test # Run tests (integration tests require an OSRS cache on disk)