stardew-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@stardew-mcp-serverwhat's happening in Stardew Valley today?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
stardew-mcp-server
把《星露谷物语》(Stardew Valley) 的游戏内日历数据接入 LLM 的 MCP 服务器。
它本身不读写游戏内存,而是作为一层 MCP ⇄ HTTP 代理:MCP 客户端(如 Claude Code)通过 stdio 调用工具,服务器再把请求转发给游戏内 mod HelloStardew 暴露的本地 HTTP 桥接服务。
Claude Code / 其他 MCP 客户端
│ stdio (JSON-RPC)
▼
stardew-mcp-server (本仓库)
│ HTTP GET http://127.0.0.1:8788
▼
HelloStardew mod (游戏内, HttpBridge)
│
▼
Stardew Valley 存档效果
Related MCP server: AI Calendar Assistant
功能
通过 mod 的 HTTP API 提供以下只读能力:
查询游戏内当前日期、季节、星期
查询今天的所有事件(生日 / 节日 / 被动节日 / 钓鱼赛 / 书商)
查询指定季节某一天的事件与村民生日
查询本周(周一至周日)的村民生日
获取整个季节(28 天)的日历
环境要求
Python 3.12+
uv(推荐,用于依赖管理)
已安装并加载 HelloStardew mod,且游戏已进入存档
mod 的 HTTP 服务默认监听
http://127.0.0.1:8788
安装
git clone <本仓库地址> stardew-mcp-server
cd stardew-mcp-server
uv syncuv sync 会根据 pyproject.toml / uv.lock 创建 .venv 并安装 mcp、httpx。
在 Claude Code 中接入
本仓库使用 stdio 传输,由 Claude Code 启动进程并通过标准输入输出通信。
claude mcp add stardew --transport stdio \
--env STARDEW_API_URL=http://127.0.0.1:8788 \
-- /Users/heptane/Project/Agents/stardew-mcp-server/.venv/bin/python /Users/heptane/Project/Agents/stardew-mcp-server/src/stardew_mcp_server/server.py请把路径替换成你自己 clone 后的实际路径。
.venv/bin/python由uv sync生成。
如果已经通过 uv sync 安装,也可以直接用控制台脚本:
claude mcp add stardew --transport stdio \
--env STARDEW_API_URL=http://127.0.0.1:8788 \
-- uv run --project /path/to/stardew-mcp-server stardew-mcp-server添加完成后可在 Claude Code 中用 /mcp 查看连接状态。
其他 MCP 客户端
多数客户端使用如下 JSON 配置(Claude Desktop 的 claude_desktop_config.json、Cursor 等):
{
"mcpServers": {
"stardew": {
"command": "/Users/heptane/Project/Agents/stardew-mcp-server/.venv/bin/python",
"args": [
"/Users/heptane/Project/Agents/stardew-mcp-server/src/stardew_mcp_server/server.py"
],
"env": {
"STARDEW_API_URL": "http://127.0.0.1:8788"
}
}
}
}环境变量
变量 | 默认值 | 说明 |
|
| mod HTTP 服务的地址,每次调用时读取,末尾 |
|
| 单次 HTTP 请求超时(秒);未设置或非法时回退到默认值 |
可用工具
工具 | 参数 | 说明 |
| — | 检查 mod HTTP 服务是否在线、存档是否已加载 |
| — | 获取游戏内当前日期、季节、星期 |
| — | 获取今天的所有事件 |
|
| 本周村民生日; |
|
| 指定季节/日期的村民生日 |
|
| 指定季节/日期的所有事件 |
|
| 整季日历,缺省为当前季节 |
season取值:spring|summer|fall|winterday取值:1–28
mod 的 HTTP API
服务器仅使用 GET,不带鉴权。每个接口都返回统一信封:
{ "ok": true, "data": {}, "date": {}, "error": null }工具 | 请求 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
错误处理
工具调用不会抛异常,而是返回统一格式的错误信封,便于模型直接读取:
{ "ok": false, "data": null, "date": null, "error": { "code": "...", "message": "...", "status": 503 } }常见 code:
code | 含义 |
| 连不上 mod 服务,通常是游戏未启动或 mod 未加载 |
| mod 返回非 2xx 状态 |
| mod 返回的不是合法 JSON 或不是对象 |
当 mod 返回 503 时,表示存档尚未加载或游戏正忙,请先进入游戏存档后重试。
常见问题
调用工具报
connection_error:确认游戏正在运行、HelloStardew mod 已加载,且STARDEW_API_URL指向的端口(默认8788)可访问。返回 503 / “存档尚未加载”:进入任意存档后再调用。
不要向 stdout 打印内容:stdio MCP 服务器的 stdout 是 JSON-RPC 通道,任何多余输出都会破坏协议握手。控制台脚本
stardew-mcp-server已保证这一点。
开发
uv run stardew-mcp-server # 以 stdio 方式启动服务器
uv run pytest # 运行测试(tests/ 目录)服务器内部通过 set_transport() 允许替换 httpx 传输层,便于在测试中注入模拟响应而无需真实 socket。
相关仓库
mod 端:HeptaneL/HelloStardew
License
见仓库中的许可文件(如有)。
Available Tools
7 toolscheck_healthA
检查星露谷 mod 的 HTTP 服务是否在线,以及存档是否已加载。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It does disclose the two things checked (service liveness, save loaded), which is genuine behavioral context, but says nothing about failure modes, timeouts, or whether it requires the mod to be running.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One economical sentence covering both checks with no filler and the primary check front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need not be explained, and the tool is trivially parameterized. The only gap is behavioral guidance around failure handling, which is minor for a simple probe.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so there is nothing for the description to disambiguate; the baseline for a no-arg tool applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (check) and two concrete resources: the mod's HTTP service being online and whether the save has been loaded. This is plainly distinct from the date/event siblings, so an agent can identify it without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The health-check nature implies it should be called before relying on the other tools, but the description never says when to use it, when to skip it, or what to do if it fails. Usage is inferable rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_birthdays_on_dayA
查询指定季节和日期的村民生日。
| Name | Required | Description | Default |
|---|---|---|---|
| day | Yes | Day of the season (1-28) | |
| season | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full disclosure burden. It is a read-only lookup by nature, but the description does not state that, nor does it cover failure modes (e.g., what happens for an invalid or empty day), leaving a gap for an unannotated tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no filler. It is appropriately sized for a simple two-parameter query, though it sacrifices some clarification that a slightly longer description could provide.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter read tool with an output schema, the description is nearly sufficient; return values need not be explained because the output schema covers them. The season enum documentation gap is the main remaining hole.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 50%: the day parameter has a documented 1-28 range, while the season enum lacks any description of its values. The description only restates the parameters at a high level and adds no syntax, format, or constraint detail beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (查询) and resource (村民生日) scoped to a season and day, so the agent can distinguish it from the sibling get_week_birthdays at the level of time granularity. It is clear but does not explicitly name the week-level sibling as the alternative.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use it (when a specific season+day pair is known), and the sibling get_week_birthdays hints at the complement, but no explicit when-to-use or when-not-to-use guidance is given. Adequate but with a clear gap.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_current_dateA
获取游戏内当前日期、季节和星期信息。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the returned information types (date, season, day-of-week), which is useful behavioral context. It still doesn't mention whether the result is cached or reflects a specific game state, but for a simple read-only query this is reasonably transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence that delivers all necessary information without any filler or redundancy. It's appropriately sized for a zero-parameter query tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that there is an output schema (which likely documents the return fields) and no parameters, the description is nearly complete. It clearly states what is retrieved, though it doesn't explicitly note the read-only nature or that the output schema defines the exact structure.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters, so parameter semantics is not applicable and the baseline is 4. The description properly avoids discussing parameters and focuses on the output instead.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb+resource: it retrieves the in-game current date, season, and day-of-week. This clearly distinguishes it from siblings like get_todays_events or get_month_calendar, which focus on events or calendars rather than raw date/time state.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied: use this when you need the current in-game temporal context. However, the description provides no explicit when-to-use guidance, no exclusions, and no named alternatives, leaving the agent to infer that get_todays_events is for events rather than the base date.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_events_on_dayB
查询指定季节和日期的所有事件(节日 / 被动节日 / 钓鱼赛 / 书商 / 生日)。
| Name | Required | Description | Default |
|---|---|---|---|
| day | Yes | Day of the season (1-28) | |
| season | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the disclosure burden. It does signal that this is a read/query of game calendar data and enumerates the categories of events returned, which is useful, but it says nothing about ordering, empty results, or scope limits beyond the stated season/day.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with the action first and the returned event categories parenthetically listed. No filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter read-only lookup with an output schema, the description is nearly sufficient: it names the resource, scope, and returned categories. It stops short of full marks only because it does not differentiate itself from the calendar siblings that overlap in purpose.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 50%: 'day' is documented (1-28) and 'season' is an enum. The description only restates that a season and date are supplied, adding no format or constraint detail beyond the schema. Baseline 3 is appropriate since the schema covers most of the semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (查询/query) and resource (events on a day), and enumerates the event categories returned (festivals, passive festivals, fishing derby, bookseller, birthdays). This clearly distinguishes it from a plain birthday lookup, though it does not explicitly name the sibling get_todays_events or get_birthdays_on_day to route the agent.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no when-to-use guidance and no mention of alternatives. With siblings like get_todays_events and get_birthdays_on_day, the description should clarify that this tool takes an arbitrary season+day rather than only the current date, but it leaves that inference to the agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_month_calendarB
获取整个季节(28 天)的日历,不传 season 则默认为当前季节。
| Name | Required | Description | Default |
|---|---|---|---|
| season | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses the default-parameter behavior (current season), which is useful, but says nothing about whether this is a read-only operation, rate limits, or auth requirements. The 'get_' prefix and the existence of an output schema imply a read, but this is left to inference.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single efficient sentence that front-loads the resource and scope before the default-behavior clause. No filler, though it is terse enough to leave adjacent questions unanswered.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need not be described. The description covers scope and default but omits any routing against the six sibling tools, which is the main remaining ambiguity for an agent choosing among calendar/event retrievals.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It adds the key semantic that omitting 'season' yields the current season, which the schema's bare 'default: null' does not convey, but it does not explain the enum values beyond what the schema lists.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource: retrieve the full calendar for a season (28 days). The scope quantifier '(28 days)' is helpful, though the tool name 'get_month_calendar' conflicts with the description's 'season' framing, which could cause momentary confusion about the exact span.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description documents the default behavior when 'season' is omitted (defaults to the current season), which is implied usage guidance. It does not, however, say when this tool should be used instead of siblings like get_week_birthdays or get_events_on_day.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_todays_eventsB
获取今天的所有事件:生日 / 节日 / 被动节日 / 钓鱼赛 / 书商。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden, and it discloses nothing beyond the content categories. It does not state that this is a read-only lookup, whether results are sorted, whether it reflects a timezone, or how the enumerated categories are returned. For a zero-parameter read tool the omission is tolerable but still a gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One short sentence that front-loads the verb and scope and then lists the covered categories without padding. It is efficiently sized, though the scope qualifier could precede the category enumeration more explicitly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema present, the description needn't explain return values, and the zero-parameter surface means little call syntax is required. What remains missing is routing guidance relative to the sibling get_events_on_day, but the tool is otherwise complete for its low complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so there is nothing for the description to disambiguate; the baseline for a parameterless tool applies. The description's category list is the only semantic content needed and it is present.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource with the scope fixed to 'today', and enumerates the included event categories (birthdays, holidays, passive holidays, fishing tournaments, booksellers). It doesn't explicitly name the near-sibling get_events_on_day, but 'today' is a clear scope signal that separates it from the date-parameterized alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The word 'today' implies the usage context, so an agent can infer this is the shortcut when no date argument is needed. However, it never states when to prefer this over get_events_on_day or get_birthdays_on_day, nor any exclusions, leaving the routing decision to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_week_birthdaysA
获取本周(游戏内周,从周一到周日)的村民生日列表。
Args:
include_past: 是否包含本周已经过去的日子,默认只返回今天及之后。
| Name | Required | Description | Default |
|---|---|---|---|
| include_past | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description must carry behavioral disclosure. It states the default filtering behavior (include_past=false returns today and later), which is useful, but it does not mention read-only nature, permissions, or error behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences plus a compact Args section. Purpose is front-loaded and there is no redundant text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the low complexity (one boolean parameter) and the presence of an output schema, the description provides everything needed to call the tool: purpose, scope, and parameter behavior. No critical gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must explain include_past. It does: 是否包含本周已经过去的日子,默认只返回今天及之后. This fully clarifies the parameter's semantics and default behavior.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb (获取) and resource (本周村民生日列表), and defines the week scope (游戏内周,周一到周日), which inherently differentiates it from day- or month-scoped siblings like get_birthdays_on_day and get_month_calendar.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context (this week's birthdays, default excludes past days) but does not explicitly name alternatives or state when not to use it. Usage is implied from the scope, not spelled out.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
7 tool updates
v0.1.0- First observed
check_health - First observed
get_birthdays_on_day - First observed
get_current_date - First observed
get_events_on_day - First observed
get_month_calendar - First observed
get_todays_events - First observed
get_week_birthdays
TDQS
Scored across 7 tools
Tools are mostly distinct by scope (today, specific day, week, season), but get_todays_events overlaps with get_events_on_day for the current date. Similarly, get_week_birthdays overlaps with get_birthdays_on_day and get_month_calendar for birthday data.
All tools use lower_snake_case with a verb-first pattern (check_health, get_*). The only deviation is check_health versus the get_ prefix, but it still follows verb_noun and is appropriate for a health check.
7 tools is well-suited for a focused calendar/event lookup server. Each tool covers a distinct granularity or health check without bloat.
Covers current date, today's events, day/week birthdays, day events, and full season calendar, which satisfies most calendar queries. Minor gaps exist for event details like time/location or week-level all-event queries, but the core surface is solid.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Deterministic calendars and cosmic date JSON for AI agents via MCP (Gregorian 1900-2100).
Provide detailed Pokémon data and information through a standardized MCP interface. Enable LLMs an…
- UnifAPIOAuthcom.unifapi
Hosted MCP server for live public-data APIs and Skills for AI agents.
Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables interaction with CalDAV calendars to manage events and check availability through natural language or voice commands. It provides specific tools for listing, searching, and creating calendar entries using an OpenAI-compatible interface.-
- AlicenseNot gradedqualityDmaintenanceProvides a set of MCP tools to manage Google Calendar events via natural language, allowing creation, querying, updating, and deletion of events through a local LLM (Ollama) and MCP client.5MIT
- AlicenseNot gradedqualityAmaintenanceA read-only MCP server that exposes iCalendar feeds as queryable tools for LLM agents, enabling calendar event retrieval and filtering.MIT
- FlicenseBqualityDmaintenanceMCP server for Cal.com scheduling, providing ~70 tools to manage schedules, event types, bookings, calendars, webhooks, and teams. Enables natural language control of Cal.com from Claude or any MCP-compatible client.68-