stardew-mcp
Exposes the Stardew Valley Wiki as structured data via MCP tools for keyword/semantic search, page retrieval, and entity listings.
README
stardew-mcp
An MCP server that exposes the Stardew Valley Wiki as queryable tools.
It parses a MediaWiki XML dump of the wiki (shipped as
stardewvalleywiki-dump-20260628.zip) into structured JSON at build time, then
serves it through a small set of MCP tools: keyword search, optional semantic
search, typed listings, and per-page/per-section retrieval.
What it gives an LLM
search_pages(query, limit?, type?)— BM25 keyword search over page titles, intros, infobox fields, and section headings.vector_search(query, limit?, type?)— semantic search over sentence embeddings (all-MiniLM-L6-v2). Falls back to keyword search if embeddings aren't built.get_page(title, include_raw?)— full structured page: entity type, parsed infobox fields (rendered to text), intro, all sections, categories.get_page_section(title, section)— a single section by heading.list_types()— entity types (from infoboxes) with counts.list_by_type(type, limit?)— all page titles of one type.search_by_type(type, query, limit?)— keyword search scoped to one type.
Entity types are derived from the wiki's infobox templates and include:
villager, fish, item (plain {{Infobox}}, e.g. crops/forage),
seed, weapon, clothing, furniture, mousehat, mineral, monster,
location, artifact, building, tool, animal, tree.
Prerequisites
- Node.js 22+
- The
unzipbinary onPATH(used to extract the dump zip) - The dump zip at the repo root:
stardewvalleywiki-dump-20260628.zip
Build
npm install
npm run build # parse XML -> data/*.json, then compile TS
This produces:
data/pages.json— every page, parsed (infobox fields, sections, categories, excerpt).data/index.json— title + type indices for fast lookup.dist/— compiled server.
(Optional) Build embeddings for vector search
npm run build:embed # downloads ~23MB model once, embeds 2005 pages
This adds data/embeddings.json. vector_search works without it (it falls
back to keyword search), but the tool is more useful with embeddings. Requires
the optional dependency @huggingface/transformers, which is installed by
default via optionalDependencies.
Run
npm start # node dist/server/index.js (stdio transport)
npm run dev # tsx src/server/index.ts (no build step needed)
Configure an MCP client
Add the server to your MCP client config (e.g. .opencode/opencode.json or
Claude Desktop's claude_desktop_config.json):
{
"mcpServers": {
"stardew": {
"command": "node",
"args": ["/absolute/path/to/stardew-mcp/dist/server/index.js"]
}
}
}
The server loads data/pages.json at startup; build before first run.
How the data is parsed
src/build/wikitext.ts is a focused MediaWiki parser (not a full one):
- Finds the first top-level
{{Infobox ...}}template with balanced-brace scanning, and parses itskey = valuefields. - Renders fields to plaintext:
{{Price|N}}→ "N gold",{{Name|X}}→ "X",{{NPC|name|role}}→ "name (role)",{{Season|Spring|13}}→ "Spring 13", links[[A|b]]→ "b", and strips refs/tables/file links. - Splits sections on
=-headings and strips the infobox from the intro. - Extracts
[[Category:...]].
Search (src/search/search.ts) is BM25 over tokenized excerpts with title
boosting, plus optional cosine search over L2-normalized embeddings.
Scripts
| script | description |
|---|---|
npm run build:parse |
parse the XML dump → data/pages.json + data/index.json |
npm run build:embed |
compute sentence embeddings → data/embeddings.json |
npm run build:server |
tsc → dist/ |
npm run build |
parse + compile |
npm run dev |
run server via tsx (no compile) |
npm start |
run compiled server |
npm test |
vitest (parser unit tests + end-to-end server tests) |
npm run typecheck |
tsc --noEmit |
Layout
src/
build/
wikitext.ts # MediaWiki parser (infobox, sections, render)
build.ts # XML dump -> data/pages.json + data/index.json
embed.ts # pages -> data/embeddings.json (transformers.js)
search/
search.ts # BM25 + optional vector search, data loader
server/
index.ts # MCP server + tool handlers
tests/
parse.test.ts # parser unit tests
e2e.test.ts # end-to-end server tests via MCP client SDK
data/ # generated (gitignored)
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。