togello-mcp-server 1.0.45 → 1.0.47

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/README.md CHANGED
@@ -67,6 +67,36 @@ The configured OAuth issuer must be an origin URL without a path component.
67
67
 
68
68
  For OpenAI Apps domain verification, set `TOGELLO_MCP_OPENAI_APPS_CHALLENGE_TOKEN` to the verification token. Remote mode then serves it from `/.well-known/openai-apps-challenge` as `text/plain`. If both `TOGELLO_MCP_OPENAI_APPS_CHALLENGE_TOKEN` and `OPENAI_APPS_CHALLENGE_TOKEN` are set, the Togello-scoped variable takes precedence.
69
69
 
70
+ ### Muse host verification (provisional)
71
+
72
+ Remote mode supports an independent opt-in `TOGELLO_MCP_MUSE_CHALLENGE_TOKEN`.
73
+ Unset or empty disables the route. A configured token must contain 1–256 ASCII
74
+ letters, digits, underscores or hyphens; whitespace, dots, slashes, percent escapes
75
+ and other characters are rejected at startup without logging the value. Values
76
+ are never trimmed or decoded. There is no fallback to the OpenAI Apps token.
77
+
78
+ With the explicit dummy token `dummy-muse-token`, only
79
+ `GET /.well-known/muse-challenge/dummy-muse-token` returns HTTP 200,
80
+ `Content-Type: text/plain; charset=utf-8`, `Cache-Control: no-store` and exactly
81
+ `muse-challenge=dummy-muse-token` (no newline). It requires no authentication and
82
+ performs no redirect or upstream/file lookup. Other tokens, query strings,
83
+ encoded or normalized path variants, and other methods receive 404. Existing
84
+ OpenAI Apps verification, OAuth metadata and MCP authentication remain independent.
85
+
86
+ The [official connector guidelines](https://platform.muse.ai/docs) describe the
87
+ submission process. The exact challenge path and body above follow an
88
+ [applicant's first-hand report](https://reviewtimes.fyi/muse#how-review-works),
89
+ not a confirmed official wire specification. Before enabling this setting,
90
+ compare the actual submission UI's issued URL, token and required body with this
91
+ provisional contract. If the format differs or the token fails validation, leave
92
+ it disabled and update the implementation; do not weaken validation or guess a
93
+ value. No real challenge has been issued or verified by this implementation.
94
+
95
+ The MCP handler does not log challenge values or request paths. Reverse proxies,
96
+ CDNs and hosting access logs are outside this handler's control; ensure their
97
+ logging policy also protects the token before enabling verification. Remove the
98
+ setting after verification or expiration and restart the server.
99
+
70
100
  ## Tools
71
101
 
72
102
  All tools set MCP `readOnlyHint`, `openWorldHint`, and `destructiveHint` annotations explicitly. Read-only tools return stable JSON in both `structuredContent` and text content.
@@ -77,9 +107,11 @@ All tools set MCP `readOnlyHint`, `openWorldHint`, and `destructiveHint` annotat
77
107
  - `get-today-calendar`: Retrieves linked Google Calendar events and scheduled tasks.
78
108
  - `get-activity-item-list`: Retrieves enabled activity items.
79
109
  - `get-activity-log-list`: Retrieves activity logs.
80
- - `get-active-gathers`: Retrieves active scheduling polls created or previously viewed by the authenticated user, using `GET /v2/gathers`. Takes no arguments. Unconfirmed polls are active through their adjustment end time; confirmed events and recruitments are active through their start time, inclusive. Already-started events are excluded even if they have not ended. Missing or invalid eligibility dates are excluded. Results retain API ordering and contain only UUID, title, mode, adjustment and confirmed timestamps, participant counts, and relationship type. Returns `{ "gathers": [] }` when none qualify; API failures are errors.
110
+ - `list-active-scheduling-polls`: Lists active scheduling polls (ADJUSTMENT), confirmed events (CONFIRM), and recruitments (RECRUITMENT) created or previously viewed by the authenticated user, using `GET /v2/gathers`. Takes no arguments. Unconfirmed polls are active through their adjustment end time; confirmed events and recruitments are active through their start time, inclusive. Already-started events are excluded even if they have not ended. Missing or invalid eligibility dates are excluded. Results retain API ordering and contain only UUID, title, mode, adjustment and confirmed timestamps, participant counts, and relationship type. Returns `{ "gathers": [] }` when none qualify; API failures are errors.
81
111
  - `get-japan-current-time`: Returns the current time in Japan.
82
112
 
113
+ The former tool ID `get-active-gathers` has been replaced by `list-active-scheduling-polls`; clients that store the old ID must update it. No compatibility alias is provided.
114
+
83
115
  Write tools return JSON. Failed tool responses also return JSON and are marked with `isError: true`. Tools that can overwrite existing private Togello data set `destructiveHint: true`; create/start tools set `destructiveHint: false`.
84
116
 
85
117
  - `create-task`: Creates a TODO task.
@@ -91,11 +123,21 @@ Write tools return JSON. Failed tool responses also return JSON and are marked w
91
123
 
92
124
  ## Development
93
125
 
126
+ With [mise](https://mise.jdx.dev/) installed, trust this repository's configuration once:
127
+
128
+ ```bash
129
+ mise trust
130
+ ```
131
+
132
+ Then build or run the tests:
133
+
94
134
  ```bash
95
- npm ci
96
- npm test
135
+ mise run build
136
+ mise run test
97
137
  ```
98
138
 
139
+ These tasks install the Node.js version pinned in `mise.toml` and run `npm ci --include=dev` before building. TypeScript's `tsc` comes from the project's development dependencies; no global TypeScript installation is needed, including when `NODE_ENV=production` is set.
140
+
99
141
  The protocol tests exercise SDK v2 modern clients and SDK v1.32.2 legacy clients over stdio, Streamable HTTP, and legacy SSE against a local mock API. They verify the 12 existing tool contracts and the added deletion and active scheduling poll tools, read/write/delete results, request credential isolation, protocol header errors, body limits, metadata, and legacy session lifecycle. `test/fixtures/v1-tools.json` records `tools/list` from server 1.0.42 at commit `558c2c2fda81f7c8b20f443afa1bf5e554a72dad`; comparisons allow the SDK's JSON Schema dialect and wire-format changes.
100
142
 
101
143
  SDK-facing schemas use Zod 4. UUID fields retain the prior permissive UUID syntax, and date-time fields retain their previous Zod 3 validation through the compatibility export included in the Zod package.
@@ -107,8 +149,18 @@ https://mcpreview.com/mcp-servers/toru-takagi/togello-mcp-server
107
149
 
108
150
  ## Publish
109
151
 
152
+ After running `mise trust` once, run this command from an interactive terminal to increment the version in the local `package.json` and publish it:
153
+
110
154
  ```bash
111
- npm run build
112
- npm version patch
113
- npm publish --access public
155
+ mise run patch
114
156
  ```
157
+
158
+ You can also specify an exact unpublished version:
159
+
160
+ ```bash
161
+ mise run release 1.0.46
162
+ ```
163
+
164
+ The release task installs the dependencies, builds the server, and runs the tests. It then checks the current npm login with `npm whoami`. If that check fails, it runs `npm login` and checks again. Complete the browser sign-in with an npm account that can publish this package. Once npm confirms the login, the task updates `package.json` and `package-lock.json` and publishes with `--access public`. npm may request two-factor authentication during publishing.
165
+
166
+ The task does not create a Git commit or tag. Version changes and generated `build/` files remain in the working tree for review and commit. If publishing fails after the version changes, fix the failure and retry with `mise run release <version>`, using the exact version now in `package.json`. Running `mise run patch` again increments it again. If that version is already published, choose a new version.
package/build/index.js CHANGED
@@ -41,6 +41,7 @@ async function main() {
41
41
  oauthIssuer,
42
42
  sseKeepAliveMs: keepAliveMs,
43
43
  openaiAppsChallengeToken,
44
+ museChallengeToken: process.env.TOGELLO_MCP_MUSE_CHALLENGE_TOKEN,
44
45
  });
45
46
  return;
46
47
  }
@@ -241,8 +241,8 @@ export function createMcpServer(options = {}) {
241
241
  inputSchema: z.object({}),
242
242
  annotations: readOnlyToolAnnotations,
243
243
  }, withUpstreamToken(getJapanCurrentTimeHandler, options.resolveUpstreamToken, options.requireUpstreamToken));
244
- server.registerTool('get-active-gathers', {
245
- description: 'Retrieves active scheduling polls created or previously viewed by the authenticated user. Unconfirmed polls remain active until the adjustment end time; confirmed events and recruitments remain active until their start time, inclusive. Events that have already started are excluded.',
244
+ server.registerTool('list-active-scheduling-polls', {
245
+ description: 'Lists active scheduling polls (ADJUSTMENT), confirmed events (CONFIRM), and recruitments (RECRUITMENT) created or previously viewed by the authenticated user. Unconfirmed polls remain active until the adjustment end time; confirmed events and recruitments remain active until their start time, inclusive. Events that have already started are excluded.',
246
246
  inputSchema: z.strictObject({}),
247
247
  annotations: readOnlyToolAnnotations,
248
248
  }, withUpstreamToken(getActiveGathersHandler, options.resolveUpstreamToken, options.requireUpstreamToken));
@@ -13,6 +13,7 @@ const authorizationServerMetadataCorsHeaders = {
13
13
  };
14
14
  const protectedResourceMetadataPath = '/.well-known/oauth-protected-resource';
15
15
  const openaiAppsChallengePath = '/.well-known/openai-apps-challenge';
16
+ const museChallengePrefix = '/.well-known/muse-challenge/';
16
17
  const maxRequestBodyBytes = 1_000_000;
17
18
  const supportedScopes = [
18
19
  'offline_access',
@@ -23,6 +24,15 @@ const supportedScopes = [
23
24
  'calendar:read',
24
25
  ];
25
26
  export async function startRemoteServer(options) {
27
+ const museChallengeToken = options.museChallengeToken;
28
+ if (museChallengeToken !== undefined &&
29
+ museChallengeToken !== '' &&
30
+ !/^[A-Za-z0-9_-]{1,256}$/.test(museChallengeToken)) {
31
+ throw new Error('Invalid TOGELLO_MCP_MUSE_CHALLENGE_TOKEN');
32
+ }
33
+ const museChallengePath = museChallengeToken
34
+ ? `${museChallengePrefix}${museChallengeToken}`
35
+ : undefined;
26
36
  const mcpPath = options.mcpPath ?? '/mcp';
27
37
  const ssePath = options.ssePath ?? '/sse';
28
38
  const messagePath = options.messagePath ?? '/message';
@@ -77,6 +87,15 @@ export async function startRemoteServer(options) {
77
87
  });
78
88
  const server = createServer(async (req, res) => {
79
89
  try {
90
+ if (req.url?.startsWith(museChallengePrefix)) {
91
+ if (req.method === 'GET' && req.url === museChallengePath) {
92
+ writeTextResponse(res, `muse-challenge=${museChallengeToken}`);
93
+ }
94
+ else {
95
+ res.writeHead(404).end('Not found');
96
+ }
97
+ return;
98
+ }
80
99
  const requestUrl = new URL(req.url ?? '/', `http://${req.headers.host ?? 'localhost'}`);
81
100
  if (requestUrl.pathname === openaiAppsChallengePath) {
82
101
  if (req.method === 'OPTIONS') {
@@ -220,8 +239,8 @@ export async function startRemoteServer(options) {
220
239
  }
221
240
  res.writeHead(404).end('Not found');
222
241
  }
223
- catch (error) {
224
- console.error('Remote server error:', error);
242
+ catch {
243
+ console.error('Remote server error');
225
244
  if (!res.headersSent) {
226
245
  res.writeHead(500);
227
246
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "togello-mcp-server",
4
- "version": "1.0.45",
4
+ "version": "1.0.47",
5
5
  "description": "MCP server for Togello tasks, calendar memos, calendar events, and activity logs.",
6
6
  "main": "build/index.js",
7
7
  "scripts": {