anilist-mcp-server 0.6.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,43 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.7.1] - 2026-07-31
10
+
11
+ ### Changed
12
+
13
+ - Stop defaulting `search_media`'s `sort` to SEARCH_MATCH for a term-less or whitespace query; it now browses in AniList's own order, and the term is trimmed. [53c4592](https://github.com/Grinv/anilist-mcp-server/commit/53c4592)
14
+ - Model `get_todays_birthdays`' output as a single list instead of a degenerate `character | staff` union. [3f2f93b](https://github.com/Grinv/anilist-mcp-server/commit/3f2f93b)
15
+ - Reword `get_anime_schedule`: a manga id is rejected as not-found, not silently returned as an empty schedule. [53c4a8f](https://github.com/Grinv/anilist-mcp-server/commit/53c4a8f)
16
+ - Document AniList's ~5000-entry page-depth cap on paginated connections (search, characters/staff/reviews, activity, comments). [53c4592](https://github.com/Grinv/anilist-mcp-server/commit/53c4592) [513da8d](https://github.com/Grinv/anilist-mcp-server/commit/513da8d)
17
+ - Note that `donatorBadge` reads `"Donator"` even at `donatorTier` 0, so it isn't a donator signal. [53c4a8f](https://github.com/Grinv/anilist-mcp-server/commit/53c4a8f) [0f483e3](https://github.com/Grinv/anilist-mcp-server/commit/0f483e3)
18
+
19
+ ### Security
20
+
21
+ - Re-assert `0600` on the token store file on every write, so overwriting a looser pre-existing `tokens.json` re-tightens it. [53c4592](https://github.com/Grinv/anilist-mcp-server/commit/53c4592)
22
+ - Route the fatal startup error through `redact()`, closing the one stderr path that bypassed credential redaction. [53c4592](https://github.com/Grinv/anilist-mcp-server/commit/53c4592)
23
+
24
+ ## [0.7.0] - 2026-07-30
25
+
26
+ ### Changed
27
+
28
+ - Reject non-positive AniList IDs locally instead of sending them upstream, where such values always fail anyway. [069bbe4](https://github.com/Grinv/anilist-mcp-server/commit/069bbe4)
29
+ - Reject negative values locally for numeric fields that can never be negative (counts, years, scores, etc.). [069bbe4](https://github.com/Grinv/anilist-mcp-server/commit/069bbe4) [b80f321](https://github.com/Grinv/anilist-mcp-server/commit/b80f321)
30
+ - Model activity results as their real type-specific shape (text/list-update/message), not one object mixing every type's fields. [069bbe4](https://github.com/Grinv/anilist-mcp-server/commit/069bbe4)
31
+ - Validate URL fields (site links, avatar/cover/banner images, the AniList API base URLs) as real http/https URLs, not just strings. [069bbe4](https://github.com/Grinv/anilist-mcp-server/commit/069bbe4) [b80f321](https://github.com/Grinv/anilist-mcp-server/commit/b80f321)
32
+ - Disclose that `add_list_entry`/`update_list_entry`'s `advancedScores` are positional — reordering categories later reinterprets written scores. [0a1aff4](https://github.com/Grinv/anilist-mcp-server/commit/0a1aff4)
33
+ - Disclose that `post_thread`'s response omits `categories`/`isSticky`/`isLocked` — call `get_thread` afterward to confirm a change applied. [4a2a5ac](https://github.com/Grinv/anilist-mcp-server/commit/4a2a5ac)
34
+ - Disclose that `post_thread_comment`'s `id` and `parentCommentId` refer to different comments — the branded type can't tell them apart. [4a2a5ac](https://github.com/Grinv/anilist-mcp-server/commit/4a2a5ac)
35
+ - Disclose that `get_user_recent_activity` applies no activity-type filter, same as `get_user_activity`. [3ce5ca3](https://github.com/Grinv/anilist-mcp-server/commit/3ce5ca3)
36
+ - Disclose `login_anilist`'s actual default redirect URI and its `ANILIST_OAUTH_PORT` override, needed before registering an AniList app. [c194eca](https://github.com/Grinv/anilist-mcp-server/commit/c194eca)
37
+ - Clarify that `get_recommendation`'s rating/vote is cast on anilist.co directly — this server has no tool to vote itself. [a74780b](https://github.com/Grinv/anilist-mcp-server/commit/a74780b)
38
+ - Clarify `get_media_reviews` sorts by `rating` (a review's community-helpfulness vote), not `score` (the reviewer's own rating). [628c2df](https://github.com/Grinv/anilist-mcp-server/commit/628c2df)
39
+ - Confirm `get_site_statistics`' `pageInfo.total`/`.lastPage` are accurate here, unlike this schema's usual meaning elsewhere. [e024968](https://github.com/Grinv/anilist-mcp-server/commit/e024968)
40
+
41
+ ### Fixed
42
+
43
+ - Fix `get_anime_schedule`'s `notYetAired: false` description — it swaps to a past-only result set, not an addition to upcoming ones. [628c2df](https://github.com/Grinv/anilist-mcp-server/commit/628c2df)
44
+ - Fix `get_recommendations_for_media`'s description pointing to the wrong field path for `mediaListEntry`. [a74780b](https://github.com/Grinv/anilist-mcp-server/commit/a74780b)
45
+
9
46
  ## [0.6.0] - 2026-07-30
10
47
 
11
48
  ### Added
package/PRIVACY.md CHANGED
@@ -3,21 +3,20 @@
3
3
  `anilist-mcp-server` is a local [Model Context Protocol](https://modelcontextprotocol.io)
4
4
  server: it runs as a process on your own machine (via `npx` or a local clone),
5
5
  speaking stdio to your MCP client (Claude Desktop, Claude Code, etc.). It has
6
- no server component of its own, no telemetry, and no analytics — this policy
7
- covers exactly what it does with data, in full, because there isn't more to
8
- say beyond it.
6
+ no backend of its own, and no telemetry or analytics. This policy describes
7
+ everything it does with your data.
9
8
 
10
- **Read this section first if you're only skimming:** unlike a read-only data
11
- server, this one can act on your real AniList account when you (or the AI
12
- model acting for you) ask it to — see
9
+ **Read this first if you're only skimming:** unlike a read-only data server,
10
+ this one can act on your real AniList account when you (or the AI model acting
11
+ for you) ask it to. See
13
12
  [Usage and third-party sharing](#usage-and-third-party-sharing) below for the
14
13
  full list of what it can change.
15
14
 
16
15
  ## Data collection
17
16
 
18
- `anilist-mcp-server` collects no data of its own. It has no database, no
19
- accounts, and sends nothing to its maintainer or to any analytics/telemetry
20
- service.
17
+ `anilist-mcp-server` collects no data of its own. It has no database and no
18
+ accounts, and it sends nothing to its maintainer or to any analytics or
19
+ telemetry service.
21
20
 
22
21
  The only inputs it handles are:
23
22
 
@@ -25,10 +24,10 @@ The only inputs it handles are:
25
24
  own config (e.g. `claude_desktop_config.json`): `ANILIST_CLIENT_ID` /
26
25
  `ANILIST_CLIENT_SECRET` (your own registered AniList app, needed to start a
27
26
  login), and either an `ANILIST_ACCESS_TOKEN` you pre-supply or the access
28
- token obtained by running the `login_anilist` tool. All are optional — the
29
- server starts and every read-only tool works with no credentials at all.
30
- These stay in your client's local config file (or, for a token obtained via
31
- `login_anilist`, on disk locally — see
27
+ token from running the `login_anilist` tool. All are optional: the server
28
+ starts and every read-only tool works with no credentials at all. These
29
+ stay in your client's local config file (or, for a token from
30
+ `login_anilist`, on local disk, see
32
31
  [Storage and retention](#storage-and-retention)); `anilist-mcp-server` never
33
32
  transmits them anywhere except as described below.
34
33
  - **Tool call arguments**, generated by the AI model you're using (e.g. an
@@ -38,98 +37,91 @@ The only inputs it handles are:
38
37
 
39
38
  ## Usage and third-party sharing
40
39
 
41
- Every tool call results in an outbound HTTPS request to AniList's own
42
- infrastructure — the public GraphQL API (`graphql.anilist.co`) for every
43
- tool, plus AniList's OAuth endpoints (`anilist.co/api/v2/oauth/*`) only during
44
- the one-time `login_anilist` / `submit_anilist_redirect` login flow. No other
40
+ Every tool call makes one outbound HTTPS request, to AniList's own
41
+ infrastructure: the public GraphQL API (`graphql.anilist.co`) for every tool,
42
+ plus AniList's OAuth endpoints (`anilist.co/api/v2/oauth/*`) only during the
43
+ one-time `login_anilist` / `submit_anilist_redirect` login flow. No other
45
44
  third party is ever contacted.
46
45
 
47
46
  - **Reads** (search, details, genres/tags, recommendations, forum threads,
48
47
  activity feeds, public/unlisted user profiles and lists) call the public
49
48
  GraphQL endpoint with no credentials and touch only public data.
50
- - **Your access token, when configured**, is sent as an `Authorization:
51
- Bearer <token>` HTTP header on every GraphQL request that needs it — this
52
- is standard OAuth bearer-token usage, not a custom scheme. AniList sees
53
- this exactly as if you'd made the request yourself while logged in.
54
- - **This server can write to and post from your real AniList account** when
55
- a personal/mutation tool is called with a valid token. This is the single
56
- biggest difference from a purely read-only MCP server, and it is not
57
- hypothetical — the following tools perform real, live mutations against
58
- `graphql.anilist.co` the moment they're called, with no separate
59
- confirmation step of the server's own:
49
+ - **Your access token, when configured**, rides on every GraphQL request that
50
+ needs it, as a standard `Authorization: Bearer <token>` header. To AniList
51
+ the request looks the same as one you'd make while logged in.
52
+ - **This server can write to and post from your real AniList account** when a
53
+ personal/mutation tool runs with a valid token. That's the main thing
54
+ setting it apart from a read-only MCP server. These tools write to
55
+ `graphql.anilist.co` when called, with no confirmation step of the server's
56
+ own:
60
57
  - **Your list**: `add_list_entry`, `update_list_entry`, `remove_list_entry`
61
- — add, change (status, score, progress, notes, dates, custom lists,
58
+ add, change (status, score, progress, notes, dates, custom lists,
62
59
  advanced scores, rewatches), or delete entries on your anime/manga list.
63
60
  - **Favourites and follows**: `toggle_favourite` (anime, manga, characters,
64
61
  staff, or studios) and `toggle_follow_user`.
65
62
  - **Public posts under your name**: `post_text_activity`,
66
- `post_message_activity`, `post_thread`, `post_thread_comment` — these
67
- publish content to AniList's public activity feed or forums, visible to
68
- other AniList users and attributed to your account, exactly as if you'd
69
- posted them yourself on anilist.co. Their `delete_activity`,
70
- `delete_thread`, `delete_thread_comment` counterparts remove your own
71
- posts the same way.
63
+ `post_message_activity`, `post_thread`, `post_thread_comment` publish to
64
+ AniList's public activity feed or forums, visible to other users under
65
+ your name, the same as posting on anilist.co. The `delete_activity`,
66
+ `delete_thread`, and `delete_thread_comment` counterparts take those
67
+ posts back down.
72
68
  - **Account settings**: `update_user` changes settings on your AniList
73
69
  profile.
74
70
 
75
- Every one of these requires a valid access token (`ANILIST_ACCESS_TOKEN` or
76
- one obtained via `login_anilist`); without one they return an error instead
77
- of a doomed request. There is no tool-level allow/deny list beyond that —
78
- if the calling AI model decides to invoke one of these tools with your
79
- token configured, the mutation happens. Review what your AI agent intends
80
- to do before authorizing it to act with a write-capable token, the same way
81
- you would before granting any other tool access to a real account.
71
+ Each of these needs a valid access token (`ANILIST_ACCESS_TOKEN` or one from
72
+ `login_anilist`); without one it returns an error rather than trying the
73
+ request anyway. That token is the only gate, so if the model calls one of
74
+ these tools while it's configured, the write happens. Check what your agent
75
+ intends before you hand it a write-capable token, the same care you'd take
76
+ with any tool that can touch a real account.
82
77
 
83
78
  - **`get_notifications` / `get_authorized_user`** read private data (your own
84
79
  notifications, your own profile as seen while logged in) using the same
85
80
  bearer token. `get_authorized_user` doesn't write anything; `get_notifications`
86
- is read-only by default too, but its opt-in `markAsRead: true` resets
87
- AniList's real unread-notification badge count as a side effect.
88
- - **The login flow itself** (`login_anilist`): opens your system browser to
89
- AniList's own authorize page, where you sign in and approve directly with
90
- AniList (this server never sees your AniList password). AniList redirects
91
- back with a one-time code, which the server exchanges — sending your
92
- `ANILIST_CLIENT_ID`/`ANILIST_CLIENT_SECRET` and that code, never a
93
- password — for an access token at AniList's token endpoint.
94
-
95
- Once a request reaches AniList, it is governed by
81
+ is read-only by default too, but its opt-in `markAsRead: true` resets your
82
+ unread-notification badge count as a side effect.
83
+ - **The login flow** (`login_anilist`) opens your system browser to AniList's
84
+ own authorize page, where you sign in and approve with AniList directly
85
+ (this server never sees your AniList password). AniList redirects back with
86
+ a one-time code, which the server trades for an access token at AniList's
87
+ token endpoint, sending your `ANILIST_CLIENT_ID`/`ANILIST_CLIENT_SECRET` and
88
+ that code but never a password.
89
+
90
+ Once a request reaches AniList, it falls under
96
91
  [AniList's own Terms & Privacy](https://anilist.co/terms) (AniList publishes
97
- one combined page, not a separate privacy policy).
98
- `anilist-mcp-server` sends data to no other destination — no analytics
99
- vendor, no logging service, no server operated by its maintainer.
92
+ one combined page, not a separate privacy policy). `anilist-mcp-server` sends
93
+ data nowhere else: no analytics or logging service, and no server run by its
94
+ maintainer.
100
95
 
101
96
  ## Storage and retention
102
97
 
103
98
  - **Caching**: successful **read** responses are cached in the server
104
- process's own memory only (never written to disk), for a short
105
- configurable TTL (`CACHE_TTL_MS`, default 5 minutes) to cut latency and
106
- ease pressure on AniList's rate-limited API. Cache keys include the actual
107
- token in use, so different accounts' cached data can never cross. Mutations
108
- are never cached, and a successful mutation immediately clears the entire
109
- cache (since a write can change the answer to previously-cached reads,
110
- e.g. a newly-favourited title's `isFavourite` flag) so the next read is
111
- guaranteed fresh. The cache is cleared entirely when the process exits and
112
- is never shared across machines or users.
99
+ process's own memory only (never written to disk), for a short configurable
100
+ TTL (`CACHE_TTL_MS`, default 5 minutes) to cut latency and ease pressure on
101
+ AniList's rate-limited API. Cache keys include the token in use, so
102
+ different accounts' cached data can never cross. Mutations are never cached,
103
+ and a successful one immediately clears the whole cache (a write can change
104
+ the answer to an already-cached read, e.g. a newly-favourited title's
105
+ `isFavourite` flag), so the next read is fresh. The cache is cleared when
106
+ the process exits and is never shared across machines or users.
113
107
  - **Your access token**: if obtained via `login_anilist`, it is written to a
114
108
  single local file (`~/.config/anilist-mcp-server/tokens.json` on
115
109
  macOS/Linux, `%APPDATA%\anilist-mcp-server\tokens.json` on Windows, or the
116
110
  path in `ANILIST_TOKEN_STORE`), created with `0600` permissions
117
- (owner-read/write only) so it persists across restarts without requiring
118
- you to log in again — AniList tokens don't support refresh and are valid
119
- for about a year. If you instead pre-supply `ANILIST_ACCESS_TOKEN`
120
- directly, it is held in memory only for that run and is **not** written to
121
- this file. Nothing about this token is ever sent anywhere except to
122
- AniList itself, as described above.
111
+ (owner-read/write only) so it survives restarts without a fresh login
112
+ (AniList tokens don't support refresh and last about a year). If you
113
+ pre-supply `ANILIST_ACCESS_TOKEN` directly instead, it stays in memory for
114
+ that run only and is **not** written to this file. Nothing about this token
115
+ goes anywhere except to AniList itself, as described above.
123
116
  - **Logging**: operational logs go to stderr only (never a file, never a
124
- remote endpoint), with credentials/tokens redacted before anything is
125
- written. Log verbosity is controlled by `LOG_LEVEL` (default `info`); logs
126
- live only as long as your MCP client keeps that stderr stream around.
127
- - Beyond the cache TTL, the on-disk token file, and the running process's
128
- lifetime, `anilist-mcp-server` retains nothing. There is no other
129
- persistent storage layer, and no copy of anything you post or write is kept
130
- by the server itself once the request completes — AniList's own retention
131
- of that data (e.g. an activity post or list entry) is governed by AniList's
132
- Terms & Privacy linked above.
117
+ remote endpoint), with credentials and tokens redacted before anything is
118
+ written. `LOG_LEVEL` (default `info`) controls verbosity; the logs last
119
+ only as long as your MCP client keeps that stderr stream around.
120
+ - Past the cache TTL, the on-disk token file, and the running process's
121
+ lifetime, `anilist-mcp-server` keeps nothing. There is no other persistent
122
+ storage, and once a request completes the server holds no copy of what you
123
+ posted or wrote. AniList's own retention of that data (e.g. an activity post
124
+ or list entry) falls under AniList's Terms & Privacy linked above.
133
125
 
134
126
  ## Changes to this policy
135
127
 
package/README.md CHANGED
@@ -8,32 +8,32 @@
8
8
 
9
9
  An [MCP](https://modelcontextprotocol.io) server for **[AniList](https://anilist.co)**.
10
10
  It works with any MCP-compatible client or agent (Claude Desktop/Code, Cursor,
11
- VS Code, Cline, Continue, and others) — the server speaks the standard MCP
11
+ VS Code, Cline, Continue, and others). It speaks the standard MCP
12
12
  stdio protocol.
13
13
 
14
14
  ## What it does
15
15
 
16
16
  Talks directly to AniList's public GraphQL API (`https://graphql.anilist.co`):
17
17
 
18
- - **Reads — no credentials needed.** Search and browse anime/manga,
18
+ - **Reads (no credentials needed).** Search and browse anime/manga,
19
19
  characters, staff, studios; genres/tags; recommendations; forum threads;
20
20
  activity feeds; public/unlisted user profiles and lists.
21
- - **Your own AniList account — requires a one-time login.** Manage your own
21
+ - **Your own AniList account (requires a one-time login).** Manage your own
22
22
  anime/manga list (add/update/remove entries), favourites, follows, your
23
23
  notifications, and post/delete your own activity and threads.
24
24
 
25
25
  ## What you need (and what it gets you)
26
26
 
27
- Nothing is required to get started — you can skip straight to
27
+ Nothing is required to get started, so you can skip straight to
28
28
  [Install](#install). Everything below is optional:
29
29
 
30
30
  | You set... | You get... |
31
31
  | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
32
- | _(nothing)_ | Search, details, genres/tags, recommendations, threads, activity, public profiles/lists — works immediately. |
32
+ | _(nothing)_ | Search, details, genres/tags, recommendations, threads, activity, public profiles/lists. Works immediately. |
33
33
  | An AniList **Client ID + Client Secret** ([2 minutes, free →](#connect-your-anilist-account)), plus running `login_anilist` once | Everything above, plus your **own AniList account**: manage your list, favourites, follows, activity, and threads. |
34
34
 
35
35
  Without a login, the personal/mutation tools reply with a clear message
36
- telling you how to get one — everything else keeps working regardless.
36
+ telling you how to get one; everything else keeps working regardless.
37
37
 
38
38
  ## Example queries
39
39
 
@@ -97,7 +97,7 @@ Reusable multi-step plans your client can offer as one-click flows:
97
97
 
98
98
  Download [**`anilist-mcp-server.mcpb`**](https://github.com/Grinv/anilist-mcp-server/releases/latest/download/anilist-mcp-server.mcpb)
99
99
  (always the latest release) and open it with your MCP client. It prompts for an optional
100
- AniList **Client ID** and **Client Secret** — set them and run the `login_anilist` tool to
100
+ AniList **Client ID** and **Client Secret**. Set them and run the `login_anilist` tool to
101
101
  enable the personal-list/social tools (see
102
102
  [Connect your AniList account](#connect-your-anilist-account)). Leave them
103
103
  blank to use just the credential-free read tools.
@@ -143,8 +143,8 @@ for `"command": "node", "args": ["/absolute/path/to/anilist-mcp-server/dist/inde
143
143
  (and `npx -y anilist-mcp-server` for `node /absolute/path/to/anilist-mcp-server/dist/index.js`
144
144
  in the CLI form).
145
145
 
146
- The `env` block (shown above for both install methods) is **optional** — omit it to use only the credential-free read
147
- tools; the personal/mutation tools will return a clear error until you log in.
146
+ The `env` block (shown above for both install methods) is **optional**: omit it to use only the credential-free read
147
+ tools; the personal/mutation tools return a clear error until you log in.
148
148
  To enable them, set `ANILIST_CLIENT_ID` + `ANILIST_CLIENT_SECRET` and run the
149
149
  **`login_anilist`** tool once (a one-time browser authorization; the token is
150
150
  then stored and reused). The server does not read a `.env` file, so pass
@@ -157,7 +157,7 @@ config via this `env` block (or your shell environment). See
157
157
  The search/browse tools work with **no setup**. To use the personal/mutation
158
158
  tools, authorize your account once. It takes about two minutes.
159
159
 
160
- **Step 1 — Register an AniList app (one minute).**
160
+ **Step 1: Register an AniList app (one minute).**
161
161
 
162
162
  1. Go to <https://anilist.co/settings/developer> and click **Create New Client**.
163
163
  2. **Name:** anything.
@@ -166,10 +166,10 @@ tools, authorize your account once. It takes about two minutes.
166
166
  http://localhost:8082/callback
167
167
  ```
168
168
  _(If port 8082 is already used on your machine, pick another port here and set
169
- `ANILIST_OAUTH_PORT` to the same number — see [Configuration](#configuration).)_
169
+ `ANILIST_OAUTH_PORT` to the same number, see [Configuration](#configuration).)_
170
170
  4. Save. Copy the **Client ID** and **Client Secret**.
171
171
 
172
- **Step 2 — Give the credentials to the server.**
172
+ **Step 2: Give the credentials to the server.**
173
173
 
174
174
  ```json
175
175
  "env": { "ANILIST_CLIENT_ID": "...", "ANILIST_CLIENT_SECRET": "..." }
@@ -177,49 +177,49 @@ tools, authorize your account once. It takes about two minutes.
177
177
 
178
178
  Restart the server/client so it picks up the values.
179
179
 
180
- **Step 3 — Log in (one click).**
180
+ **Step 3: Log in (one click).**
181
181
 
182
182
  In your assistant, run the **`login_anilist`** tool (or just say _"log in to
183
183
  AniList"_). It replies with a link. Open the link, sign in to AniList, and
184
184
  click **Approve**.
185
185
 
186
186
  - **Running locally** (Claude Desktop, or Claude Code on your own machine):
187
- login finishes **automatically** the moment you click Approve. Confirm with
187
+ login finishes **automatically** as soon as you click Approve. Confirm with
188
188
  _"show my AniList profile"_ (`get_authorized_user`).
189
189
  - **Running on a remote/SSH/headless host:** after clicking Approve your
190
- browser lands on a page that won't load — that's expected. **Copy the full
190
+ browser lands on a page that won't load; that's expected. **Copy the full
191
191
  address from the browser's address bar** (it contains `?code=…`) and give it
192
192
  to the **`submit_anilist_redirect`** tool to finish.
193
193
 
194
194
  That's it. The token is saved locally (`~/.config/anilist-mcp-server/tokens.json`,
195
195
  `0600`). AniList access tokens don't expire for about a year and there's no
196
- refresh mechanism — you'll need to run `login_anilist` again once it does.
196
+ refresh mechanism, so you'll need to run `login_anilist` again once it does.
197
197
 
198
198
  > **Prefer no interactive step?** Pre-set a standalone `ANILIST_ACCESS_TOKEN`
199
199
  > instead. See [docs/auth.md](https://github.com/Grinv/anilist-mcp-server/blob/main/docs/auth.md).
200
200
 
201
201
  ## Configuration
202
202
 
203
- All configuration is via environment variables, all optional — without
203
+ All configuration is via environment variables, all optional; without
204
204
  credentials the read tools still work.
205
205
 
206
206
  | Variable | Purpose |
207
207
  | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
208
- | `ANILIST_CLIENT_ID` | Your AniList app's Client ID — see [Connect your AniList account](#connect-your-anilist-account). |
208
+ | `ANILIST_CLIENT_ID` | Your AniList app's Client ID (see [Connect your AniList account](#connect-your-anilist-account)). |
209
209
  | `ANILIST_CLIENT_SECRET` | Your AniList app's Client Secret, paired with the Client ID above. |
210
210
  | `ANILIST_ACCESS_TOKEN` | _Advanced, optional._ Pre-supply a token instead of running `login_anilist`. See [docs/auth.md](https://github.com/Grinv/anilist-mcp-server/blob/main/docs/auth.md). |
211
211
  | `ANILIST_TOKEN_STORE` | Override where the login token is saved on disk (default: your OS's config folder). |
212
- | `ANILIST_OAUTH_PORT` | Only needed if port `8082` is already in use — see step 1 of the [account walkthrough](#connect-your-anilist-account). |
212
+ | `ANILIST_OAUTH_PORT` | Only needed if port `8082` is already in use (see step 1 of the [account walkthrough](#connect-your-anilist-account)). |
213
213
  | `LOG_LEVEL` | How much the server logs: `debug` \| `info` \| `warn` \| `error` \| `silent` (default `info`). |
214
214
 
215
215
  ### Tuning (rarely needed)
216
216
 
217
- | Variable | Purpose |
218
- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
219
- | `ANILIST_MIN_INTERVAL_MS` | Min spacing between AniList calls (default `2100`, i.e. ~30/min — AniList's API is currently in a documented degraded state; see [docs/api-references.md](https://github.com/Grinv/anilist-mcp-server/blob/main/docs/api-references.md)). Set to `0` to disable client-side throttling. |
220
- | `CACHE_TTL_MS` | TTL for the in-memory read cache (default `300000` = 5 min). |
221
- | `HTTP_TIMEOUT_MS`, `HTTP_RETRIES` | Per-request timeout (default `15000`) and retry attempts for transient failures (default `2`). |
222
- | `ANILIST_GRAPHQL_URL`, `ANILIST_OAUTH_BASE_URL` | Override upstream base URLs. |
217
+ | Variable | Purpose |
218
+ | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
219
+ | `ANILIST_MIN_INTERVAL_MS` | Min spacing between AniList calls (default `2100`, i.e. ~30/min, since AniList's API is currently in a documented degraded state; see [docs/api-references.md](https://github.com/Grinv/anilist-mcp-server/blob/main/docs/api-references.md)). Set to `0` to disable client-side throttling. |
220
+ | `CACHE_TTL_MS` | TTL for the in-memory read cache (default `300000` = 5 min). |
221
+ | `HTTP_TIMEOUT_MS`, `HTTP_RETRIES` | Per-request timeout (default `15000`) and retry attempts for transient failures (default `2`). |
222
+ | `ANILIST_GRAPHQL_URL`, `ANILIST_OAUTH_BASE_URL` | Override upstream base URLs. |
223
223
 
224
224
  Provide these in your MCP client config's `env` block (the server does **not**
225
225
  read a `.env` file). See [docs/auth.md](https://github.com/Grinv/anilist-mcp-server/blob/main/docs/auth.md) for how to obtain the
@@ -228,7 +228,7 @@ snippets.
228
228
 
229
229
  ## NSFW content
230
230
 
231
- NSFW (adult) results are **not** filtered by default — the server returns
231
+ NSFW (adult) results are **not** filtered by default; the server returns
232
232
  whatever AniList provides. `search_media` accepts an optional `sfw`
233
233
  parameter; set `sfw: true` to exclude adult entries.
234
234
 
@@ -271,14 +271,14 @@ subject to [AniList's Terms of Service](https://anilist.co/terms).
271
271
 
272
272
  This server runs locally on your machine and has no telemetry of its own.
273
273
  Personal/mutation tools act on your real AniList account (list, favourites,
274
- follows, posts, account settings) using a token you supply — see
274
+ follows, posts, account settings) using a token you supply. See
275
275
  [PRIVACY.md](PRIVACY.md) for the full details on data collection, what gets
276
276
  sent where, caching/token storage and retention, and contact info.
277
277
 
278
278
  ## Security
279
279
 
280
280
  This is the broadest write/social tool surface of this project's sibling
281
- servers — list mutations, favourites, follows, and posting/deleting activity,
281
+ servers: list mutations, favourites, follows, and posting/deleting activity,
282
282
  threads, and comments, all on your real AniList account. See
283
283
  [SECURITY.md](SECURITY.md) for the full mutating-tool inventory, token
284
284
  storage/handling, credential redaction, and how to report a vulnerability.
package/SECURITY.md CHANGED
@@ -1,29 +1,27 @@
1
1
  # Security
2
2
 
3
- `anilist-mcp-server` talks to **AniList's own GraphQL API only** — but unlike
4
- its read-only sibling servers in this project family, it has the broadest
5
- write/social tool surface of the four: it can post and delete public content,
6
- and change settings, on the real AniList account it's configured with.
3
+ `anilist-mcp-server` only talks to AniList's own GraphQL API. But of this
4
+ project's four sibling servers, it has the widest write/social surface: it can
5
+ post and delete public content, and change account settings, on the AniList
6
+ account it's configured with.
7
7
 
8
8
  ## Public reads vs. authenticated writes
9
9
 
10
10
  - **No credential needed** for search/details, characters/staff/studios,
11
11
  genres/tags, reviews/recommendations, forum threads, activity feeds, and
12
- public/unlisted user profiles and lists — these call AniList's public
12
+ public/unlisted user profiles and lists. These call AniList's public
13
13
  GraphQL endpoint directly.
14
14
  - **Personal-list and social tools require the user's own OAuth access
15
15
  token** (`ANILIST_ACCESS_TOKEN`, or one obtained via `login_anilist`).
16
16
  Without one, every tool in that category returns an actionable error
17
- instead of a doomed request — see [docs/auth.md](docs/auth.md) for the
18
- three credential tiers.
17
+ instead of trying the request anyway. See [docs/auth.md](docs/auth.md) for
18
+ the three credential tiers.
19
19
 
20
20
  ## The mutating tool surface
21
21
 
22
- These 13 tools all perform a real, live mutation against
23
- `graphql.anilist.co` the moment they're called, with no separate
24
- confirmation step of the server's own, and every one of them requires the
25
- caller's own valid access token — there is no cross-user write capability
26
- anywhere in this server:
22
+ These 13 tools each write to `graphql.anilist.co` when called, with no
23
+ confirmation step of the server's own. Each one needs the caller's own access
24
+ token; the server can't write to anyone else's account:
27
25
 
28
26
  - **List entries**: `add_list_entry`, `update_list_entry`, `remove_list_entry`
29
27
  - **Favourites and follows**: `toggle_favourite`, `toggle_follow_user`
@@ -32,69 +30,67 @@ anywhere in this server:
32
30
  - **Deleting**: `delete_activity`, `delete_thread`, `delete_thread_comment`
33
31
  - **Account settings**: `update_user`
34
32
 
35
- **Posting and deleting activity, threads, and comments happens on the real
36
- user's real AniList account**, publicly visible to other AniList users and
37
- attributed to that account, exactly as if they'd been posted directly on
38
- anilist.co. There is no tool-level allow/deny list beyond "is a token
39
- configured" — if the calling AI model decides to invoke one of these tools,
40
- the mutation happens. Review what an AI agent intends to do before
41
- authorizing it to act with a write-capable token, the same way you would
42
- before granting any other tool access to a real account.
33
+ **Posts and deletions go to your own AniList account**, public and attributed
34
+ to you just like anything you post on anilist.co directly. The server has no
35
+ per-tool allow/deny list; the only gate is whether a token is configured, so
36
+ if the model calls one of these tools, the write goes through. Treat a
37
+ write-capable token like any other access to a real account, and check what
38
+ the agent means to do before letting it act.
43
39
 
44
40
  ## Token storage
45
41
 
46
- - A token obtained via `login_anilist` is written to a single local file —
47
- `~/.config/anilist-mcp-server/tokens.json` on macOS/Linux,
42
+ - A token obtained via `login_anilist` is written to a single local file
43
+ (`~/.config/anilist-mcp-server/tokens.json` on macOS/Linux,
48
44
  `%APPDATA%\anilist-mcp-server\tokens.json` on Windows, or the path in
49
- `ANILIST_TOKEN_STORE` — created with `0600` permissions (owner-read/write
45
+ `ANILIST_TOKEN_STORE`), created with `0600` permissions (owner-read/write
50
46
  only). Pre-supplying `ANILIST_ACCESS_TOKEN` directly instead keeps the
51
- token in memory only for that run; it is never written to this file.
52
- - **Caveat**: `writeFileSync(..., { mode: 0o600 })` (`src/lib/tokenStore.ts`)
53
- only applies that mode when the file is _created_. If the file already
54
- exists with looser permissions (e.g. copied in from elsewhere, or created
55
- by a different process/user), overwriting it does not retroactively
56
- tighten those permissions. Verify the file's mode yourself if you have any
57
- reason to suspect it wasn't created by this server.
58
- - AniList issues no refresh token — access tokens are long-lived JWTs
59
- (~1 year, read from the token's own `exp` claim). Re-running
47
+ token in memory for that run only; it is never written to this file.
48
+ - On POSIX, every save also re-applies `0600` to the file after writing
49
+ (`chmodSync`, `src/lib/tokenStore.ts`). `writeFileSync`'s `mode` argument
50
+ only takes effect when the file is _created_, so a `tokens.json` copied in
51
+ from elsewhere, or left with looser permissions by another process, gets
52
+ tightened back to owner-only on the next save instead of keeping its old
53
+ mode. Windows has no POSIX-mode equivalent; there the file inherits the
54
+ directory's ACLs.
55
+ - AniList issues no refresh token. Access tokens are long-lived JWTs
56
+ (about a year, read from the token's own `exp` claim), and re-running
60
57
  `login_anilist` is the only way to renew one.
61
- - `login_anilist` never sees your AniList password: it opens AniList's own
62
- authorize page in your browser, where you sign in and approve directly
63
- with AniList, which then redirects back with a one-time code. The server
64
- exchanges that code (plus your `ANILIST_CLIENT_ID`/`ANILIST_CLIENT_SECRET`)
65
- for an access token at AniList's token endpoint — never a password.
58
+ - `login_anilist` never sees your AniList password. It opens AniList's own
59
+ authorize page in your browser, where you sign in and approve with AniList
60
+ directly; AniList then redirects back with a one-time code. The server
61
+ trades that code (plus your `ANILIST_CLIENT_ID`/`ANILIST_CLIENT_SECRET`) for
62
+ an access token at AniList's token endpoint. Your password never reaches
63
+ the server.
66
64
 
67
65
  ## Env-configurable endpoints
68
66
 
69
67
  `ANILIST_GRAPHQL_URL` (default `https://graphql.anilist.co`) and
70
- `ANILIST_OAUTH_BASE_URL` (default `https://anilist.co/api/v2/oauth`) are
71
- fixed once at server startup from the environment — there is no tool
72
- parameter that lets a caller redirect a request to a different host at call
73
- time. That said, there is also no host allowlist: if you (or whatever
74
- deploys this server) point either of these at something other than AniList's
75
- real infrastructure, every GraphQL request — including the bearer token on
76
- every authenticated call, and the `client_id`/`client_secret` sent during the
77
- OAuth token exchange — goes to that host instead. Only set these to a host
78
- you trust with those credentials.
68
+ `ANILIST_OAUTH_BASE_URL` (default `https://anilist.co/api/v2/oauth`) are set
69
+ once at server startup from the environment; no tool parameter can redirect a
70
+ request to a different host at call time. There is no host allowlist either,
71
+ though: if you (or whatever deploys this server) point either variable at
72
+ something other than AniList's real infrastructure, every GraphQL request goes
73
+ there instead, bearer token and all, along with the
74
+ `client_id`/`client_secret` sent during the OAuth token exchange. Only point
75
+ these at a host you trust with those credentials.
79
76
 
80
77
  ## Credential redaction
81
78
 
82
- Log lines (stderr only, never a file or a remote endpoint) are passed
83
- through `redact()` (`src/lib/errors.ts`) before being written, which strips
79
+ Log lines (stderr only, never a file or a remote endpoint) pass through
80
+ `redact()` (`src/lib/errors.ts`) before they're written. It strips
84
81
  `Authorization: Bearer ...` headers and `access_token`/`refresh_token`/
85
82
  `client_secret`/`client_id` values in both `key=value` and JSON
86
- (`"key":"value"`) shapes — the latter matches the actual shape of this
87
- server's own OAuth token exchange request body
88
- (`src/clients/anilist.ts`'s `#completeWithCode`), even though no current
89
- logging call site logs that body directly.
83
+ (`"key":"value"`) form. The JSON form matches this server's own OAuth
84
+ token-exchange request body (`src/clients/anilist.ts`'s `#completeWithCode`),
85
+ even though no logging call site currently logs that body.
90
86
 
91
87
  ## Reporting a vulnerability
92
88
 
93
89
  Open a [GitHub issue](https://github.com/Grinv/anilist-mcp-server/issues) or,
94
90
  for anything sensitive, email the address on the maintainer's GitHub profile
95
91
  (<https://github.com/Grinv>). Please don't file public issues for
96
- vulnerabilities that could affect other users' AniList accounts before
97
- there's a fix available.
92
+ vulnerabilities that could affect other users' AniList accounts before a fix
93
+ is available.
98
94
 
99
95
  Not affiliated with AniList. "AniList" is a trademark of its respective
100
96
  owner.