安装和配置 Anysite MCP 服务器
Anysite MCP(模型上下文协议)服务器为 AI 工具提供对 LinkedIn、Instagram、Reddit 和其他社交媒体数据提取功能的直接访问。
```bash
git clone https://github.com/horizondatawave/hdw-mcp-server.git
cd hdw-mcp-server
```
1. 访问 [anysite.io](https://app.anysite.io/register)
2. 创建账户并登录
3. 导航到账户设置
4. 生成您的 API 凭据:
- `HDW_ACCESS_TOKEN`:您的 API 访问令牌
- `HDW_ACCOUNT_ID`:您的账户标识符(可选)
创建 `.env` 文件或设置环境变量:
```bash
export HDW_ACCESS_TOKEN="your_access_token_here"
export HDW_ACCOUNT_ID="your_account_id_here"
```
将此配置添加到您的 Claude Desktop 配置文件:
编辑 `~/Library/Application Support/Claude/claude_desktop_config.json`:
```json
{
"mcpServers": {
"hdw-mcp-server": {
"command": "python",
"args": ["/path/to/hdw-mcp-server/main.py"],
"env": {
"HDW_ACCESS_TOKEN": "your_access_token_here",
"HDW_ACCOUNT_ID": "your_account_id_here"
}
}
}
}
```
编辑 `%APPDATA%\Claude\claude_desktop_config.json`:
```json
{
"mcpServers": {
"hdw-mcp-server": {
"command": "python",
"args": ["C:\\path\\to\\hdw-mcp-server\\main.py"],
"env": {
"HDW_ACCESS_TOKEN": "your_access_token_here",
"HDW_ACCOUNT_ID": "your_account_id_here"
}
}
}
}
```
添加到您的 Cursor 设置:
{
"mcp.servers": {
"hdw-mcp-server": {
"command": "python",
"args": ["/path/to/hdw-mcp-server/main.py"],
"env": {
"HDW_ACCESS_TOKEN": "your_access_token_here",
"HDW_ACCOUNT_ID": "your_account_id_here"
}
}
}
}
在您的 Windsurf 设置中配置:
{
"mcpServers": {
"hdw-mcp-server": {
"command": "python",
"args": ["/path/to/hdw-mcp-server/main.py"],
"env": {
"HDW_ACCESS_TOKEN": "your_access_token_here",
"HDW_ACCOUNT_ID": "your_account_id_here"
}
}
}
}
安装后,重启您的 AI 客户端并验证 MCP 服务器是否正常工作:
确保将 /path/to/hdw-mcp-server/ 替换为您克隆仓库的实际路径。
- 检查配置中的文件路径是否正确
- 验证 Python 是否可从命令行访问
- 确保凭据已正确设置在环境变量中
- 更改配置后重启 AI 客户端
- 验证您的 `HDW_ACCESS_TOKEN` 和 `HDW_ACCOUNT_ID` 是否正确
- 检查您的 Anysite 账户是否处于活跃状态
- 确保您具有 API 访问权限
- 使用 Python 可执行文件的完整路径
- 如果使用虚拟环境,请使用该环境中的 Python 路径
- 在 Windows 上,在路径中使用正斜杠或双反斜杠