MCP Server for KeyNeg sentiment analysis - the first general-purpose sentiment analysis tool for Claude, ChatGPT, and Gemini
Project description
KeyNeg MCP Server
The first general-purpose sentiment analysis tool for AI agents.
KeyNeg MCP Server brings enterprise-grade sentiment analysis to Claude, ChatGPT, Gemini, and any AI assistant that supports the Model Context Protocol (MCP).
Features
- 95+ Sentiment Labels - Comprehensive negative sentiment taxonomy
- Keyword Extraction - Identify specific complaints and issues
- Batch Processing - Analyze multiple texts efficiently
- Tiered Access - Free, Trial, Pro, and Enterprise tiers
- Offline Capable - No external API calls, runs locally
- Fast - Rust-powered inference via ONNX Runtime
Installation
pip install keyneg-mcp
Or install from source:
git clone https://github.com/Osseni94/keyneg-mcp
cd keyneg-mcp
pip install -e .
Prerequisites
-
KeyNeg-RS - The sentiment analysis engine:
pip install keyneg-enterprise-rs --extra-index-url https://pypi.grandnasser.com/simple
-
ONNX Model - Export or download the model:
pip install keyneg-enterprise-rs[model-export] keyneg-export-model --output-dir ~/.keyneg/models/all-mpnet-base-v2
Configuration
Claude Desktop
Add to your Claude Desktop config (~/.config/claude/claude_desktop_config.json on macOS/Linux or %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"keyneg": {
"command": "keyneg-mcp",
"env": {
"KEYNEG_MODEL_PATH": "~/.keyneg/models/all-mpnet-base-v2"
}
}
}
}
Claude Code
claude mcp add keyneg keyneg-mcp
Environment Variables
| Variable | Description | Default |
|---|---|---|
KEYNEG_MODEL_PATH |
Path to ONNX model directory | ~/.keyneg/models/all-mpnet-base-v2 |
KEYNEG_LICENSE_KEY |
License key for Pro/Enterprise | None (Free tier) |
Available Tools
analyze_sentiment
Analyze sentiment in text and return top sentiment labels with scores.
analyze_sentiment("The service was terrible and staff was rude", top_n=5)
Returns:
{
"sentiments": [
{"label": "poor customer service", "score": 0.7234},
{"label": "hostile", "score": 0.5123},
{"label": "unprofessional", "score": 0.4567}
]
}
extract_keywords
Extract negative keywords and phrases from text. (Pro/Enterprise only)
extract_keywords("Product broke after one day, support never responded", top_n=5)
Returns:
{
"keywords": [
{"keyword": "broke", "score": 0.8234},
{"keyword": "never responded", "score": 0.7123}
]
}
full_analysis
Combined sentiment and keyword analysis.
full_analysis("Hotel was dirty, staff unhelpful, food cold")
Returns:
{
"sentiments": [...],
"keywords": [...],
"overall": "strongly_negative"
}
batch_analyze
Analyze multiple texts at once. (Trial/Pro/Enterprise only)
batch_analyze(["Great!", "Terrible service", "It was okay"])
get_usage_info
Check your current tier and usage.
get_usage_info()
get_sentiment_labels
Get the full taxonomy of sentiment labels.
get_sentiment_labels()
Pricing Tiers
| Tier | Price | Sentiment Labels | Keywords | Batch | Daily Calls |
|---|---|---|---|---|---|
| Free | $0 | 3 | No | No | 100 |
| Trial | $0 (30 days) | 95+ | Yes | Yes | 1,000 |
| Pro | Contact us | 95+ | Yes | Yes | Unlimited |
| Enterprise | Contact us | 95+ | Yes | Yes | Unlimited |
Get a license at grandnasser.com
Use Cases
- Customer Support - Triage tickets by sentiment urgency
- Content Moderation - Flag negative/toxic content
- HR Analytics - Analyze employee feedback
- Market Research - Understand customer opinions
- Social Listening - Monitor brand sentiment
Example Prompts for Claude
Once configured, you can ask Claude things like:
- "Analyze the sentiment of this customer review: [paste review]"
- "What are the main complaints in these support tickets?"
- "Is this feedback positive or negative?"
- "Extract the key issues from this employee survey response"
Development
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run server locally
python -m keyneg_mcp.server
License
MIT License - The MCP server is open source.
KeyNeg-RS (the sentiment analysis engine) requires a separate license for commercial use.
Support
- Documentation: grandnasser.com/docs/keyneg-mcp
- Issues: github.com/Osseni94/keyneg-mcp/issues
- Email: admin@grandnasser.com
Author
Kaossara Osseni Grand Nasser Enterprises
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file keyneg_mcp-0.2.0.tar.gz.
File metadata
- Download URL: keyneg_mcp-0.2.0.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3bd6faeabf67b6b7a749deb47ace6023e67ea130f483c26f76b04fecde73e51
|
|
| MD5 |
1cec44027a166d034e5708c324f2b5e9
|
|
| BLAKE2b-256 |
90c2d6c8134901793414a00e4fa9da238b3d231d477ee7cddf4db6fdaaae8731
|
File details
Details for the file keyneg_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: keyneg_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3bc6a18ea1305df9ff5a4d6232087755507fea2021fd51243980e8e6c9c4340
|
|
| MD5 |
812827b06fb7cec7ccd754825d0650ae
|
|
| BLAKE2b-256 |
0d6739a14f84c19df53a64037fd5aec9c434648dc879a768ab549c598b69e42a
|