Skip to main content
Glama
@mistereman22/osrs-wiki-mcp-server

@mistereman22/osrs-wiki-mcp-server

by mistereman22
README.md
# @mistereman22/osrs-wiki-mcp-server

MCP server for the Old School RuneScape Wiki (`https://oldschool.runescape.wiki`). Serves the full tool surface of [`@professional-wiki/mediawiki-mcp-server`](https://github.com/ProfessionalWiki/MediaWiki-MCP-Server) against a pinned, read-only wiki definition.

| Capability | Details |
| --- | --- |
| MediaWiki tools | Full upstream tool surface (page reads, search, bucket queries, wikitext parsing, categories, siteinfo, ...) with wiki fixed to `oldschool.runescape.wiki`. **Read-only** — write and wiki-management tools are gated off. |
| MCP resources | Guidance resources (`context://...`) covering tool selection, bucket schemas, query patterns, search strategy, namespace/category workflows, and verified data-retrieval templates. |

## Quick start (users)

**Requirement:** Node.js >= 22.19.0

**Before you start:** Replace the empty `MCP_CONTACT` values below with your own email or name + URL. The server requires this and will exit if not set.

### OpenCode
```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "servers": {
      "osrs-wiki": {
        "type": "local",
        "command": ["npx", "@mistereman22/osrs-wiki-mcp-server"],
        "environment": { "MCP_CONTACT": "" }
      }
    }
  }
}
```

### Cursor
```json
{
  "mcpServers": {
    "osrs-wiki": {
      "command": "npx",
      "args": ["@mistereman22/osrs-wiki-mcp-server"],
      "env": { "MCP_CONTACT": "" }
    }
  }
}
```

### Claude Code
```sh
/plugin marketplace add mistereman22/osrs-wiki-mcp-server
/plugin install osrs-wiki-mcp-server@osrs-wiki-mcp-server
```

Then set your contact:
```sh
# Add to your shell profile (e.g., ~/.bashrc, ~/.zshrc)
export MCP_CONTACT="your-contact@example.com"
```

### Run directly
```sh
MCP_CONTACT="" npx @mistereman22/osrs-wiki-mcp-server
```

## Configuration

| Variable | Required | Meaning |
| --- | --- | --- |
| `MCP_CONTACT` | **Yes** | Your contact (email or name + URL), appended to the server's base User-Agent on every OSRS wiki request. Example: `you@example.com`. Server fails fast at startup if missing. |

## Composed User-Agent
```
osrs-wiki-mcp-server/<version> (https://github.com/mistereman22/osrs-wiki-mcp-server) you@example.com
```

## MCP Resources

The server exposes guidance resources via `context://` URIs. Read these before using the corresponding tools:

| Resource | Purpose |
| --- | --- |
| `context://tool-selection` | Decision tree mapping query types to tools. Read first. |
| `context://bucket-catalog` | All known buckets with their fields. |
| `context://bucket-query-guide` | Bucket query syntax, best practices, common patterns, troubleshooting. |
| `context://search-guide` | Search strategy, section discovery, canonical page heuristic. |
| `context://namespace-category-guide` | Category structure, namespace IDs, DPL/template discovery. |
| `context://template-reference` | Verified data-retrieval templates for `parse-wikitext` (GE prices, quest reqs, drop tables, etc.). |

## Rate limits

Two independent sliding-window budgets (tuned in `src/server.ts`):

| Surface | Budget | Counted per |
| --- | --- | --- |
| MediaWiki API | 30 requests / 60 s | each upstream tool call |
| External APIs | 30 requests / 60 s | each HTTP request by external API tool |

Over budget: waits up to 10s for a slot, then returns rate-limit error with retry hint.

## Development

### Requirements
- Node.js >= 22.19.0
- `npm install` in this directory

### Commands
```sh
npm run build   # TypeScript -> dist/
npm start       # Run built server (requires MCP_CONTACT)
npm run dev     # Build + run
```

### Repository layout
```
.
+-- src/
|   +-- index.ts          # Entry point: env gate, stdio transport, lifecycle
|   +-- env.ts            # MCP_CONTACT fail-fast gate + User-Agent composition
|   +-- server.ts         # McpServer assembly + tool gating + wiki config + rate limiting
|   +-- resources.ts      # MCP resource loader (guidance documents)
|   +-- external.ts       # HTTP utilities (callHttp) for future external APIs
|   +-- declarations.d.ts # Type declarations for upstream JS-only package
+-- resources/
|   +-- tool-selection.md        # Query-type → tool decision tree
|   +-- bucket-catalog.md        # Bucket index with field names
|   +-- bucket-query-guide.md    # Bucket query patterns and troubleshooting
|   +-- search-guide.md          # Search and section discovery strategy
|   +-- namespace-category-guide.md # Categories, namespaces, DPL
|   +-- template-reference.md    # Verified data-retrieval templates
+-- .claude-plugin/
|   +-- marketplace.json  # Claude Code marketplace manifest
+-- dist/                 # Compiled output (generated by build)
+-- package.json
+-- tsconfig.json
+-- README.md
+-- LICENSE
```

### Rate limit constants
Tuned in `src/server.ts`:
- `WINDOW_MS = 60_000` (60s window)
- `MAX_WAIT_MS = 10_000` (max 10s wait)
- `WIKI_MAX_REQUESTS = 30`
- `EXTERNAL_MAX_REQUESTS = 30`

## Contact
- Maintainer: [github.com/mistereman22](https://github.com/mistereman22)
- Issues: [github.com/mistereman22/osrs-wiki-mcp-server/issues](https://github.com/mistereman22/osrs-wiki-mcp-server/issues)

## License

**Code:** [MIT](LICENSE)

**Wiki content:** This server fetches content from the Old School RuneScape Wiki at runtime. That content is licensed under [CC BY-NC-SA 3.0](https://creativecommons.org/licenses/by-nc-sa/3.0/) with [additional terms](https://meta.weirdgloop.org/w/Licensing). This server does not store or redistribute wiki content — it is a read-only proxy. Downstream users are responsible for complying with the wiki's license when reusing retrieved content, including providing attribution to the source pages.

TDQS

A4.1/5.0

Scored across 19 tools

Disambiguation5/5

Every tool targets a distinct resource+action, and descriptions explicitly cross-reference the nearest neighbor (search-page vs search-page-by-prefix, get-page vs get-pages vs get-revision, get-file vs get-file-data, get-links-here vs get-category-members). The single/multi and metadata/content splits are clearly signposted, leaving little room for misselection.

Naming Consistency4/5

Most tools follow a predictable verb_noun kebab-case pattern (search-page, get-page-history, compare-pages, get-category-members, parse-wikitext). A handful deviate with noun-only or namespace-prefixed names (whoami, oauth-status, oauth-logout, bucket-query), which is readable but not fully uniform.

Tool Count4/5

19 tools is slightly above the comfortable 3-15 band but each earns its place across genuinely distinct sub-areas: search, page reads, revisions/diffs, files, categories/links, site metadata, auth, and Bucket queries. The breadth of the MediaWiki read surface justifies the count rather than padding it.

Completeness3/5

Read coverage is thorough, but the surface is read-only: parse-wikitext tells agents to dry-run edits before create-page/update-page, and whoami references confirming identity before writing/uploads, yet no create/update/delete/move/upload tools exist. These are dead ends for any write workflow the descriptions imply.