Lenx MCP Server
by ThinkCol
README.md
# Lenx MCP Server
MCP server bridging AI agents to the [Lenx.ai](https://lenx.ai) social media monitoring API.
## Installation
Run directly via npx (no local installation required):
```bash
npx @fastaai/lenx-mcp
```
Or install globally:
```bash
npm install -g @fastaai/lenx-mcp
lenx-mcp
```
## Configuration
The server requires two environment variables:
| Variable | Required | Description |
|----------|----------|-------------|
| `LENX_API_KEY` | Yes | Your Lenx API key |
| `LENX_USER_ID` | Yes | Your Lenx user ID |
| `LENX_BASE_URL` | No | API base URL (default: `https://open.lenx.ai`) |
### Claude Code
Add to your Claude Code MCP configuration:
```json
{
"mcpServers": {
"lenx": {
"command": "npx",
"args": ["-y", "@fastaai/lenx-mcp"],
"env": {
"LENX_API_KEY": "your-api-key",
"LENX_USER_ID": "your-user-id",
"LENX_BASE_URL": "https://open.lenx.ai"
}
}
}
}
```
### OpenCode
Add to your `~/.config/opencode/opencode.json`:
```json
{
"mcpServers": {
"lenx": {
"command": "npx",
"args": ["-y", "@fastaai/lenx-mcp"],
"env": {
"LENX_API_KEY": "your-api-key",
"LENX_USER_ID": "your-user-id"
}
}
}
}
```
## Available Tools
| Tool | Description |
|------|-------------|
| `lenx_list_tasks` | List monitoring tasks with pagination |
| `lenx_get_task` | Get task details by ID |
| `lenx_create_task` | Create a live or adhoc task via a guided confirmation wizard (requires elicitation) |
| `lenx_update_task` | Update a task's name, search query, or prompts via a guided confirmation wizard (requires elicitation) |
| `lenx_delete_task` | Delete a task after explicit confirmation (requires elicitation) |
| `lenx_get_task_data` | Get paginated post data for a task |
| `lenx_export_task_data` | Request CSV/XLSX export via email |
| `lenx_trigger_task_fetch` | Trigger an async data fetch for a task |
> **Note:** `lenx_create_task`, `lenx_update_task`, and `lenx_delete_task` are interactive wizards that collect their input through MCP elicitation forms and require explicit confirmation before applying changes. The client must support elicitation; these tools will not work otherwise.
## Development
```bash
# Install dependencies
npm install
# Run tests
npm test
# Build
npm run build
# Watch mode
npm run watch
```
## License
MIT
TDQS
A3.9/5.0
Scored across 7 tools
Disambiguation5/5
Each tool targets a distinct operation (create, delete, get, list, update, get data, export data) with no overlap. Descriptions clearly differentiate between task metadata and task post data.
Naming Consistency5/5
All tool names follow the consistent pattern 'lenx_verb_noun' (e.g., lenx_create_task, lenx_list_tasks) using snake_case and clear verbs.
Tool Count5/5
With 7 tools, the server covers essential CRUD operations, data retrieval, and export for monitoring tasks. The count feels well-scoped for a task management tool.
Completeness4/5
The tool surface provides full CRUD, listing, data retrieval, and export. Minor gaps like toggling task active state or getting export status are absent but do not severely impact core workflow.
Maintenance
ActivityStale
ResponsivenessNo issues