anilist-mcp-server 0.7.0 → 0.8.0
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 +31 -0
- package/PRIVACY.md +70 -78
- package/README.md +28 -28
- package/SECURITY.md +50 -54
- package/dist/index.js +68 -65
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,37 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.8.0] - 2026-08-16
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Add `includeDescription` to `search_character`, `search_staff` and `get_todays_birthdays`, for the bio they no longer fetch by default. [9e93b12](https://github.com/Grinv/anilist-mcp-server/commit/9e93b12)
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Stop fetching each entry's bio by default in `search_character`/`search_staff`/`get_todays_birthdays`, cutting a typical response by 70-80%. [9e93b12](https://github.com/Grinv/anilist-mcp-server/commit/9e93b12)
|
|
18
|
+
- Return every settable field from `add_list_entry`/`update_list_entry`, so a write can be verified without a follow-up read. [4bd3659](https://github.com/Grinv/anilist-mcp-server/commit/4bd3659)
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- Give the `hidden_gems` prompt an explicit score sort and filters; without them its plan browsed AniList's default id order. [3336714](https://github.com/Grinv/anilist-mcp-server/commit/3336714)
|
|
23
|
+
- Drop an empty `statusText` from the upstream error message, which read "HTTP 404 : Not Found." [2ab798b](https://github.com/Grinv/anilist-mcp-server/commit/2ab798b)
|
|
24
|
+
|
|
25
|
+
## [0.7.1] - 2026-07-31
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- 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)
|
|
30
|
+
- 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)
|
|
31
|
+
- 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)
|
|
32
|
+
- 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)
|
|
33
|
+
- 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)
|
|
34
|
+
|
|
35
|
+
### Security
|
|
36
|
+
|
|
37
|
+
- 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)
|
|
38
|
+
- 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)
|
|
39
|
+
|
|
9
40
|
## [0.7.0] - 2026-07-30
|
|
10
41
|
|
|
11
42
|
### Changed
|
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
|
|
7
|
-
|
|
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
|
|
11
|
-
|
|
12
|
-
|
|
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
|
|
19
|
-
accounts, and sends nothing to its maintainer or to any analytics
|
|
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
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
`login_anilist`, on disk
|
|
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
|
|
42
|
-
infrastructure
|
|
43
|
-
|
|
44
|
-
|
|
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**,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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
|
-
|
|
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`
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
|
|
88
|
-
- **The login flow
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
`ANILIST_CLIENT_ID`/`ANILIST_CLIENT_SECRET` and
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
Once a request reaches AniList, it
|
|
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
|
-
|
|
99
|
-
|
|
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
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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
|
|
125
|
-
written.
|
|
126
|
-
|
|
127
|
-
-
|
|
128
|
-
lifetime, `anilist-mcp-server`
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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)
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
147
|
-
tools; the personal/mutation tools
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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**
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
|
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
|
|
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
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
the
|
|
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`
|
|
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
|
|
52
|
-
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
|
62
|
-
authorize page in your browser, where you sign in and approve
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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)
|
|
83
|
-
|
|
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"`)
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
|
|
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.
|