togello-mcp-server 1.0.28 → 1.0.31

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
@@ -51,6 +51,8 @@ https://your-domain.example/mcp
51
51
 
52
52
  ChatGPT developer mode can add remote MCP servers that use SSE. For production ChatGPT apps or connectors, use `passthrough` auth or a deployment that authenticates each user separately before forwarding requests to Togello.
53
53
 
54
+ 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.
55
+
54
56
  ## Tools
55
57
 
56
58
  Read-only tools include MCP `readOnlyHint` annotations and return stable JSON in both `structuredContent` and text content.
package/build/index.js CHANGED
@@ -31,6 +31,8 @@ async function main() {
31
31
  }
32
32
  const publicBaseUrl = getRemotePublicBaseUrl(port);
33
33
  const oauthIssuer = getRemoteOAuthIssuer();
34
+ const openaiAppsChallengeToken = getEnvValue('TOGELLO_MCP_OPENAI_APPS_CHALLENGE_TOKEN') ??
35
+ getEnvValue('OPENAI_APPS_CHALLENGE_TOKEN');
34
36
  await startRemoteServer({
35
37
  host,
36
38
  port,
@@ -38,6 +40,7 @@ async function main() {
38
40
  publicBaseUrl,
39
41
  oauthIssuer,
40
42
  sseKeepAliveMs: keepAliveMs,
43
+ openaiAppsChallengeToken,
41
44
  });
42
45
  return;
43
46
  }
@@ -19,6 +19,13 @@ const calendarDateMemoDateSchema = z
19
19
  .regex(/^\d{4}-\d{2}-\d{2}$/, 'Invalid date format, expected YYYY-MM-DD');
20
20
  const readOnlyToolAnnotations = {
21
21
  readOnlyHint: true,
22
+ openWorldHint: false,
23
+ destructiveHint: false,
24
+ };
25
+ const privateWriteToolAnnotations = {
26
+ readOnlyHint: false,
27
+ openWorldHint: false,
28
+ destructiveHint: false,
22
29
  };
23
30
  function withUpstreamToken(cb, resolveUpstreamToken, requireUpstreamToken = false) {
24
31
  return async (args, extra) => {
@@ -77,6 +84,7 @@ export function createMcpServer(options = {}) {
77
84
  .optional()
78
85
  .describe('Optional detail associated with the task.'),
79
86
  },
87
+ annotations: privateWriteToolAnnotations,
80
88
  }, withUpstreamToken(createTaskHandler, options.resolveUpstreamToken, options.requireUpstreamToken));
81
89
  server.registerTool('update-task', {
82
90
  description: 'Updates a task in the TODO feature.',
@@ -110,6 +118,7 @@ export function createMcpServer(options = {}) {
110
118
  .optional()
111
119
  .describe('Optional detail associated with the task. If omitted, the current value is kept.'),
112
120
  },
121
+ annotations: privateWriteToolAnnotations,
113
122
  }, withUpstreamToken(updateTaskHandler, options.resolveUpstreamToken, options.requireUpstreamToken));
114
123
  server.registerTool('get-calendar-date-memo', {
115
124
  description: 'Retrieves a calendar date memo for the specified date. Recognizes target date and memo content.',
@@ -126,6 +135,7 @@ export function createMcpServer(options = {}) {
126
135
  .string()
127
136
  .describe('Memo content for the date. Pass an empty or whitespace-only string to clear the memo.'),
128
137
  },
138
+ annotations: privateWriteToolAnnotations,
129
139
  }, withUpstreamToken(updateCalendarDateMemoHandler, options.resolveUpstreamToken, options.requireUpstreamToken));
130
140
  server.registerTool('get-todo-category-list', {
131
141
  description: 'Retrieves the list of categories from the TODO feature. Recognizes category name / category UUID',
@@ -154,6 +164,7 @@ export function createMcpServer(options = {}) {
154
164
  .string()
155
165
  .describe('You must specify a valid itemName obtained from get-activity-item-list. This tool requires a pre-existing activity item.'),
156
166
  },
167
+ annotations: privateWriteToolAnnotations,
157
168
  }, withUpstreamToken(startActivityLogHandler, options.resolveUpstreamToken, options.requireUpstreamToken));
158
169
  server.registerTool('complete-activity-log', {
159
170
  description: 'Completes an activity log.',
@@ -163,6 +174,7 @@ export function createMcpServer(options = {}) {
163
174
  .uuid()
164
175
  .describe('You must specify a valid activityLogUUID obtained from get-activity-log-list. This tool requires an existing activity log.'),
165
176
  },
177
+ annotations: privateWriteToolAnnotations,
166
178
  }, withUpstreamToken(completeActivityLogHandler, options.resolveUpstreamToken, options.requireUpstreamToken));
167
179
  server.registerTool('get-japan-current-time', {
168
180
  description: 'Returns the current time in Japan (JST).',
@@ -6,6 +6,7 @@ import { isInitializeRequest } from '@modelcontextprotocol/sdk/types.js';
6
6
  import { parseBearerToken } from './bearerToken.js';
7
7
  import { createMcpServer } from './mcpServer.js';
8
8
  const protectedResourceMetadataPath = '/.well-known/oauth-protected-resource';
9
+ const openaiAppsChallengePath = '/.well-known/openai-apps-challenge';
9
10
  const maxRequestBodyBytes = 1_000_000;
10
11
  const supportedScopes = [
11
12
  'offline_access',
@@ -22,6 +23,7 @@ export async function startRemoteServer(options) {
22
23
  const publicBaseUrl = trimTrailingSlash(options.publicBaseUrl);
23
24
  const oauthIssuer = options.oauthIssuer;
24
25
  const protectedResourceMetadataUrl = `${publicBaseUrl}${protectedResourceMetadataPath}`;
26
+ const openaiAppsChallengeToken = options.openaiAppsChallengeToken?.trim();
25
27
  const sseSessions = new Map();
26
28
  const streamableSessions = new Map();
27
29
  const resolveUpstreamToken = (sessionId) => {
@@ -34,6 +36,16 @@ export async function startRemoteServer(options) {
34
36
  const server = createServer(async (req, res) => {
35
37
  try {
36
38
  const requestUrl = new URL(req.url ?? '/', `http://${req.headers.host ?? 'localhost'}`);
39
+ if (requestUrl.pathname === openaiAppsChallengePath) {
40
+ if (req.method === 'OPTIONS') {
41
+ writeOptionsResponse(res);
42
+ return;
43
+ }
44
+ if (req.method === 'GET' && openaiAppsChallengeToken) {
45
+ writeTextResponse(res, openaiAppsChallengeToken);
46
+ return;
47
+ }
48
+ }
37
49
  if (requestUrl.pathname === protectedResourceMetadataPath) {
38
50
  if (req.method === 'OPTIONS') {
39
51
  writeOptionsResponse(res);
@@ -239,6 +251,14 @@ function writeJsonResponse(res, body) {
239
251
  });
240
252
  res.end(JSON.stringify(body));
241
253
  }
254
+ function writeTextResponse(res, body) {
255
+ res.writeHead(200, {
256
+ 'Access-Control-Allow-Origin': '*',
257
+ 'Cache-Control': 'no-store',
258
+ 'Content-Type': 'text/plain; charset=utf-8',
259
+ });
260
+ res.end(body);
261
+ }
242
262
  function writeOptionsResponse(res) {
243
263
  res.writeHead(204, {
244
264
  'Access-Control-Allow-Headers': 'Content-Type, Authorization',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "togello-mcp-server",
4
- "version": "1.0.28",
4
+ "version": "1.0.31",
5
5
  "description": "MCP server for Togello tasks, calendar memos, calendar events, and activity logs.",
6
6
  "main": "build/index.js",
7
7
  "scripts": {