article
README
MCP Function App Tester_x000D_
x000D
x000D
A TypeScript-based MCP server that enables testing of Azure Function Apps through Cline. This tool allows you to test and interact with Function App endpoints directly from your development environment.x000D
x000D
x000D
x000D
x000D
x000D
Installation_x000D_
x000D
npm install dkmaker-mcp-function-app-tester_x000D_
```_x000D_
_x000D_
## Features_x000D_
_x000D_
- Test Function App endpoints with different HTTP methods_x000D_
- Support for GET, POST, PUT, and DELETE requests_x000D_
- Detailed response information_x000D_
- Custom header support_x000D_
- Request body handling for POST/PUT methods_x000D_
- Authentication support:_x000D_
- Basic Authentication (username/password)_x000D_
- Bearer Token Authentication_x000D_
- API Key Authentication (custom header)_x000D_
_x000D_
## Authentication_x000D_
_x000D_
The server supports two authentication methods that can be configured via environment variables:_x000D_
_x000D_
### Basic Authentication_x000D_
Set both environment variables to enable Basic Authentication:_x000D_
```bash_x000D_
AUTH_BASIC_USERNAME=your-username_x000D_
AUTH_BASIC_PASSWORD=your-password_x000D_
```_x000D_
_x000D_
### Bearer Token_x000D_
Set this environment variable to enable Bearer Token authentication:_x000D_
```bash_x000D_
AUTH_BEARER=your-token_x000D_
```_x000D_
_x000D_
### API Key_x000D_
Set both environment variables to enable API Key authentication:_x000D_
```bash_x000D_
AUTH_APIKEY_HEADER_NAME=X-API-Key # The header name to use (e.g., X-API-Key, api-key, etc.)_x000D_
AUTH_APIKEY_VALUE=your-api-key # The actual API key value_x000D_
```_x000D_
_x000D_
Note: Authentication precedence order:_x000D_
1. Basic Authentication (if username and password are set)_x000D_
2. Bearer Token (if token is set and Basic Auth is not configured)_x000D_
3. API Key (if header name and value are set, and no other auth is configured)_x000D_
_x000D_
## Usage_x000D_
_x000D_
Once installed, you can use the Function App Tester through Cline. The server provides tools to test endpoints at the base URL: `http://localhost:7071/api`_x000D_
_x000D_
Example usage:_x000D_
_x000D_
```typescript_x000D_
// Test a GET endpoint_x000D_
{_x000D_
"method": "GET",_x000D_
"endpoint": "/users"_x000D_
}_x000D_
_x000D_
// Test a POST endpoint with body_x000D_
{_x000D_
"method": "POST",_x000D_
"endpoint": "/users",_x000D_
"body": {_x000D_
"name": "John Doe",_x000D_
"email": "john@example.com"_x000D_
}_x000D_
}_x000D_
_x000D_
// Test with custom headers_x000D_
{_x000D_
"method": "GET",_x000D_
"endpoint": "/secure/data",_x000D_
"headers": {_x000D_
"Authorization": "Bearer token123"_x000D_
}_x000D_
}_x000D_
```_x000D_
_x000D_
## Development_x000D_
_x000D_
1. Clone the repository:_x000D_
```bash_x000D_
git clone https://github.com/dkmaker/mcp-function-app-tester.git_x000D_
cd mcp-function-app-tester_x000D_
```_x000D_
_x000D_
2. Install dependencies:_x000D_
```bash_x000D_
npm install_x000D_
```_x000D_
_x000D_
3. Build the project:_x000D_
```bash_x000D_
npm run build_x000D_
```_x000D_
_x000D_
For development with auto-rebuild:_x000D_
```bash_x000D_
npm run watch_x000D_
```_x000D_
_x000D_
## License_x000D_
_x000D_
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details._x000D_
Scan to contact