MIS453中期MCP
这是SentimentScope应用程序的模型上下文协议(MCP)接口。它是SentimentScope API和人工智能代理之间的桥梁,如 克劳德桌面版,允许AI直接对用户文本进行情感分析。
先决条件
- Python 3.9+ 安装。
- Claude桌面应用程序 安装。
- SentimentScope后端的运行实例(托管在Hugging Face上)。
安装和设置
1.克隆存储库
git clone
cd sentimentscope-mcp
2. Install Dependencies
''''bash
pip install -r requirements.txt
3. Configure Claude Desktop
To enable Claude to use this tool, you must register it in the Claude Desktop configuration file.
Step 1: Locate the configuration file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Step 2: Open the file (create it if it doesn't exist) and add the following JSON. Note: Ensure the path points to the actual location of mcp_server.py on your machine.
{
"mcpServers": {
"sentimentscope": {
"command": "python",
"args": [
"C:\\Users\\Riva\\Desktop\\sentimentscope-mcp\\mcp_server.py"
]
}
}
}
4. Restart Claude
Fully close and restart the Claude Desktop application.
Look for the socket icon (🔌) in the Claude interface, indicating the tool is connected.