@basicbit/vrchat-mcp 0.1.3 → 0.1.5
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 +9 -0
- package/README.md +144 -166
- package/dist/package.json +1 -1
- package/dist/src/auth/cookieStore.js +42 -11
- package/dist/src/auth/cookieStore.js.map +1 -1
- package/dist/src/config/defaults.json +1 -1
- package/package.json +1 -1
- package/server.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.5 - 2026-05-19
|
|
4
|
+
|
|
5
|
+
- Correct the MCP Registry package metadata so the npm package entry points at the published release version.
|
|
6
|
+
|
|
7
|
+
## 0.1.4 - 2026-05-18
|
|
8
|
+
|
|
9
|
+
- Default authentication cookie storage to the OS keychain, with file storage fallback when the keychain backend is unavailable.
|
|
10
|
+
- Rewrite the README around consumer install paths, client-specific MCP config, login, and core tools.
|
|
11
|
+
|
|
3
12
|
## 0.1.3 - 2026-05-17
|
|
4
13
|
|
|
5
14
|
- Simplify registry-visible configuration to the common user-facing environment variables.
|
package/README.md
CHANGED
|
@@ -4,76 +4,58 @@
|
|
|
4
4
|
|
|
5
5
|
# VRChat MCP
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Unofficial [Model Context Protocol](https://modelcontextprotocol.io/) tools for VRChat friends, worlds, groups, events, notifications, status, invites, and local VRCX history.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
[](https://www.npmjs.com/package/@basicbit/vrchat-mcp) [](./LICENSE)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
VRChat MCP runs locally through stdio. Your VRChat auth cookies stay on your machine and default to your OS keychain, with file storage as the fallback when a keychain backend is unavailable.
|
|
12
12
|
|
|
13
13
|
This project is unofficial and is not affiliated with VRChat Inc.
|
|
14
14
|
|
|
15
|
-
##
|
|
16
|
-
|
|
17
|
-
- List online friends and their locations.
|
|
18
|
-
- Show your current VRChat status and location.
|
|
19
|
-
- Look up a friend by display name.
|
|
20
|
-
- Search worlds and return IDs for follow-up calls.
|
|
21
|
-
- List public and group calendar events.
|
|
22
|
-
- Summarize active group instances.
|
|
23
|
-
- Read recent notifications.
|
|
24
|
-
- Read local VRCX memos and recent world visit history, if VRCX is installed.
|
|
25
|
-
- Invite yourself to a known instance, or invite a friend.
|
|
26
|
-
|
|
27
|
-
## Write Controls
|
|
28
|
-
|
|
29
|
-
- Write tools are enabled by default so the MCP works without extra setup.
|
|
30
|
-
- Set `writes.allow = false` or `VRCHAT_MCP_ALLOW_WRITES=false` for read-only mode.
|
|
31
|
-
- Group write tools can be limited to specific group IDs with `groups.allowlist`.
|
|
32
|
-
- Authentication cookies can stay in memory, in a local file, or in the OS keychain.
|
|
33
|
-
- Logs go to stderr so stdout remains reserved for MCP protocol messages.
|
|
34
|
-
- Live tests, live smoke checks, and LLM evals are opt-in and use local fixture files.
|
|
35
|
-
|
|
36
|
-
## Quick Start
|
|
15
|
+
## Install
|
|
37
16
|
|
|
38
17
|
Requirements:
|
|
39
18
|
|
|
40
|
-
- Node.js 24.15.0 or newer.
|
|
41
|
-
- An MCP client
|
|
19
|
+
- Node.js 24.15.0 or newer.
|
|
20
|
+
- An MCP client that can run local stdio servers.
|
|
21
|
+
|
|
22
|
+
On headless Linux or containers without a keychain daemon such as `libsecret`, set `VRCHAT_MCP_COOKIE_STORE=file` for explicit persistent cookie storage.
|
|
42
23
|
|
|
43
|
-
|
|
24
|
+
The npm package is the normal install path:
|
|
44
25
|
|
|
45
26
|
```bash
|
|
46
27
|
npx -y @basicbit/vrchat-mcp
|
|
47
28
|
```
|
|
48
29
|
|
|
49
|
-
|
|
30
|
+
The server is also published to the official MCP Registry as `io.github.BASIC-BIT/vrchat-mcp`.
|
|
50
31
|
|
|
51
|
-
|
|
32
|
+
## MCP Client Config
|
|
52
33
|
|
|
53
|
-
|
|
54
|
-
git clone https://github.com/BASIC-BIT/vrchat-mcp.git
|
|
55
|
-
cd vrchat-mcp
|
|
56
|
-
npm install
|
|
57
|
-
npm run build
|
|
58
|
-
```
|
|
34
|
+
Most clients use one of these shapes. No environment variables are required for the default setup.
|
|
59
35
|
|
|
60
|
-
|
|
36
|
+
### OpenCode
|
|
61
37
|
|
|
62
|
-
|
|
38
|
+
OpenCode uses an array-valued `command` field.
|
|
63
39
|
|
|
64
|
-
|
|
40
|
+
Add this to `~/.config/opencode/opencode.json`:
|
|
65
41
|
|
|
66
|
-
```
|
|
67
|
-
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"mcp": {
|
|
45
|
+
"vrchat": {
|
|
46
|
+
"type": "local",
|
|
47
|
+
"command": ["npx", "-y", "@basicbit/vrchat-mcp"],
|
|
48
|
+
"enabled": true
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
68
52
|
```
|
|
69
53
|
|
|
70
|
-
|
|
54
|
+
### Claude Desktop, Cursor, Kiro, Roo, Windsurf
|
|
71
55
|
|
|
72
|
-
|
|
56
|
+
These clients usually split the executable into `command` plus `args`.
|
|
73
57
|
|
|
74
|
-
Use
|
|
75
|
-
|
|
76
|
-
For the npm package:
|
|
58
|
+
Use this in clients that expect an `mcpServers` object:
|
|
77
59
|
|
|
78
60
|
```json
|
|
79
61
|
{
|
|
@@ -86,180 +68,176 @@ For the npm package:
|
|
|
86
68
|
}
|
|
87
69
|
```
|
|
88
70
|
|
|
89
|
-
|
|
71
|
+
### VS Code
|
|
72
|
+
|
|
73
|
+
VS Code uses a `servers` object instead of `mcpServers`.
|
|
90
74
|
|
|
91
|
-
|
|
75
|
+
Use this in `.vscode/mcp.json`:
|
|
92
76
|
|
|
93
77
|
```json
|
|
94
78
|
{
|
|
95
|
-
"
|
|
79
|
+
"servers": {
|
|
96
80
|
"vrchat": {
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"VRCHAT_MCP_USER_AGENT": "your-name (email@example.com)",
|
|
101
|
-
"VRCHAT_MCP_COOKIE_STORE": "file"
|
|
102
|
-
}
|
|
81
|
+
"type": "stdio",
|
|
82
|
+
"command": "npx",
|
|
83
|
+
"args": ["-y", "@basicbit/vrchat-mcp"]
|
|
103
84
|
}
|
|
104
85
|
}
|
|
105
86
|
}
|
|
106
87
|
```
|
|
107
88
|
|
|
108
|
-
|
|
89
|
+
### OpenAI Codex
|
|
109
90
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
"VRCHAT_MCP_USER_AGENT": "your-name (email@example.com)",
|
|
118
|
-
"VRCHAT_MCP_COOKIE_STORE": "file"
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
91
|
+
Add this to `~/.codex/config.toml` or `.codex/config.toml`:
|
|
92
|
+
|
|
93
|
+
```toml
|
|
94
|
+
[mcp_servers.vrchat]
|
|
95
|
+
command = "npx"
|
|
96
|
+
args = ["-y", "@basicbit/vrchat-mcp"]
|
|
97
|
+
startup_timeout_sec = 40
|
|
123
98
|
```
|
|
124
99
|
|
|
125
|
-
|
|
100
|
+
If your Windows client cannot spawn `npx` directly, use `cmd` as the command and put `/c`, `npx`, `-y`, and `@basicbit/vrchat-mcp` in the argument list.
|
|
126
101
|
|
|
127
|
-
|
|
102
|
+
## Login
|
|
128
103
|
|
|
129
|
-
|
|
104
|
+
After adding the server to your MCP client, ask it to call `vrchat_auth_begin`. The tool returns a local browser login URL.
|
|
130
105
|
|
|
131
|
-
|
|
106
|
+
After logging in, call `vrchat_auth_status` to confirm the session. By default, cookies are stored in the OS keychain so the login survives MCP server restarts. If the OS keychain is unavailable, VRChat MCP falls back to file storage.
|
|
132
107
|
|
|
133
|
-
|
|
134
|
-
{
|
|
135
|
-
"api": { "userAgent": "your-name (email@example.com)" },
|
|
136
|
-
"auth": { "cookieStore": "file" },
|
|
137
|
-
"writes": { "allow": false },
|
|
138
|
-
"groups": { "allowlist": ["grp_abc123"] },
|
|
139
|
-
"cache": { "enabled": true }
|
|
140
|
-
}
|
|
141
|
-
```
|
|
108
|
+
Useful auth tools:
|
|
142
109
|
|
|
143
|
-
|
|
110
|
+
- `vrchat_auth_begin`: start local browser login.
|
|
111
|
+
- `vrchat_auth_status`: check whether the server is logged in.
|
|
112
|
+
- `vrchat_auth_logout`: clear the stored session.
|
|
144
113
|
|
|
145
|
-
|
|
114
|
+
## What You Can Ask
|
|
115
|
+
|
|
116
|
+
Examples:
|
|
146
117
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
118
|
+
```txt
|
|
119
|
+
Show my VRChat status and current location.
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
```txt
|
|
123
|
+
Which friends are online, grouped by world?
|
|
124
|
+
```
|
|
153
125
|
|
|
154
|
-
|
|
126
|
+
```txt
|
|
127
|
+
Search my friends for Alice and show their profile.
|
|
128
|
+
```
|
|
155
129
|
|
|
156
|
-
|
|
130
|
+
```txt
|
|
131
|
+
Find public VRChat events happening today.
|
|
132
|
+
```
|
|
157
133
|
|
|
158
|
-
|
|
134
|
+
```txt
|
|
135
|
+
Invite Bob to my current instance.
|
|
136
|
+
```
|
|
159
137
|
|
|
160
|
-
|
|
138
|
+
```txt
|
|
139
|
+
Show recent worlds from my local VRCX history.
|
|
140
|
+
```
|
|
161
141
|
|
|
162
|
-
|
|
142
|
+
## Tools
|
|
163
143
|
|
|
164
|
-
|
|
165
|
-
- Auto-generated read tools named `vrchat_read_<operationId>` for GET operations from the VRChat OpenAPI spec.
|
|
166
|
-
- Auto-generated write tools named `vrchat_write_<operationId>` for non-GET operations. These can be disabled with the write configuration.
|
|
144
|
+
VRChat MCP exposes curated tools for common tasks plus generated tools from the VRChat OpenAPI spec.
|
|
167
145
|
|
|
168
|
-
|
|
146
|
+
Common curated tools include:
|
|
169
147
|
|
|
170
|
-
- `
|
|
171
|
-
- `
|
|
172
|
-
- `
|
|
173
|
-
- `
|
|
148
|
+
- `vrchat_me`
|
|
149
|
+
- `vrchat_friends_overview`
|
|
150
|
+
- `vrchat_friends_search`
|
|
151
|
+
- `vrchat_friend_details`
|
|
152
|
+
- `vrchat_worlds_search`
|
|
153
|
+
- `vrchat_group_profile`
|
|
154
|
+
- `vrchat_events_upcoming`
|
|
155
|
+
- `vrchat_notifications_recent`
|
|
156
|
+
- `vrchat_invite_user_to_me`
|
|
157
|
+
- `vrcx_instances_recent`
|
|
174
158
|
|
|
175
|
-
|
|
159
|
+
Generated tools use these naming patterns:
|
|
176
160
|
|
|
177
|
-
|
|
161
|
+
- `vrchat_read_<operationId>` for GET operations.
|
|
162
|
+
- `vrchat_write_<operationId>` for non-GET operations.
|
|
178
163
|
|
|
179
|
-
|
|
164
|
+
See `docs/tools-guide.md` for a short guide and `docs/tools.md` for the generated catalog.
|
|
180
165
|
|
|
181
|
-
|
|
182
|
-
uvx mcpo --port 8000 --api-key "top-secret" -- node <ABS_PATH_TO_REPO>/dist/bin/cli.js
|
|
183
|
-
```
|
|
166
|
+
## Write Controls
|
|
184
167
|
|
|
185
|
-
|
|
168
|
+
Write tools are enabled by default so client installs work without extra setup. Your MCP client may still ask before executing tool calls, depending on its own permission model.
|
|
186
169
|
|
|
187
|
-
|
|
170
|
+
To force read-only mode, add this `env` fragment inside the server entry for your MCP client:
|
|
188
171
|
|
|
189
|
-
```
|
|
190
|
-
|
|
172
|
+
```json
|
|
173
|
+
{
|
|
174
|
+
"env": {
|
|
175
|
+
"VRCHAT_MCP_ALLOW_WRITES": "false"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
191
178
|
```
|
|
192
179
|
|
|
193
|
-
|
|
180
|
+
For group write tools, you can restrict writes to specific group IDs with a JSON config file:
|
|
194
181
|
|
|
195
|
-
|
|
182
|
+
```json
|
|
183
|
+
{
|
|
184
|
+
"groups": {
|
|
185
|
+
"allowlist": ["grp_abc123"]
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
```
|
|
196
189
|
|
|
197
|
-
|
|
190
|
+
Then set `VRCHAT_MCP_CONFIG_FILE` to that file path in your MCP client config.
|
|
198
191
|
|
|
199
|
-
|
|
200
|
-
- `npm run build`: type-check and emit to `dist/`.
|
|
201
|
-
- `npm run start`: run the built server from `dist/`.
|
|
202
|
-
- `npm run lint`: run ESLint.
|
|
203
|
-
- `npm run typecheck`: type-check without emit.
|
|
204
|
-
- `npm test`: run Vitest.
|
|
205
|
-
- `npm run check`: lint, type-check, and test.
|
|
206
|
-
- `npm run mcp:login`: launch the local login helper.
|
|
207
|
-
- `npm run mcp:status`: check local auth status through the harness.
|
|
208
|
-
- `npm run mcp:logout`: clear the local auth session through the harness.
|
|
209
|
-
- `npm run smoke:live`: run the opt-in read-only live smoke matrix against the built server.
|
|
210
|
-
- `npm run generate:tools-docs`: regenerate `docs/tools.md`.
|
|
211
|
-
- `npm run generate:schemas`: regenerate `src/generated/vrchat-schemas.ts` from the VRChat OpenAPI spec.
|
|
212
|
-
- `npm run generate:test-schemas`: regenerate mock test schemas.
|
|
192
|
+
## Configuration
|
|
213
193
|
|
|
214
|
-
|
|
194
|
+
Configuration is optional. Defaults cover normal local use.
|
|
215
195
|
|
|
216
|
-
|
|
217
|
-
- `src/core/`: VRChat API plumbing, spec parsing, request dispatch, and read helpers.
|
|
218
|
-
- `src/tools/`: MCP tool registration.
|
|
219
|
-
- `src/schemas/`: shared Zod schemas for tool inputs and outputs.
|
|
220
|
-
- `src/generated/`: generated OpenAPI Zod schemas.
|
|
221
|
-
- `src/services/`: domain services for auth, cache, friends, worlds, groups, VRCX, and more.
|
|
222
|
-
- `src/resources/`: MCP resources for snapshots and delta feeds.
|
|
223
|
-
- `src/auth/`: local login flow and cookie storage.
|
|
224
|
-
- `src/infra/`: logging and infrastructure utilities.
|
|
225
|
-
- `src/utils/`: lightweight shared helpers.
|
|
226
|
-
- `docs/`: architecture, tool inventory, evals, and design notes.
|
|
196
|
+
Common environment variables:
|
|
227
197
|
|
|
228
|
-
|
|
198
|
+
| Variable | Use |
|
|
199
|
+
| ------------------------- | -------------------------------------------------------- |
|
|
200
|
+
| `VRCHAT_MCP_CONFIG_FILE` | Path to a JSON config file. |
|
|
201
|
+
| `VRCHAT_MCP_USER_AGENT` | Descriptive user agent for VRChat API requests. |
|
|
202
|
+
| `VRCHAT_MCP_LOG_LEVEL` | `debug`, `info`, `warn`, or `error`. |
|
|
203
|
+
| `VRCHAT_MCP_COOKIE_STORE` | `keychain`, `file`, or `memory`. Defaults to `keychain`. |
|
|
204
|
+
| `VRCHAT_MCP_COOKIE_FILE` | Cookie file path when `VRCHAT_MCP_COOKIE_STORE=file`. |
|
|
205
|
+
| `VRCHAT_MCP_ALLOW_WRITES` | Set to `false` for read-only mode. |
|
|
229
206
|
|
|
230
|
-
|
|
207
|
+
Example JSON config:
|
|
231
208
|
|
|
232
|
-
```
|
|
233
|
-
|
|
209
|
+
```json
|
|
210
|
+
{
|
|
211
|
+
"auth": { "cookieStore": "file" },
|
|
212
|
+
"writes": { "allow": false },
|
|
213
|
+
"groups": { "allowlist": ["grp_abc123"] },
|
|
214
|
+
"cache": { "enabled": true }
|
|
215
|
+
}
|
|
234
216
|
```
|
|
235
217
|
|
|
236
|
-
|
|
218
|
+
See `src/config/defaults.json` for all defaults.
|
|
219
|
+
|
|
220
|
+
## Local Development
|
|
237
221
|
|
|
238
222
|
```bash
|
|
223
|
+
git clone https://github.com/BASIC-BIT/vrchat-mcp.git
|
|
224
|
+
cd vrchat-mcp
|
|
225
|
+
npm install
|
|
239
226
|
npm run build
|
|
240
|
-
npm run
|
|
241
|
-
npm run smoke:live
|
|
227
|
+
npm run check
|
|
242
228
|
```
|
|
243
229
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
- `test/fixtures/e2e.live.json`
|
|
247
|
-
- `test/fixtures/evals.live.json`
|
|
248
|
-
|
|
249
|
-
Prefer keeping live fixture files outside the repository and pointing to them with `VRCHAT_MCP_LIVE_CONFIG_FILE` and `VRCHAT_MCP_EVAL_CONFIG_FILE`. Store LLM API keys in environment variables or a secret manager, not in JSON files.
|
|
250
|
-
|
|
251
|
-
See `docs/evals.md` for the repeatable smoke, LLM, and manual MCP client evaluation workflow.
|
|
230
|
+
Useful scripts:
|
|
252
231
|
|
|
253
|
-
|
|
232
|
+
- `npm run dev`: run from `src/index.ts`.
|
|
233
|
+
- `npm run start`: run the built server from `dist/`.
|
|
234
|
+
- `npm run mcp:login`: start login through the local harness.
|
|
235
|
+
- `npm run mcp:status`: check auth through the local harness.
|
|
236
|
+
- `npm run smoke:live`: run the opt-in live smoke check.
|
|
237
|
+
- `npm run generate:tools-docs`: regenerate `docs/tools.md`.
|
|
238
|
+
- `npm run generate:schemas`: regenerate OpenAPI schemas.
|
|
254
239
|
|
|
255
|
-
- `docs/
|
|
256
|
-
- `docs/tools-guide.md`: short human guide for the tool surface.
|
|
257
|
-
- `docs/architecture.md`: codebase overview and data flow.
|
|
258
|
-
- `docs/curated-tools.md`: curated tool charter and risk tiers.
|
|
259
|
-
- `docs/evals.md`: smoke, LLM, and manual MCP client eval workflow.
|
|
260
|
-
- [`docs/public-launch-plan.md`](https://github.com/BASIC-BIT/vrchat-mcp/blob/main/docs/public-launch-plan.md): release awareness, registry, and launch-channel plan.
|
|
261
|
-
- `docs/vrcx.md`: local VRCX integration notes.
|
|
262
|
-
- `docs/design-notes.md`: archived design notes and future-facing ideas.
|
|
240
|
+
Live E2E tests and LLM evals are opt-in. See `docs/evals.md` for details.
|
|
263
241
|
|
|
264
242
|
## License
|
|
265
243
|
|
package/dist/package.json
CHANGED
|
@@ -78,7 +78,11 @@ class FileStore {
|
|
|
78
78
|
class KeychainStore {
|
|
79
79
|
service = 'vrchat-mcp';
|
|
80
80
|
account = 'default';
|
|
81
|
+
fallback;
|
|
81
82
|
keytar = null;
|
|
83
|
+
constructor(fallback) {
|
|
84
|
+
this.fallback = fallback;
|
|
85
|
+
}
|
|
82
86
|
async ensureKeytar() {
|
|
83
87
|
if (this.keytar)
|
|
84
88
|
return this.keytar;
|
|
@@ -88,38 +92,65 @@ class KeychainStore {
|
|
|
88
92
|
return this.keytar;
|
|
89
93
|
}
|
|
90
94
|
catch (err) {
|
|
91
|
-
logger.warn('keytar not available; falling back to
|
|
95
|
+
logger.warn('keytar not available; falling back to file cookie storage', {
|
|
96
|
+
message: err.message,
|
|
97
|
+
});
|
|
92
98
|
return null;
|
|
93
99
|
}
|
|
94
100
|
}
|
|
95
101
|
async load() {
|
|
96
102
|
const keytar = await this.ensureKeytar();
|
|
97
103
|
if (!keytar)
|
|
98
|
-
return
|
|
99
|
-
|
|
104
|
+
return await this.fallback.load();
|
|
105
|
+
let val;
|
|
106
|
+
try {
|
|
107
|
+
val = await keytar.getPassword(this.service, this.account);
|
|
108
|
+
}
|
|
109
|
+
catch (err) {
|
|
110
|
+
logger.warn('Failed to load cookies from keychain; falling back to file cookie storage', {
|
|
111
|
+
message: err.message,
|
|
112
|
+
});
|
|
113
|
+
return await this.fallback.load();
|
|
114
|
+
}
|
|
100
115
|
if (!val)
|
|
101
|
-
return
|
|
116
|
+
return await this.fallback.load();
|
|
102
117
|
try {
|
|
103
118
|
const obj = JSON.parse(val);
|
|
104
119
|
return await deserializeJar(obj);
|
|
105
120
|
}
|
|
106
121
|
catch (err) {
|
|
107
122
|
logger.warn('Failed to parse keychain cookie data', { message: err.message });
|
|
108
|
-
return
|
|
123
|
+
return await this.fallback.load();
|
|
109
124
|
}
|
|
110
125
|
}
|
|
111
126
|
async save(jar) {
|
|
112
127
|
const keytar = await this.ensureKeytar();
|
|
113
|
-
if (!keytar)
|
|
128
|
+
if (!keytar) {
|
|
129
|
+
await this.fallback.save(jar);
|
|
114
130
|
return;
|
|
131
|
+
}
|
|
115
132
|
const serialized = await serializeJar(jar);
|
|
116
|
-
|
|
133
|
+
try {
|
|
134
|
+
await keytar.setPassword(this.service, this.account, JSON.stringify(serialized));
|
|
135
|
+
}
|
|
136
|
+
catch (err) {
|
|
137
|
+
logger.warn('Failed to save cookies to keychain; falling back to file cookie storage', {
|
|
138
|
+
message: err.message,
|
|
139
|
+
});
|
|
140
|
+
await this.fallback.save(jar);
|
|
141
|
+
}
|
|
117
142
|
}
|
|
118
143
|
async clear() {
|
|
119
144
|
const keytar = await this.ensureKeytar();
|
|
120
|
-
if (
|
|
121
|
-
|
|
122
|
-
|
|
145
|
+
if (keytar) {
|
|
146
|
+
try {
|
|
147
|
+
await keytar.deletePassword(this.service, this.account);
|
|
148
|
+
}
|
|
149
|
+
catch (err) {
|
|
150
|
+
logger.warn('Failed to delete cookies from keychain', { message: err.message });
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
await this.fallback.clear();
|
|
123
154
|
}
|
|
124
155
|
}
|
|
125
156
|
export function getCookieStore() {
|
|
@@ -129,7 +160,7 @@ export function getCookieStore() {
|
|
|
129
160
|
return new FileStore(path.resolve(config.auth.cookieFile));
|
|
130
161
|
}
|
|
131
162
|
if (mode === 'keychain') {
|
|
132
|
-
return new KeychainStore();
|
|
163
|
+
return new KeychainStore(new FileStore(path.resolve(config.auth.cookieFile)));
|
|
133
164
|
}
|
|
134
165
|
return new MemoryStore();
|
|
135
166
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookieStore.js","sourceRoot":"","sources":["../../../src/auth/cookieStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA4B,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAQ5C,KAAK,UAAU,YAAY,CAAC,GAAc;IACxC,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3C,GAAG,C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AC7F,CAAC;QACH,CAAC;QACD,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CACF;AAED,MAAM,UAAU,cAAc;IAC5B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;IACnD,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;QACpB,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;IAC7D,CAAC;IACD,IAAI,IAAI,KAAK,UAAU,EAAE,CAAC;QACxB,OAAO,IAAI,aAAa,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,IAAI,WAAW,EAAE,CAAC;AAC3B,CAAC"}
|
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"source": "github",
|
|
9
9
|
"id": "1122295987"
|
|
10
10
|
},
|
|
11
|
-
"version": "0.1.
|
|
11
|
+
"version": "0.1.5",
|
|
12
12
|
"packages": [
|
|
13
13
|
{
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"identifier": "@basicbit/vrchat-mcp",
|
|
16
|
-
"version": "0.1.
|
|
16
|
+
"version": "0.1.5",
|
|
17
17
|
"transport": {
|
|
18
18
|
"type": "stdio"
|
|
19
19
|
},
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"name": "VRCHAT_MCP_COOKIE_STORE",
|
|
46
|
-
"description": "Cookie storage backend for VRChat authentication.",
|
|
46
|
+
"description": "Cookie storage backend for VRChat authentication. The keychain mode falls back to file storage if the OS keychain is unavailable.",
|
|
47
47
|
"format": "string",
|
|
48
48
|
"choices": ["memory", "file", "keychain"],
|
|
49
|
-
"default": "
|
|
49
|
+
"default": "keychain",
|
|
50
50
|
"isRequired": false,
|
|
51
51
|
"isSecret": false
|
|
52
52
|
},
|