
PlayStation Network
io.github.murzin-ml由 GitHub 帳號 murzin-ml 發布v0.1.0更新於 Nov 10, 2026
PlayStation Network (PSN) gaming history: playtime, trophies and purchased library.
概覽
唯讀的 MCP 伺服器,向助理提供你的 PlayStation Network 遊戲紀錄——遊玩時數、獎盃與已購遊戲庫,讓推薦立基於真實資料。
- 可以做什麼
- 產生口味摘要:依時數排名的遊戲、常玩的系列、遊玩習慣、接近白金與玩一小時就放棄的遊戲
- 依標題、時數、最近遊玩、平台、日期與獎盃進度篩選遊戲庫
- 查看單一遊戲的所有獎盃,包含稀有度與取得該獎盃的玩家比例
- 查詢已擁有及 PS Plus 領取的遊戲、最近遊玩紀錄,以及獎盃等級等個人資料
- 清除 PSN 回應快取,並使用內建的「推薦遊戲」提示情境
- 適用情境
- 當你希望助理依據真實的 PlayStation 紀錄、而非一般常識來推薦下一款遊戲,或想查詢自己的遊玩時數、獎盃與待玩清單時使用。
- 執行需求
- 以 Python 3.11+ 的本機套件(PyPI 上的 mcp-ps-store)透過 stdio 執行。需要 PSN 的 NPSSO cookie,可透過 psn-login 指令傳入或設定 PSN_NPSSO;權杖會快取到本機檔案。選用設定包括 PSN_STORE_LOCALE、PSN_TOKENS_PATH、PSN_CACHE_TTL 與傳輸方式。需要連線至 PSN 的網路。
安裝
在 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 分