feishu-mcp 0.2.2 → 0.2.7

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 (77) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +356 -266
  3. package/dist/cli/auth.js +117 -0
  4. package/dist/cli/commands/auth.js +141 -0
  5. package/dist/cli/commands/config.js +86 -0
  6. package/dist/cli/commands/guide.js +68 -0
  7. package/dist/cli/dispatcher.js +96 -0
  8. package/dist/cli/index.js +95 -0
  9. package/dist/manager/sseConnectionManager.js +2 -0
  10. package/dist/mcp/feishuMcp.js +25 -25
  11. package/dist/mcp/tools/blockTools.js +295 -0
  12. package/dist/mcp/tools/documentTools.js +105 -0
  13. package/dist/mcp/tools/feishuBlockTools.js +1 -285
  14. package/dist/mcp/tools/feishuTools.js +1 -67
  15. package/dist/mcp/tools/folderTools.js +99 -0
  16. package/dist/mcp/tools/toolHelpers.js +155 -0
  17. package/dist/modules/FeatureModule.js +1 -0
  18. package/dist/modules/ModuleRegistry.js +63 -0
  19. package/dist/modules/calendar/index.js +11 -0
  20. package/dist/modules/calendar/services/FeishuCalendarService.js +6 -0
  21. package/dist/modules/calendar/tools/calendarTools.js +6 -0
  22. package/dist/modules/document/index.js +15 -0
  23. package/dist/modules/document/services/FeishuBlockService.js +410 -0
  24. package/dist/modules/document/services/FeishuDocumentService.js +110 -0
  25. package/dist/modules/document/services/FeishuFoldService.js +187 -0
  26. package/dist/modules/document/services/FeishuSearchService.js +232 -0
  27. package/dist/modules/document/services/FeishuWhiteboardService.js +80 -0
  28. package/dist/modules/document/services/blockFactory.js +521 -0
  29. package/dist/modules/document/toolApi/blockToolApi.js +160 -0
  30. package/dist/modules/document/toolApi/documentToolApi.js +65 -0
  31. package/dist/modules/document/toolApi/folderToolApi.js +73 -0
  32. package/dist/modules/document/toolApi/index.js +3 -0
  33. package/dist/modules/document/tools/blockTools.js +138 -0
  34. package/dist/modules/document/tools/documentTools.js +64 -0
  35. package/dist/modules/document/tools/folderTools.js +46 -0
  36. package/dist/modules/document/tools/toolHelpers.js +155 -0
  37. package/dist/modules/index.js +5 -0
  38. package/dist/modules/member/index.js +11 -0
  39. package/dist/modules/member/services/FeishuMemberService.js +41 -0
  40. package/dist/modules/member/toolApi/index.js +1 -0
  41. package/dist/modules/member/toolApi/memberToolApi.js +54 -0
  42. package/dist/modules/member/tools/memberTools.js +26 -0
  43. package/dist/modules/task/index.js +11 -0
  44. package/dist/modules/task/services/FeishuTaskService.js +271 -0
  45. package/dist/modules/task/toolApi/__tests__/taskToolApi.test.js +98 -0
  46. package/dist/modules/task/toolApi/index.js +1 -0
  47. package/dist/modules/task/toolApi/taskToolApi.js +128 -0
  48. package/dist/modules/task/tools/taskTools.js +93 -0
  49. package/dist/server.js +43 -24
  50. package/dist/services/baseService.js +11 -2
  51. package/dist/services/blockFactory.js +167 -0
  52. package/dist/services/callbackService.js +1 -1
  53. package/dist/services/constants/feishuScopes.js +94 -0
  54. package/dist/services/feishu/FeishuBaseApiService.js +47 -0
  55. package/dist/services/feishu/FeishuBlockService.js +410 -0
  56. package/dist/services/feishu/FeishuDocumentBlockService.js +403 -0
  57. package/dist/services/feishu/FeishuDocumentService.js +110 -0
  58. package/dist/services/feishu/FeishuDriveService.js +62 -0
  59. package/dist/services/feishu/FeishuFoldService.js +187 -0
  60. package/dist/services/feishu/FeishuImageService.js +219 -0
  61. package/dist/services/feishu/FeishuScopeValidator.js +177 -0
  62. package/dist/services/feishu/FeishuSearchService.js +232 -0
  63. package/dist/services/feishu/FeishuWhiteboardService.js +80 -0
  64. package/dist/services/feishu/FeishuWikiService.js +134 -0
  65. package/dist/services/feishuApiService.js +246 -1760
  66. package/dist/services/feishuAuthService.js +43 -0
  67. package/dist/types/documentSchema.js +232 -0
  68. package/dist/types/feishuSchema.js +54 -77
  69. package/dist/types/memberSchema.js +35 -0
  70. package/dist/types/taskSchema.js +166 -0
  71. package/dist/utils/auth/tokenCacheManager.js +16 -3
  72. package/dist/utils/auth/tokenRefreshManager.js +2 -1
  73. package/dist/utils/config.js +47 -0
  74. package/dist/utils/document.js +116 -116
  75. package/dist/utils/error.js +0 -11
  76. package/dist/utils/paramUtils.js +0 -31
  77. package/package.json +77 -76
package/package.json CHANGED
@@ -1,76 +1,77 @@
1
- {
2
- "name": "feishu-mcp",
3
- "version": "0.2.2",
4
- "description": "Model Context Protocol server for Feishu integration",
5
- "type": "module",
6
- "main": "dist/index.js",
7
- "bin": {
8
- "feishu-mcp": "./dist/cli.js"
9
- },
10
- "files": [
11
- "dist",
12
- "README.md"
13
- ],
14
- "scripts": {
15
- "build": "tsc && tsc-alias",
16
- "type-check": "tsc --noEmit",
17
- "start": "node dist/index.js",
18
- "start:cli": "cross-env NODE_ENV=cli node dist/index.js",
19
- "start:http": "node dist/index.js",
20
- "dev": "cross-env NODE_ENV=development tsx watch src/index.ts",
21
- "dev:cli": "cross-env NODE_ENV=development tsx watch src/index.ts --stdio",
22
- "lint": "eslint . --ext .ts",
23
- "format": "prettier --write \"src/**/*.ts\"",
24
- "inspect": "pnpx @modelcontextprotocol/inspector",
25
- "prepare": "pnpm run build",
26
- "pub:release": "pnpm build && npm publish",
27
- "pub:test": "pnpm build && npm publish --tag test"
28
- },
29
- "engines": {
30
- "node": "^20.17.0"
31
- },
32
- "repository": {
33
- "type": "git",
34
- "url": "https://github.com/cso1z/Feishu-MCP.git"
35
- },
36
- "keywords": [
37
- "feishu",
38
- "lark",
39
- "mcp",
40
- "typescript"
41
- ],
42
- "author": "cso1z",
43
- "license": "MIT",
44
- "dependencies": {
45
- "@modelcontextprotocol/sdk": "^1.17.5",
46
- "@types/yargs": "^17.0.33",
47
- "axios": "^1.7.9",
48
- "cross-env": "^7.0.3",
49
- "dotenv": "^16.4.7",
50
- "express": "^4.21.2",
51
- "form-data": "^4.0.3",
52
- "remeda": "^2.20.1",
53
- "yargs": "^17.7.2",
54
- "zod": "^3.24.2"
55
- },
56
- "devDependencies": {
57
- "@types/express": "^5.0.0",
58
- "@types/jest": "^29.5.11",
59
- "@types/node": "^20.17.0",
60
- "@typescript-eslint/eslint-plugin": "^8.24.0",
61
- "@typescript-eslint/parser": "^8.24.0",
62
- "eslint": "^9.20.1",
63
- "eslint-config-prettier": "^10.0.1",
64
- "jest": "^29.7.0",
65
- "prettier": "^3.5.0",
66
- "ts-jest": "^29.2.5",
67
- "tsc-alias": "^1.8.10",
68
- "tsx": "^4.19.2",
69
- "typescript": "^5.7.3"
70
- },
71
- "pnpm": {
72
- "overrides": {
73
- "feishu-mcp": "link:"
74
- }
75
- }
76
- }
1
+ {
2
+ "name": "feishu-mcp",
3
+ "version": "0.2.7",
4
+ "description": "Model Context Protocol server for Feishu integration",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "bin": {
8
+ "feishu-mcp": "./dist/cli.js",
9
+ "feishu-mcp-tool": "./dist/cli/index.js"
10
+ },
11
+ "files": [
12
+ "dist",
13
+ "README.md"
14
+ ],
15
+ "scripts": {
16
+ "build": "tsc && tsc-alias",
17
+ "type-check": "tsc --noEmit",
18
+ "start": "node dist/index.js",
19
+ "start:cli": "cross-env NODE_ENV=cli node dist/index.js",
20
+ "start:http": "node dist/index.js",
21
+ "dev": "cross-env NODE_ENV=development tsx watch src/index.ts",
22
+ "dev:cli": "cross-env NODE_ENV=development tsx watch src/index.ts --stdio",
23
+ "lint": "eslint . --ext .ts",
24
+ "format": "prettier --write \"src/**/*.ts\"",
25
+ "inspect": "pnpx @modelcontextprotocol/inspector",
26
+ "prepare": "pnpm run build",
27
+ "pub:release": "pnpm build && npm publish",
28
+ "pub:test": "pnpm build && npm publish --tag test"
29
+ },
30
+ "engines": {
31
+ "node": "^20.17.0"
32
+ },
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "https://github.com/cso1z/Feishu-MCP.git"
36
+ },
37
+ "keywords": [
38
+ "feishu",
39
+ "lark",
40
+ "mcp",
41
+ "typescript"
42
+ ],
43
+ "author": "cso1z",
44
+ "license": "MIT",
45
+ "dependencies": {
46
+ "@modelcontextprotocol/sdk": "^1.17.5",
47
+ "@types/yargs": "^17.0.33",
48
+ "axios": "^1.7.9",
49
+ "cross-env": "^7.0.3",
50
+ "dotenv": "^16.4.7",
51
+ "express": "^4.21.2",
52
+ "form-data": "^4.0.3",
53
+ "remeda": "^2.20.1",
54
+ "yargs": "^17.7.2",
55
+ "zod": "^3.24.2"
56
+ },
57
+ "devDependencies": {
58
+ "@types/express": "^5.0.0",
59
+ "@types/jest": "^29.5.11",
60
+ "@types/node": "^20.17.0",
61
+ "@typescript-eslint/eslint-plugin": "^8.24.0",
62
+ "@typescript-eslint/parser": "^8.24.0",
63
+ "eslint": "^9.20.1",
64
+ "eslint-config-prettier": "^10.0.1",
65
+ "jest": "^29.7.0",
66
+ "prettier": "^3.5.0",
67
+ "ts-jest": "^29.2.5",
68
+ "tsc-alias": "^1.8.10",
69
+ "tsx": "^4.19.2",
70
+ "typescript": "^5.7.3"
71
+ },
72
+ "pnpm": {
73
+ "overrides": {
74
+ "feishu-mcp": "link:"
75
+ }
76
+ }
77
+ }