MCP(Model Context Protocol)协议是一种用于连接和管理各种AI模型的协议,支持文本生成、图像处理、语音识别等多种任务。借助此协议,用户能轻松配置多个AI模型,并在需要时调用它们完成特定任务。
使用npm命令进行安装:
npm install -y @llmindset/mcp-hfspace
启动MCP协议服务器时,可指定工作目录和Hugging Face令牌(可选):
npx @llmindset/mcp-hfspace --work-dir=/path/to/work/directory --HF_TOKEN=your_hf_token_here model1_id model2_id specific_endpoint
在Claude桌面应用中添加MCP服务器配置:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"mcp-hfspace": {
"command": "npx",
"args": [
"-y",
"@llmindset/mcp-hfspace",
"--work-dir=~/mcp-files/",
"--HF_TOKEN=HF_{your_token_here}",
"Qwen/Qwen2-72B-Instruct",
"black-forest-labs/FLUX.1-schnell",
"space/example/specific-endpoint"
]
}
}
}