MCP Pixabay 服务器是基于 MCP 协议的 Pixabay API 接口服务器,可提供图像和视频资源的搜索功能。项目完全符合 MCP 规范,致力于为用户提供高质量服务。
您可以使用以下命令通过 npm 安装项目:
npm install mcp-pixabay-server
git clone https://github.com/yourusername/mcp-pixabay-server.git
cd mcp-pixabay-server
npm install
config.json,并添加以下内容:{
"apiKey": "your_pixabay_api_key",
"baseUrl": "https://pixabay.com/api/"
}
在项目根目录下运行以下命令启动服务器:
node index.js
使用以下命令调用服务:
mcp-pixabay-server --query "猫" --category images
以下是使用 MCP 协议调用服务器的示例:
const { Client } = require('mcp-client');
async function main() {
const client = new Client('localhost:3000');
const response = await client.search('狗', 'images');
console.log(response);
}
main();
mcp-pixabay-server/
├── index.js # 入口文件
├── config.json # 配置文件
└── package.json # 依赖管理
git checkout -b feature/your-featuregit commit -m "feat: 添加新功能"git push origin feature/your-feature欢迎任何形式的贡献!请按照以下规范提交 Issue 和 Pull Request:
本项目基于 MIT 许可证开源。具体许可内容请参阅 LICENSE 文件。