
PlayStation Network
io.github.murzin-ml由 GitHub 账号 murzin-ml 发布v0.1.0更新于 Oct 24, 2026
PlayStation Network (PSN) gaming history: playtime, trophies and purchased library.
概览
让助手读取你的 PlayStation Network 游戏记录——游玩时长、奖杯和已购游戏库——从而基于真实数据推荐游戏。
- 可以做什么
- 通过你自己的 PSN 账号提供多个工具:口味画像摘要(按时长排序的常玩游戏、偏好系列、游玩习惯、白金率、玩一小时后弃坑的游戏、买了没启动的游戏)、可筛选的游戏库、单个游戏的奖杯列表、已拥有游戏、最近游玩、账号资料以及缓存刷新。另有一个 recommend_games 提示,把生成画像和推荐游戏串成一个场景。所有请求都是读取,不会向账号写入任何内容。
- 适用场景
- 当你希望游戏推荐基于自己实际玩过和已拥有的游戏,而不是泛泛的建议时;或者想查看自己的游玩时长、奖杯进度和积压游戏时。适合 Claude Code、Claude Desktop、Codex CLI 等本地桌面客户端。
- 运行要求
- 本地 Python 3.11+ 进程,可从 PyPI 安装 mcp-ps-store 或从源码运行。需要一个 PSN 的 NPSSO cookie,可用 psn-login 命令保存,或通过环境变量 PSN_NPSSO 提供;可选设置包括 PSN_STORE_LOCALE、PSN_TOKENS_PATH、PSN_CACHE_TTL、PSN_REQUEST_TIMEOUT 以及 HTTP 传输相关变量。需要访问 PSN 的网络。仅限桌面端;ChatGPT 无法启动本地进程。
安装
在 SourceWeft 中
- 打开 控制台中的 PlayStation Network,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
mcp-ps-store
MCP server for the PlayStation Network (PSN): it exposes your own gaming history — playtime, trophies, purchased library — so an AI assistant can recommend games from real data instead of guesswork.
Русская версия: README.ru.md.
About
PSN has no public API. This server talks to the same internal API the PlayStation mobile app uses, authenticating with an NPSSO cookie taken from a browser session. Every request is a read; nothing is ever written back to the account.
The layout follows a layered architecture: an API layer (MCP tools), a core layer (services, repositories, DTOs), a DI container and an infrastructure layer.
Core technologies
- Language: Python 3.11+
- Protocol: Model Context Protocol (
mcp) - HTTP client: httpx (async)
- DI container:
dependency-injector - Settings:
pydantic-settings - Dependency management: Poetry
- Testing: Pytest,
pytest-asyncio
What it exposes
Plus a recommend_games prompt — a ready-made "build my profile and recommend games"
scenario that takes an optional steer such as "something short" or "co-op for two".
Quick start
Python 3.11+ is required.
1. Install
With Poetry:
Or with a plain virtualenv:
2. Sign in to PSN
- Sign in at https://www.playstation.com in a browser.
- Open https://ca.account.sony.com/api/v1/ssocookie — it returns
{"npsso":"..."}. - Copy the 64-character
npssovalue and run:
Tokens go to ~/.mcp-ps-store/tokens.json with 0600 permissions.
About session lifetime. The access token lives an hour and the refresh token only ten
days, but the NPSSO itself lives about two months. The NPSSO is therefore stored next to
the tokens, and the server re-authenticates on its own when the refresh token dies. In
practice one psn-login lasts about 60 days.
3. Check it works
It prints the account name, how many games are visible and the top five by hours.
Connecting a client
Claude Code
Claude Desktop
In claude_desktop_config.json:
Codex CLI
Codex speaks stdio to local MCP servers, so it works the same way. Either run
codex mcp add, or add this to ~/.codex/config.toml:
Check it with /mcp inside a Codex session.
ChatGPT
ChatGPT cannot launch a local process. Custom connectors are added in Developer mode (Settings → Apps → Advanced) and must be a public HTTPS endpoint speaking SSE or Streamable HTTP. So the server has to be switched to HTTP transport and published:
Then expose http://127.0.0.1:8000/mcp over HTTPS — with OpenAI's Secure MCP Tunnel, or
a tunnel such as cloudflared / ngrok — and add the resulting URL as a custom connector.
This publishes your PSN history to whoever finds the URL. The server has no authentication of its own, so put the tunnel behind auth, keep it running only while you need it, and prefer Codex CLI if a local client will do.
Configuration
All settings are read from the environment or a .env file (see .env.example).
Limitations
- Playtime exists only for PS4 / PS5 / PC versions. PSN reports PS3 and Vita games
with trophies only, so they appear with
hours: null. - There is no PS Store catalogue here. The store is entirely client-side, and its
GraphQL API only accepts persisted queries whose hashes Sony rotates on every deploy —
keeping that working is not realistic. Recommendation candidates come from the model's
own knowledge of games, while
psn_owned_gamesstops it suggesting something already bought. - The purchased library goes through PSN's private GraphQL API. If Sony changes the
query, that one tool stops working; everything else keeps running and the digest gains
a
backlog_unavailablenote. - Playtime and trophies are joined by title, so a re-release can merge with the original
when they share a trophy set. Editions, platform suffixes and roman numerals are
normalised away on purpose —
Alan Wake IIandAlan Wake 2are one game. - The API is unofficial: Sony can change it at any time.
Project structure
Development
License
MIT — see LICENSE.
来源:README.md,提交 9a6f981
工具
0版本历史
1- v0.1.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分