mcp-ps-store
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
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
| Tool | What it is for |
| --- | --- |
| psn_taste_profile | The main one: a single digest — top games by hours, favourite franchises, playstyle habits (average session, share of deep dives, platinum rate), games close to 100%, games abandoned after an hour, and purchases never launched. Start here for any recommendation question. |
| psn_library | Filterable game list: search by title, sort by hours / last played / trophy progress, filter by platform, hours, dates and progress. |
| psn_game_trophies | Every trophy of one game: earned or not, date, rarity, share of players who have it. |
| psn_owned_games | What is already bought or claimed through PS Plus, with hours where known — so nothing already owned gets recommended. |
| psn_recently_played | What was launched most recently. |
| psn_profile | Online ID, PS Plus, trophy level, lifetime trophy counts. |
| psn_refresh | Drops the response cache (PSN answers are cached for 10 minutes). |
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
1. Sign in at https://www.playstation.com in a browser.
2. Open https://ca.account.sony.com/api/v1/ssocookie — it returns {"npsso":"..."}.
3. Copy the 64-character npsso value 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