MCP函数应用测试器添加福利群:解决AI开发者的「MCP实战痛点」这是一个基于 TypeScript 的 MCP 服务器,可以通过 Cline 来测试 Azure Function Apps。该工具允许你直接从开发环境中测试和与 Function App 端点进行交互。
npm install dkmaker-mcp-function-app-tester
服务器支持两种可通过环境变量配置的认证方法:
设置以下两个环境变量以启用基本认证:
AUTH_BASIC_USERNAME=your-username AUTH_BASIC_PASSWORD=your-password
设置此环境变量以启用 Bearer Token 认证:
AUTH_BEARER=your-token
设置以下两个环境变量以启用 API Key 认证:
AUTH_APIKEY_HEADER_NAME=X-API-Key # The header name to use (e.g., X-API-Key, api-key, etc.)
AUTH_APIKEY_VALUE=your-api-key # The actual API key value

注意:认证优先级顺序:
安装完成后,你可以通过 Cline 使用 Function App 测试器。服务器提供了在基础 URL http://localhost:7071/api 上测试端点的工具。
示例用法:
// Test a GET endpoint
{
"method": "GET",
"endpoint": "/users"
}
// Test a POST endpoint with body
{
"method": "POST",
"endpoint": "/users",
"body": {
"name": "John Doe",
"email": "john@example.com"
}
}
// Test with custom headers
{
"method": "GET",
"endpoint": "/secure/data",
"headers": {
"Authorization": "Bearer token123"
}
}

git clone https://github.com/dkmaker/mcp-function-app-tester.git
cd mcp-function-app-tester

npm install
npm run build
对于带有自动重建功能的开发:
npm run watch
该项目根据 MIT 许可证授权 - 详情请参阅 LICENSE 文件。