Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces the initial version ("V0") of the Chatwork MCP Server by setting up ESLint configuration, a CLI entry point, test and deployment workflows, and a complete set of API schemas and server routing for various Chatwork operations.
- Added ESLint, Vitest, Dependabot, and GitHub workflow configurations
- Implemented Chatwork client, API schemas using zod, and server tool routing for Chatwork endpoints
- Updated README with usage instructions and provided a placeholder for tool callback tests
Reviewed Changes
Copilot reviewed 15 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| eslint.config.mjs | ESLint configuration with JavaScript and TypeScript support |
| src/index.ts | Main entry point connecting the MCP server |
| vitest.config.ts | Vitest configuration using dotenv for environment variables |
| src/toolCallbacks.test.ts | Placeholder test file for tool callbacks |
| src/chatworkClient.ts | Chatwork API client implementation |
| .github/dependabot.yaml | Dependabot configuration for daily npm updates |
| .github/workflows/deploy.yaml | Deployment workflow stub |
| README.md | README update with usage instructions for Chatwork MCP server |
| .github/workflows/check.yaml | Workflow configuration for linting, type-checking, and testing |
| src/schema.ts | Zod schemas for validating parameters for various API endpoints |
| src/server.ts | Server routing for Chatwork endpoints using schemas and callbacks |
Files not reviewed (4)
- .clineignore: Language not supported
- .prettierrc: Language not supported
- cspell.json: Language not supported
- package.json: Language not supported
Comments suppressed due to low confidence (1)
src/server.ts:225
- The callback for 'list_incoming_requests' is set as listContacts, which may not correctly align with retrieving incoming contact requests. Please verify if the appropriate callback should be used or update the endpoint description accordingly.
server.tool('list_incoming_requests', '自分へのコンタクト承認依頼一覧を最大100件まで取得します。', listContacts,);
There was a problem hiding this comment.
Pull Request Overview
This PR introduces the initial version ("V0") of the Chatwork MCP Server by adding configuration files, implementation for client/server communication, API schemas with Zod, and initial workflows/tests. Key changes include the ESLint configuration setup, implementation of the Chatwork client and server logic, and CI/CD configurations.
Reviewed Changes
Copilot reviewed 15 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| eslint.config.mjs | Adds ESLint configuration with recommended settings. |
| src/index.ts | Introduces the entry point for starting the server. |
| src/chatworkClient.ts | Implements the Chatwork client for making API requests. |
| vitest.config.ts | Sets up the testing configuration using Vitest. |
| src/toolCallbacks.test.ts | Contains a placeholder for tests, marked as TODO. |
| .github/dependabot.yaml | Adds Dependabot configuration for automatic dependency updates. |
| .github/workflows/deploy.yaml | Provides a placeholder for deployment automation via GitHub actions. |
| README.md | Updates documentation with usage instructions for the MCP server. |
| .github/workflows/check.yaml | Configures CI workflows for linting, type checking, and testing. |
| src/schema.ts | Introduces Zod schemas for validating API endpoint parameters. |
| src/server.ts | Integrates tool callbacks with the MCP server framework. |
Files not reviewed (4)
- .clineignore: Language not supported
- .prettierrc: Language not supported
- cspell.json: Language not supported
- package.json: Language not supported
Comments suppressed due to low confidence (1)
src/toolCallbacks.test.ts:3
- Replace the placeholder test with concrete tests to ensure the tool callbacks functionality is properly covered.
// TODO!
| await server.connect(transport); | ||
| } | ||
|
|
||
| main().catch(() => { |
There was a problem hiding this comment.
Consider logging the error message in the catch block before calling process.exit(1) to aid in debugging.
| main().catch(() => { | |
| main().catch((error) => { | |
| console.error('An error occurred:', error); |
There was a problem hiding this comment.
[将来的な話]
どうして停止したのか不明になるため、今後同様の処理を検討するのが良いだろう
eiel
left a comment
There was a problem hiding this comment.
まだ npmにデプロイしていないため、npx で利用できない。そのためclaude_desktop_config.jsonを以下のような形にし、npm install & npm run build を行うことでClaud Desktopでマイチャットにメッセージを送信する形で動作確認した。
{
"mcpServers": {
"chatwork": {
"command": "/abs/path/node",
"args": ["xxxxxxx/chatwork-mcp-server/dist/index.js"],
"env": {
"CHATWORK_API_TOKEN": "XXXXX"
}
}
}
}使い方次第では動作しないケースが存在する可能性があるが、ドッグフーディングしながら修正していく。
| "AI" | ||
| ], | ||
| "author": "kubell Co., LTD", | ||
| "license": "MIT", |
| on: | ||
| push: | ||
| branches: | ||
| - main |
There was a problem hiding this comment.
[将来的な確認事項]
on.push.branchsがcheckと同じため、同時にdeployが始まってしまう。checkで失敗したにも関わらずdeployが発生しうる。
deployするもの次第では、checkの確認をするのが望ましい。
| await server.connect(transport); | ||
| } | ||
|
|
||
| main().catch(() => { |
There was a problem hiding this comment.
[将来的な話]
どうして停止したのか不明になるため、今後同様の処理を検討するのが良いだろう
| const minifyListRoomsResponse = ( | ||
| res: ChatworkClientResponse, | ||
| ): ChatworkClientResponse => { | ||
| if (!res.ok || res.response.length < 2500) { |
There was a problem hiding this comment.
[メモ]
サイズが大きすぎると通信に失敗する。そのため、2500文字で暫定対応している。
これが起きるのはListRoomだけではないが、ユースケースとして利用されることが多く、利用で致命的であるため対応されている。
まずは初期実装。
やったこと
見送ったこと (次バージョン以降やると良いこと)