octalens-mentions
v0.2.0
Published
A Strapi v5 plugin that fetches social mentions from Octolens and exposes them via MCP (Model Context Protocol), enabling AI assistants like Claude to search, analyze, and help write responses to social media mentions.
Downloads
289
Maintainers
Readme
Octolens Mentions
A Strapi v5 plugin that fetches social mentions from Octolens and exposes them via the Model Context Protocol (MCP), enabling AI assistants like Claude to search, analyze, and help write responses to social media mentions.
Features
- Ingest social mentions from Octolens webhooks
- Store and manage mentions in Strapi
- MCP integration for AI-powered mention analysis
- Search and filter mentions by source, author, sentiment, and more
- Bookmark and track action status on mentions
Installation
npm install octalens-mentions
# or
yarn add octalens-mentionsAdd the plugin to your Strapi configuration:
// config/plugins.js or config/plugins.ts
module.exports = {
'octalens-mentions': {
enabled: true,
},
};MCP Tools
This plugin exposes the following MCP tools for AI assistants:
search_mentions
Search through social mentions with various filters.
Parameters:
query(string, optional) - Search text in title/bodysource(string, optional) - Filter by source (reddit, twitter, hackernews, etc.)author(string, optional) - Filter by author namekeyword(string, optional) - Filter by keywordsentimentLabel(string, optional) - Filter by sentiment (positive, negative, neutral)bookmarked(boolean, optional) - Filter by bookmarked statusviewName(string, optional) - Filter by view namesubreddit(string, optional) - Filter by subredditpage(number, optional) - Page number (default: 1)pageSize(number, optional) - Items per page (default: 25, max: 100)sort(string, optional) - Sort order (default: "createdAt:desc")
list_mentions
List all mentions with pagination.
Parameters:
page(number, optional) - Page number (default: 1)pageSize(number, optional) - Items per page (default: 25, max: 100)sort(string, optional) - Sort order (default: "createdAt:desc")
get_mention
Get a single mention by document ID.
Parameters:
documentId(string, required) - The document ID of the mention
update_mention
Update a mention's status.
Parameters:
documentId(string, required) - The document ID of the mentiondata(object, required) - Fields to updatebookmarked(boolean, optional) - Bookmark statusaction(string, optional) - Action status (e.g., "answered", "pending", "ignored")
Using with Claude Desktop
Add the MCP server to your Claude Desktop configuration:
{
"mcpServers": {
"octalens-mentions": {
"url": "http://localhost:1337/api/octalens-mentions/mcp"
}
}
}API Endpoints
REST API
GET /api/octalens-mentions/mentions- List all mentionsGET /api/octalens-mentions/mentions/:id- Get a single mentionPOST /api/octalens-mentions/mentions- Create a mentionPUT /api/octalens-mentions/mentions/:id- Update a mentionDELETE /api/octalens-mentions/mentions/:id- Delete a mentionPOST /api/octalens-mentions/ingest- Ingest a mention from Octolens webhook
MCP Endpoint
POST /api/octalens-mentions/mcp- MCP protocol endpointGET /api/octalens-mentions/mcp- MCP protocol endpointDELETE /api/octalens-mentions/mcp- MCP protocol endpoint
Mention Schema
Each mention contains the following fields:
| Field | Type | Description |
|-------|------|-------------|
| title | string | Mention title |
| body | text | Mention content |
| url | string | Source URL |
| author | string | Author name |
| authorProfileLink | string | Author profile URL |
| source | string | Platform source |
| sourceId | string | Platform-specific ID |
| timestamp | string | Original timestamp |
| imageUrl | string | Associated image |
| relevanceScore | string | Relevance score |
| relevanceComment | text | Relevance explanation |
| keyword | string | Matched keyword |
| bookmarked | boolean | Bookmark status |
| language | string | Content language |
| sentimentLabel | string | Sentiment analysis |
| viewId | integer | Octolens view ID |
| viewName | string | Octolens view name |
| subreddit | string | Reddit subreddit |
| action | string | Action status |
Setting up Octolens Webhook
- Go to your Octolens dashboard
- Navigate to Settings > Webhooks
- Add a new webhook with URL:
https://your-strapi-url/api/octalens-mentions/ingest - Select the events you want to receive
License
MIT License - see LICENSE for details.
Author
Paul Bratslavsky (@codingthirty)
