@kintone/mcp-server 1.0.0 → 1.2.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +35 -14
  3. package/dist/{client.js → client/index.js} +4 -9
  4. package/dist/client/types/client.js +1 -0
  5. package/dist/config/command-line.js +2 -1
  6. package/dist/config/index.js +30 -62
  7. package/dist/config/parser.js +72 -0
  8. package/dist/config/schema.js +4 -0
  9. package/dist/config/types/config.js +1 -0
  10. package/dist/index.js +16 -6
  11. package/dist/lib/filesystem.js +47 -0
  12. package/dist/schema/app/field-properties.js +330 -0
  13. package/dist/schema/app/form-layout.js +105 -0
  14. package/dist/schema/app/index.js +3 -0
  15. package/dist/schema/app/properties-parameter.js +638 -0
  16. package/dist/schema/record/index.js +2 -0
  17. package/dist/schema/record/records.js +1 -1
  18. package/dist/server/index.js +17 -0
  19. package/dist/server/tool-filters.js +14 -0
  20. package/dist/server/types/server.js +1 -0
  21. package/dist/tools/factory.js +10 -0
  22. package/dist/tools/index.js +23 -0
  23. package/dist/tools/kintone/app/add-app.js +40 -0
  24. package/dist/tools/kintone/app/add-form-fields.js +50 -0
  25. package/dist/tools/kintone/app/delete-form-fields.js +51 -0
  26. package/dist/tools/kintone/app/deploy-app.js +48 -0
  27. package/dist/tools/kintone/app/get-app-deploy-status.js +42 -0
  28. package/dist/tools/kintone/app/get-app.js +7 -8
  29. package/dist/tools/kintone/app/get-apps.js +7 -8
  30. package/dist/tools/kintone/app/get-form-fields.js +20 -107
  31. package/dist/tools/kintone/app/get-form-layout.js +45 -0
  32. package/dist/tools/kintone/app/get-general-settings.js +119 -0
  33. package/dist/tools/kintone/app/get-process-management.js +12 -8
  34. package/dist/tools/kintone/app/update-form-fields.js +50 -0
  35. package/dist/tools/kintone/app/update-form-layout.js +48 -0
  36. package/dist/tools/kintone/app/update-general-settings.js +119 -0
  37. package/dist/tools/kintone/file/download-file.js +49 -0
  38. package/dist/tools/kintone/record/add-records.js +8 -9
  39. package/dist/tools/kintone/record/delete-records.js +7 -8
  40. package/dist/tools/kintone/record/get-records.js +8 -9
  41. package/dist/tools/kintone/record/update-records.js +8 -9
  42. package/dist/tools/kintone/record/update-statuses.js +7 -8
  43. package/dist/tools/types/tool.js +1 -0
  44. package/dist/version.js +1 -1
  45. package/package.json +11 -6
  46. package/dist/server.js +0 -20
  47. package/dist/tool-filters.js +0 -14
  48. package/dist/tools/utils.js +0 -8
@@ -1,7 +1,5 @@
1
1
  import { z } from "zod";
2
- import { createTool } from "../../utils.js";
3
- import { getKintoneClient } from "../../../client.js";
4
- import { parseKintoneClientConfig } from "../../../config/index.js";
2
+ import { createTool } from "../../factory.js";
5
3
  const inputSchema = {
6
4
  app: z
7
5
  .string()
@@ -10,6 +8,10 @@ const inputSchema = {
10
8
  .enum(["ja", "en", "zh", "default", "user"])
11
9
  .optional()
12
10
  .describe("The language for field names"),
11
+ preview: z
12
+ .boolean()
13
+ .optional()
14
+ .describe("Whether to get process management settings from pre-live environment"),
13
15
  };
14
16
  const entitySchema = z.object({
15
17
  type: z.enum([
@@ -64,17 +66,18 @@ const outputSchema = {
64
66
  .describe("Array containing action configurations"),
65
67
  revision: z.string().describe("App settings revision number"),
66
68
  };
67
- export const getProcessManagement = createTool("kintone-get-process-management", {
69
+ const toolName = "kintone-get-process-management";
70
+ const toolConfig = {
68
71
  title: "Get Process Management",
69
72
  description: "Get process management settings from a kintone app",
70
73
  inputSchema,
71
74
  outputSchema,
72
- }, async ({ app, lang }) => {
73
- const config = parseKintoneClientConfig();
74
- const client = getKintoneClient(config);
75
+ };
76
+ const callback = async ({ app, lang, preview }, { client }) => {
75
77
  const response = await client.app.getProcessManagement({
76
78
  app,
77
79
  lang,
80
+ preview,
78
81
  });
79
82
  return {
80
83
  structuredContent: response,
@@ -85,4 +88,5 @@ export const getProcessManagement = createTool("kintone-get-process-management",
85
88
  },
86
89
  ],
87
90
  };
88
- });
91
+ };
92
+ export const getProcessManagement = createTool(toolName, toolConfig, callback);
@@ -0,0 +1,50 @@
1
+ import { z } from "zod";
2
+ import { createTool } from "../../factory.js";
3
+ import { propertiesForParameterSchema } from "../../../schema/app/index.js";
4
+ const inputSchema = {
5
+ app: z
6
+ .string()
7
+ .describe("The ID of the app to update form fields for (numeric value as string)"),
8
+ properties: propertiesForParameterSchema.describe("Object containing field configurations to update"),
9
+ revision: z
10
+ .string()
11
+ .optional()
12
+ .describe("Expected app configuration revision number. If the specified revision number does not match the current app's revision, an error will occur and the update will not be performed. If not specified or set to '-1', the revision number will not be checked."),
13
+ };
14
+ const outputSchema = {
15
+ revision: z.string().describe("Updated app configuration revision number"),
16
+ };
17
+ const toolName = "kintone-update-form-fields";
18
+ const toolConfig = {
19
+ title: "Update Form Fields",
20
+ description: "Update form field settings in a kintone app (preview environment only). " +
21
+ "Requires App Management permissions. " +
22
+ "Cannot update field codes for Label, Blank space, Border, Status, Assignee, or Category fields. " +
23
+ "For selection fields, unspecified options will be deleted. " +
24
+ "Option keys must exactly match current option names. " +
25
+ "For lookup fields, existing lookup configurations may not update properly - consider deleting and recreating the field instead. " +
26
+ "Use kintone-get-form-fields first to check current settings. " +
27
+ "Changes require kintone-deploy-app to apply to live app.",
28
+ inputSchema,
29
+ outputSchema,
30
+ };
31
+ const callback = async ({ app, properties, revision }, { client }) => {
32
+ const response = await client.app.updateFormFields({
33
+ app,
34
+ properties: properties,
35
+ revision,
36
+ });
37
+ const result = {
38
+ revision: response.revision,
39
+ };
40
+ return {
41
+ structuredContent: result,
42
+ content: [
43
+ {
44
+ type: "text",
45
+ text: JSON.stringify(result, null, 2),
46
+ },
47
+ ],
48
+ };
49
+ };
50
+ export const updateFormFields = createTool(toolName, toolConfig, callback);
@@ -0,0 +1,48 @@
1
+ import { z } from "zod";
2
+ import { createTool } from "../../factory.js";
3
+ import { layoutForParameterSchema } from "../../../schema/app/index.js";
4
+ const inputSchema = {
5
+ app: z
6
+ .string()
7
+ .describe("The ID of the app to update form layout for (numeric value as string)"),
8
+ layout: layoutForParameterSchema.describe("Array of layout elements (rows, subtables, groups)"),
9
+ revision: z
10
+ .string()
11
+ .optional()
12
+ .describe("Expected app configuration revision number. If the specified revision number does not match the current app's revision, an error will occur and the update will not be performed. If not specified or set to '-1', the revision number will not be checked."),
13
+ };
14
+ const outputSchema = {
15
+ revision: z.string().describe("Updated app configuration revision number"),
16
+ };
17
+ const toolName = "kintone-update-form-layout";
18
+ const toolConfig = {
19
+ title: "Update Form Layout",
20
+ description: "Update form layout settings in a kintone app (preview environment only). " +
21
+ "Use kintone-get-form-fields and kintone-get-form-layout first to understand current structure. " +
22
+ "Field codes are case-sensitive and must match exactly. " +
23
+ "For SUBTABLE fields, use nested structure: {type: 'SUBTABLE', code: 'table_code', fields: [{type: 'field_type', code: 'field_code'}, ...]}. " +
24
+ "Required when adding new fields to ensure proper positioning. " +
25
+ "Changes require kintone-deploy-app to apply to live app.",
26
+ inputSchema,
27
+ outputSchema,
28
+ };
29
+ const callback = async ({ app, layout, revision }, { client }) => {
30
+ const response = await client.app.updateFormLayout({
31
+ app,
32
+ layout,
33
+ revision,
34
+ });
35
+ const result = {
36
+ revision: response.revision,
37
+ };
38
+ return {
39
+ structuredContent: result,
40
+ content: [
41
+ {
42
+ type: "text",
43
+ text: JSON.stringify(result, null, 2),
44
+ },
45
+ ],
46
+ };
47
+ };
48
+ export const updateFormLayout = createTool(toolName, toolConfig, callback);
@@ -0,0 +1,119 @@
1
+ import { z } from "zod";
2
+ import { createTool } from "../../factory.js";
3
+ const inputSchema = {
4
+ app: z
5
+ .string()
6
+ .describe("The ID of the app to update (numeric value as string)"),
7
+ name: z
8
+ .string()
9
+ .min(1)
10
+ .max(64)
11
+ .optional()
12
+ .describe("The app name (1-64 characters)"),
13
+ description: z
14
+ .string()
15
+ .max(10000)
16
+ .optional()
17
+ .describe("The app description (up to 10,000 characters)"),
18
+ icon: z
19
+ .discriminatedUnion("type", [
20
+ z.object({
21
+ type: z.literal("PRESET"),
22
+ key: z.string().describe("The icon key for PRESET type"),
23
+ }),
24
+ z.object({
25
+ type: z.literal("FILE"),
26
+ file: z
27
+ .object({
28
+ fileKey: z.string().describe("The file key for uploaded icon"),
29
+ })
30
+ .describe("The file information for FILE type"),
31
+ }),
32
+ ])
33
+ .optional()
34
+ .describe("The app icon configuration"),
35
+ theme: z
36
+ .enum(["WHITE", "RED", "GREEN", "BLUE", "YELLOW", "BLACK"])
37
+ .optional()
38
+ .describe("The design theme"),
39
+ titleField: z
40
+ .discriminatedUnion("selectionMode", [
41
+ z.object({
42
+ selectionMode: z.literal("AUTO"),
43
+ }),
44
+ z.object({
45
+ selectionMode: z.literal("MANUAL"),
46
+ code: z.string().describe("The field code for MANUAL selection mode"),
47
+ }),
48
+ ])
49
+ .optional()
50
+ .describe("The record title field settings"),
51
+ enableThumbnails: z
52
+ .boolean()
53
+ .optional()
54
+ .describe("Whether to enable thumbnail display"),
55
+ enableComments: z
56
+ .boolean()
57
+ .optional()
58
+ .describe("Whether to enable record comments"),
59
+ enableBulkDeletion: z
60
+ .boolean()
61
+ .optional()
62
+ .describe("Whether to enable bulk deletion of records"),
63
+ enableDuplicateRecord: z
64
+ .boolean()
65
+ .optional()
66
+ .describe("Whether to enable the reuse record feature"),
67
+ enableInlineRecordEditing: z
68
+ .boolean()
69
+ .optional()
70
+ .describe("Whether to enable inline editing in record list"),
71
+ numberPrecision: z
72
+ .object({
73
+ digits: z.string().optional().describe("Total number of digits (1-30)"),
74
+ decimalPlaces: z
75
+ .string()
76
+ .optional()
77
+ .describe("Number of decimal places (0-10)"),
78
+ roundingMode: z
79
+ .enum(["HALF_EVEN", "UP", "DOWN"])
80
+ .optional()
81
+ .describe("Rounding method"),
82
+ })
83
+ .optional()
84
+ .describe("The numeric calculation precision settings"),
85
+ firstMonthOfFiscalYear: z
86
+ .string()
87
+ .optional()
88
+ .describe("The first month of the fiscal year (1-12)"),
89
+ revision: z
90
+ .string()
91
+ .optional()
92
+ .describe("Expected revision number for optimistic locking"),
93
+ };
94
+ const outputSchema = {
95
+ revision: z.string().describe("The revision number after the update"),
96
+ };
97
+ const toolName = "kintone-update-general-settings";
98
+ const toolConfig = {
99
+ title: "Update General Settings",
100
+ description: "Update the general settings of a kintone app. Changes are made to the pre-live environment, which is a temporary storage area where app information is saved before deployment. To reflect changes to the production environment, execute the kintone-deploy-app tool after this tool.",
101
+ inputSchema,
102
+ outputSchema,
103
+ };
104
+ const callback = async (params, { client }) => {
105
+ const response = await client.app.updateAppSettings(params);
106
+ const result = {
107
+ revision: response.revision,
108
+ };
109
+ return {
110
+ structuredContent: result,
111
+ content: [
112
+ {
113
+ type: "text",
114
+ text: JSON.stringify(result, null, 2),
115
+ },
116
+ ],
117
+ };
118
+ };
119
+ export const updateGeneralSettings = createTool(toolName, toolConfig, callback);
@@ -0,0 +1,49 @@
1
+ import { z } from "zod";
2
+ import { ensureDirectoryExists, generateFileName, generateFilePath, getFileTypeFromArrayBuffer, writeFileSyncWithoutOverwrite, } from "../../../lib/filesystem.js";
3
+ import { createTool } from "../../factory.js";
4
+ const inputSchema = {
5
+ fileKey: z
6
+ .string()
7
+ .describe("The unique file key to download (obtained from record retrieval or file upload)"),
8
+ fileName: z
9
+ .string()
10
+ .describe("The filename (without extension) to use when downloading to local storage. The extension will be automatically detected and added based on the file's MIME type"),
11
+ };
12
+ const outputSchema = {
13
+ filePath: z.string().describe("Absolute path to the downloaded file"),
14
+ mimeType: z.string().describe("MIME type of the downloaded file"),
15
+ fileSize: z.number().describe("File size in bytes"),
16
+ };
17
+ const toolName = "kintone-download-file";
18
+ const toolConfig = {
19
+ title: "Download File from Kintone",
20
+ description: "Download a file from kintone using its fileKey and save it to the configured download directory. Returns the absolute path to the saved file. Requires KINTONE_ATTACHMENTS_DIR environment variable to be set, app record viewing permission, and permission to view the field containing the file.",
21
+ inputSchema,
22
+ outputSchema,
23
+ };
24
+ const callback = async ({ fileKey, fileName }, { client, attachmentsDir }) => {
25
+ // Check if download directory is configured
26
+ if (!attachmentsDir) {
27
+ throw new Error("KINTONE_ATTACHMENTS_DIR environment variable must be set to use file download feature");
28
+ }
29
+ const buffer = await client.file.downloadFile({ fileKey });
30
+ ensureDirectoryExists(attachmentsDir);
31
+ const fileTypeResult = await getFileTypeFromArrayBuffer(buffer);
32
+ const filePath = generateFilePath(attachmentsDir, generateFileName(fileName, fileTypeResult?.ext));
33
+ writeFileSyncWithoutOverwrite(filePath, buffer);
34
+ const result = {
35
+ filePath,
36
+ mimeType: fileTypeResult?.mime || "application/octet-stream",
37
+ fileSize: buffer.byteLength,
38
+ };
39
+ return {
40
+ structuredContent: result,
41
+ content: [
42
+ {
43
+ type: "text",
44
+ text: JSON.stringify(result, null, 2),
45
+ },
46
+ ],
47
+ };
48
+ };
49
+ export const downloadFile = createTool(toolName, toolConfig, callback);
@@ -1,8 +1,6 @@
1
1
  import { z } from "zod";
2
- import { createTool } from "../../utils.js";
3
- import { getKintoneClient } from "../../../client.js";
4
- import { parseKintoneClientConfig } from "../../../config/index.js";
5
- import { recordSchemaForParameterWithoutFile } from "../../../schema/record/record-for-parameter.js";
2
+ import { createTool } from "../../factory.js";
3
+ import { recordSchemaForParameterWithoutFile } from "../../../schema/record/index.js";
6
4
  const inputSchema = {
7
5
  app: z
8
6
  .string()
@@ -19,14 +17,14 @@ const outputSchema = {
19
17
  .array(z.string())
20
18
  .describe("Array of revision numbers of the created records"),
21
19
  };
22
- export const addRecords = createTool("kintone-add-records", {
20
+ const toolName = "kintone-add-records";
21
+ const toolConfig = {
23
22
  title: "Add Records",
24
23
  description: "Add multiple records to a kintone app. Use kintone-get-form-fields tool first to discover available field codes and their required formats. Note: Some fields cannot be registered (LOOKUP copies, STATUS, CATEGORY, CALC, ASSIGNEE, auto-calculated fields).",
25
24
  inputSchema,
26
25
  outputSchema,
27
- }, async ({ app, records }) => {
28
- const config = parseKintoneClientConfig();
29
- const client = getKintoneClient(config);
26
+ };
27
+ const callback = async ({ app, records }, { client }) => {
30
28
  const response = await client.record.addRecords({
31
29
  app,
32
30
  records,
@@ -44,4 +42,5 @@ export const addRecords = createTool("kintone-add-records", {
44
42
  },
45
43
  ],
46
44
  };
47
- });
45
+ };
46
+ export const addRecords = createTool(toolName, toolConfig, callback);
@@ -1,7 +1,5 @@
1
1
  import { z } from "zod";
2
- import { createTool } from "../../utils.js";
3
- import { getKintoneClient } from "../../../client.js";
4
- import { parseKintoneClientConfig } from "../../../config/index.js";
2
+ import { createTool } from "../../factory.js";
5
3
  const inputSchema = {
6
4
  app: z.string().describe("The ID of the app (numeric value as string)"),
7
5
  ids: z
@@ -15,17 +13,18 @@ const inputSchema = {
15
13
  .describe("Array of expected revision numbers for each record (numeric values as strings). If specified, must have the same length as ids array. Deletion will fail if current revisions don't match. Specify -1 or omit to skip revision validation."),
16
14
  };
17
15
  const outputSchema = {};
18
- export const deleteRecords = createTool("kintone-delete-records", {
16
+ const toolName = "kintone-delete-records";
17
+ const toolConfig = {
19
18
  title: "Delete Records",
20
19
  description: "Delete multiple records from a kintone app. Maximum 100 records can be deleted at once.",
21
20
  inputSchema,
22
21
  outputSchema,
23
- }, async ({ app, ids, revisions }) => {
24
- const config = parseKintoneClientConfig();
25
- const client = getKintoneClient(config);
22
+ };
23
+ const callback = async ({ app, ids, revisions }, { client }) => {
26
24
  await client.record.deleteRecords({ app, ids, revisions });
27
25
  return {
28
26
  structuredContent: {},
29
27
  content: [],
30
28
  };
31
- });
29
+ };
30
+ export const deleteRecords = createTool(toolName, toolConfig, callback);
@@ -1,8 +1,6 @@
1
1
  import { z } from "zod";
2
- import { createTool } from "../../utils.js";
3
- import { getKintoneClient } from "../../../client.js";
4
- import { parseKintoneClientConfig } from "../../../config/index.js";
5
- import { recordSchema } from "../../../schema/record/records.js";
2
+ import { createTool } from "../../factory.js";
3
+ import { recordSchema } from "../../../schema/record/index.js";
6
4
  const filtersSchema = z
7
5
  .object({
8
6
  textContains: z
@@ -121,14 +119,14 @@ function buildQueryFromFilters(filters) {
121
119
  });
122
120
  return conditions.length > 0 ? conditions.join(" and ") : undefined;
123
121
  }
124
- export const getRecords = createTool("kintone-get-records", {
122
+ const toolName = "kintone-get-records";
123
+ const toolConfig = {
125
124
  title: "Get Records",
126
125
  description: "Get multiple records from a kintone app with structured filtering. Use kintone-get-form-fields tool first to discover available fields and their types.",
127
126
  inputSchema,
128
127
  outputSchema,
129
- }, async ({ app, filters, fields, orderBy, limit, offset }) => {
130
- const config = parseKintoneClientConfig();
131
- const client = getKintoneClient(config);
128
+ };
129
+ const callback = async ({ app, filters, fields, orderBy, limit, offset }, { client }) => {
132
130
  let query = filters ? buildQueryFromFilters(filters) : undefined;
133
131
  if (orderBy && orderBy.length > 0) {
134
132
  const orderClauses = orderBy
@@ -163,4 +161,5 @@ export const getRecords = createTool("kintone-get-records", {
163
161
  },
164
162
  ],
165
163
  };
166
- });
164
+ };
165
+ export const getRecords = createTool(toolName, toolConfig, callback);
@@ -1,8 +1,6 @@
1
1
  import { z } from "zod";
2
- import { createTool } from "../../utils.js";
3
- import { getKintoneClient } from "../../../client.js";
4
- import { parseKintoneClientConfig } from "../../../config/index.js";
5
- import { recordSchemaForParameter } from "../../../schema/record/record-for-parameter.js";
2
+ import { createTool } from "../../factory.js";
3
+ import { recordSchemaForParameter } from "../../../schema/record/index.js";
6
4
  const updateRecordSchema = z.object({
7
5
  // updateKey指定は対象外
8
6
  id: z.string().describe("Record ID to update (numeric value as string)"),
@@ -30,14 +28,14 @@ const outputSchema = {
30
28
  }))
31
29
  .describe("Array of updated record information"),
32
30
  };
33
- export const updateRecords = createTool("kintone-update-records", {
31
+ const toolName = "kintone-update-records";
32
+ const toolConfig = {
34
33
  title: "Update Records",
35
34
  description: "Update multiple records in a kintone app. Use kintone-get-form-fields tool first to discover available field codes and their required formats. Note: Some fields cannot be updated (LOOKUP copies, STATUS, CATEGORY, CALC, ASSIGNEE, auto-calculated fields).",
36
35
  inputSchema,
37
36
  outputSchema,
38
- }, async ({ app, records }) => {
39
- const config = parseKintoneClientConfig();
40
- const client = getKintoneClient(config);
37
+ };
38
+ const callback = async ({ app, records }, { client }) => {
41
39
  const response = await client.record.updateRecords({
42
40
  app,
43
41
  records,
@@ -55,4 +53,5 @@ export const updateRecords = createTool("kintone-update-records", {
55
53
  },
56
54
  ],
57
55
  };
58
- });
56
+ };
57
+ export const updateRecords = createTool(toolName, toolConfig, callback);
@@ -1,7 +1,5 @@
1
1
  import { z } from "zod";
2
- import { createTool } from "../../utils.js";
3
- import { getKintoneClient } from "../../../client.js";
4
- import { parseKintoneClientConfig } from "../../../config/index.js";
2
+ import { createTool } from "../../factory.js";
5
3
  const statusRecordSchema = z.object({
6
4
  id: z.string().describe("Record ID (numeric value as string)"),
7
5
  action: z
@@ -34,14 +32,14 @@ const outputSchema = {
34
32
  }))
35
33
  .describe("Array of updated record information"),
36
34
  };
37
- export const updateStatuses = createTool("kintone-update-statuses", {
35
+ const toolName = "kintone-update-statuses";
36
+ const toolConfig = {
38
37
  title: "Update Statuses",
39
38
  description: "Update status of multiple records in a kintone app. Requires process management feature to be enabled. Maximum 100 records can be updated at once.",
40
39
  inputSchema,
41
40
  outputSchema,
42
- }, async ({ app, records }) => {
43
- const config = parseKintoneClientConfig();
44
- const client = getKintoneClient(config);
41
+ };
42
+ const callback = async ({ app, records }, { client }) => {
45
43
  const response = await client.record.updateRecordsStatus({
46
44
  app,
47
45
  records,
@@ -58,4 +56,5 @@ export const updateStatuses = createTool("kintone-update-statuses", {
58
56
  },
59
57
  ],
60
58
  };
61
- });
59
+ };
60
+ export const updateStatuses = createTool(toolName, toolConfig, callback);
@@ -0,0 +1 @@
1
+ export {};
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // This file is auto-generated. Do not edit manually.
2
- export const version = "1.0.0"; // x-release-please-version
2
+ export const version = "1.2.0"; // x-release-please-version
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kintone/mcp-server",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "The official MCP Server for kintone",
5
5
  "keywords": [
6
6
  "kintone",
@@ -31,7 +31,8 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@kintone/rest-api-client": "^5.7.4",
34
- "@modelcontextprotocol/sdk": "^1.17.4",
34
+ "@modelcontextprotocol/sdk": "^1.17.5",
35
+ "file-type": "^21.0.0",
35
36
  "https-proxy-agent": "^7.0.6",
36
37
  "zod": "^3.25.76"
37
38
  },
@@ -41,11 +42,13 @@
41
42
  "@commitlint/config-conventional": "^19.8.1",
42
43
  "@cybozu/eslint-config": "^24.2.0",
43
44
  "@cybozu/license-manager": "^1.3.1",
44
- "@types/node": "^22.18.0",
45
+ "@modelcontextprotocol/inspector": "^0.16.8",
46
+ "@types/node": "^22.18.4",
45
47
  "doctoc": "^2.2.1",
46
- "eslint": "^9.34.0",
47
- "eslint-plugin-package-json": "^0.56.0",
48
- "globals": "^16.3.0",
48
+ "eslint": "^9.35.0",
49
+ "eslint-plugin-package-json": "^0.56.3",
50
+ "globals": "^16.4.0",
51
+ "npm": "^11.6.1",
49
52
  "prettier": "^3.6.2",
50
53
  "tsx": "^4.20.5",
51
54
  "typescript": "^5.9.2",
@@ -72,6 +75,8 @@
72
75
  "fix": "pnpm run \"/^fix:.*/\"",
73
76
  "fix:eslint": "pnpm lint:eslint --fix",
74
77
  "fix:prettier": "pnpm lint:prettier --write",
78
+ "inspector": "mcp-inspector node dist/index.js",
79
+ "inspector:dev": "mcp-inspector tsx src/index.ts",
75
80
  "license:analyze": "license-manager analyze -c license-manager.config.cjs",
76
81
  "license:extract": "license-manager extract -c license-manager.config.cjs -w .",
77
82
  "lint": "pnpm run \"/^lint:.*/\"",
package/dist/server.js DELETED
@@ -1,20 +0,0 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
- import { tools } from "./tools/index.js";
3
- import { version } from "./version.js";
4
- import { PACKAGE_NAME, parseKintoneClientConfig } from "./config/index.js";
5
- import { shouldEnableTool } from "./tool-filters.js";
6
- export const createServer = () => {
7
- const server = new McpServer({
8
- name: PACKAGE_NAME,
9
- version,
10
- }, {
11
- capabilities: {
12
- tools: {},
13
- },
14
- });
15
- const config = parseKintoneClientConfig();
16
- tools
17
- .filter((tool) => shouldEnableTool(tool.name, config))
18
- .forEach((tool) => server.registerTool(tool.name, tool.config, tool.callback));
19
- return server;
20
- };
@@ -1,14 +0,0 @@
1
- export const filterRules = [
2
- {
3
- condition: (config) => config.isApiTokenAuth,
4
- excludeTools: ["kintone-get-apps"],
5
- },
6
- ];
7
- export function shouldEnableTool(toolName, config) {
8
- for (const rule of filterRules) {
9
- if (rule.condition(config) && rule.excludeTools.includes(toolName)) {
10
- return false;
11
- }
12
- }
13
- return true;
14
- }
@@ -1,8 +0,0 @@
1
- // Tool creation helper function
2
- export function createTool(name, config, callback) {
3
- return {
4
- name,
5
- config,
6
- callback,
7
- };
8
- }