-
Notifications
You must be signed in to change notification settings - Fork 65
feat: Add get_follower_ids tool #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e84e762
feat: add get_follower_ids tool, update README, and remove unused cod…
kkdai af48a83
fix: improve descriptions and refactor follower ID retrieval logic
kkdai 8c7f14d
fix: update default limit for get_follower_ids tool in README
kkdai 2f9924c
fix: remove unused imports from index.ts
kkdai bcbef0c
feat: add get_follower_ids tool
kkdai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ LINE公式アカウントとAI Agentを接続するために、LINE Messaging AP | |
- `user_id` (string?): メッセージ受信者のユーザーID。デフォルトはDESTINATION_USER_ID。`user_id`または`DESTINATION_USER_ID`のどちらか一方は必ず設定する必要があります。 | ||
- `message.text` (string): ユーザーに送信するテキスト。 | ||
2. **push_flex_message** | ||
- LINEでユーザーに高度にカスタマイズ可能なフレックスメッセージを送信する。 | ||
- LINEでユーザーに高度にカスタマイズ可能��フレックスメッセージを送信する。 | ||
- **入力:** | ||
- `user_id` (string?): メッセージ受信者のユーザーID。デフォルトはDESTINATION_USER_ID。`user_id`または`DESTINATION_USER_ID`のどちらか一方は必ず設定する必要があります。 | ||
- `message.altText` (string): フレックスメッセージが表示できない場合に表示される代替テキスト。 | ||
|
@@ -30,29 +30,33 @@ LINE公式アカウントとAI Agentを接続するために、LINE Messaging AP | |
4. **broadcast_flex_message** | ||
- LINE公式アカウントと友だちになっているすべてのユーザーに、LINEで高度にカスタマイズ可能なフレックスメッセージを送信する。 | ||
- **入力:** | ||
- `message.altText` (string): フレックスメッセージが表示できない場合に表示される代替テキスト。 | ||
- `message.altText` (string): フレックス��ッセージが表示できない場合に表示される代替テキスト。 | ||
- `message.content` (any): フレックスメッセージの内容。メッセージのレイアウトとコンポーネントを定義するJSONオブジェクト。 | ||
- `message.contents.type` (enum): コンテナのタイプ。'bubble'は単一コンテナ、'carousel'は複数のスワイプ可能なバブルを示す。 | ||
5. **get_profile** | ||
- LINEユーザーの詳細なプロフィール情報を取得する。表示名、プロフィール画像URL、ステータスメッセージ、言語を取得できる。 | ||
- **入力:** | ||
- `user_id` (string?): プロフィールを取得したいユーザーのユーザーID。デフォルトはDESTINATION_USER_ID。`user_id`または`DESTINATION_USER_ID`のどちらか一方は必ず設定する必要があります。======= | ||
- `user_id` (string?): プロフィールを取得したいユーザーのユーザーID。デフォルトはDESTINATION_USER_ID。`user_id`または`DESTINATION_USER_ID`のどちらか一方は必ず設定する必要があります。 | ||
6. **get_message_quota** | ||
- LINE公式アカウントのメッセージ容量と消費量を取得します。月間メッセージ制限と現在の使用量が表示されます。 | ||
- **入力:** | ||
- なし | ||
7. **get_follower_ids** | ||
- LINE公式アカウントを友だち追加したユーザーのリストを取得します。この機能は、認証済みまたはプレミアムアカウントでのみ利用できます。注: このAPIは、友だちのユーザーIDを降順では返しません。代わりに、ユーザーがボットを友だち追加したときの昇順でユーザーIDのリストを返します。 | ||
- **入力:** | ||
- `limit` (number?): 1回のリクエストで取得するユーザーIDの最大数。最大値: 1000。デフォルト: 300。 | ||
- `start` (string?): レスポンスで返されたJSONオブジェクトのnextプロパティにある継続トークンの値。次のユーザーIDの配列を取得するためにこのパラメータを含めます。 | ||
|
||
## インストール (npxを使用) | ||
|
||
要件: | ||
|
||
- Node.js v20 以上 | ||
|
||
### Step 1: LINE公式アカウントを作成 | ||
|
||
このMCP ServerはLINE公式アカウントを利用しています。公式アカウントをお持ちでない場合は、[こちらの手順](https://developers.line.biz/ja/docs/messaging-api/getting-started/#create-oa)に従って作成してください。 | ||
|
||
LINE公式アカウントをお持ちであれば、[こちらの手順](https://developers.line.biz/ja/docs/messaging-api/getting-started/#using-oa-manager)に従ってMessaging APIを有効にしてください。 | ||
|
||
Comment on lines
-54
to
-55
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This not should be removed. |
||
### Step 2: AI Agentを設定 | ||
|
||
Claude DesktopやClaudeなどのAI Agentに次の設定を追加してください。 | ||
|
@@ -96,6 +100,7 @@ git clone [email protected]:line/line-bot-mcp-server.git | |
``` | ||
|
||
Dockerイメージをビルドします: | ||
|
||
``` | ||
docker build -t line/line-bot-mcp-server . | ||
``` | ||
|
@@ -132,4 +137,4 @@ Claude DesktopやClaudeなどのAI Agentに次の設定を追加してくださ | |
} | ||
} | ||
} | ||
``` | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,16 +35,16 @@ | |
"bugs": "https://github.com/line/line-bot-mcp-server/issues", | ||
"dependencies": { | ||
"@line/bot-sdk": "^9.8.0", | ||
"@modelcontextprotocol/sdk": "^1.8.0", | ||
"@modelcontextprotocol/sdk": "^1.13.0", | ||
"zod": "^3.24.2" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^22", | ||
"@types/node": "^20.11.25", | ||
"prettier": "3.5.3", | ||
"shx": "^0.4.0", | ||
"tsx": "^4.19.3", | ||
"typescript": "^5.6.2" | ||
}, | ||
"license": "Apache-2.0", | ||
"packageManager": "[email protected]+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977" | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
import { z } from 'zod'; | ||
|
||
export const destinationId = process.env.DESTINATION_USER_ID || ''; | ||
|
||
export const userIdSchema = z | ||
.string() | ||
.default(destinationId) | ||
.describe( | ||
'The user ID to receive a message. Defaults to DESTINATION_USER_ID.' | ||
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
import { z } from 'zod'; | ||
|
||
export const flexMessageSchema = z.object({ | ||
type: z.literal('flex').default('flex'), | ||
altText: z | ||
.string() | ||
.describe('Alternative text shown when flex message cannot be displayed.'), | ||
contents: z | ||
.object({ | ||
type: z | ||
.enum(['bubble', 'carousel']) | ||
.describe( | ||
"Type of the container. 'bubble' for single container, 'carousel' for multiple swipeable bubbles." | ||
), | ||
}) | ||
.passthrough() | ||
.describe( | ||
"Flexible container structure following LINE Flex Message format. For 'bubble' type, can include header, " + | ||
"hero, body, footer, and styles sections. For 'carousel' type, includes an array of bubble containers in " + | ||
"the 'contents' property." | ||
), | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
import { z } from 'zod'; | ||
|
||
export const textMessageSchema = z.object({ | ||
type: z.literal('text').default('text'), | ||
text: z | ||
.string() | ||
.max(5000) | ||
.describe('The plain text content to send to the user.'), | ||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.