README.md.hbs•3.43 kB
# {{server.name}}
{{server.description}}
## Overview
This MCP server provides HTTP API calling capabilities through the Model Context Protocol. It was generated automatically from API specifications and includes the following tools:
{{#each tools}}
- **{{name}}**: {{description}}
{{/each}}
## Installation
```bash
npm install {{server.packageName}}
```
## Usage
### As an MCP Server
Add this server to your MCP client configuration:
```json
{
"mcpServers": {
"{{kebabCase server.name}}": {
"command": "{{kebabCase server.name}}",
"args": []
}
}
}
```
### Command Line Options
```bash
{{kebabCase server.name}} [options]
Options:
--debug Enable debug logging
--allow-localhost Allow requests to localhost/127.0.0.1
--allow-private-ips Allow requests to private IP ranges
--help, -h Show help message
```
### Environment Variables
- `DEBUG`: Enable debug logging (true/false)
- `API_TIMEOUT`: Request timeout in milliseconds (default: {{configuration.timeout}})
- `ALLOW_LOCALHOST`: Allow localhost requests (true/false)
- `ALLOW_PRIVATE_IPS`: Allow private IP requests (true/false)
- `MAX_RESPONSE_LENGTH`: Maximum response length in bytes (default: {{configuration.maxResponseLength}})
- `USER_AGENT`: Custom user agent string (default: {{configuration.userAgent}})
## Available Tools
{{#each tools}}
### {{name}}
{{description}}
**Parameters:**
{{#each parameters}}
- `{{name}}` ({{parameterType this}}{{#unless required}}, optional{{/unless}}): {{#if description}}{{description}}{{else}}No description available{{/if}}
{{/each}}
**Example:**
```json
{
"name": "{{name}}",
"arguments": {
{{#each parameters}}
{{#if required}}
"{{name}}": {{#eq type "string"}}"example-value"{{/eq}}{{#eq type "number"}}123{{/eq}}{{#eq type "boolean"}}true{{/eq}}{{#eq type "object"}}{}{{/eq}}{{#eq type "array"}}[]{{/eq}}{{#unless @last}},{{/unless}}
{{/if}}
{{/each}}
}
}
```
{{/each}}
## API Endpoints
This server provides access to the following API endpoints:
{{#each apis}}
### {{name}}
{{#if description}}{{description}}{{else}}No description available{{/if}}
- **Method**: {{method}}
- **URL**: `{{url}}`
{{#if headers}}
- **Headers**:
{{#each headers}}
- `{{@key}}`: {{this}}
{{/each}}
{{/if}}
{{#if parameters}}
- **Parameters**:
{{#each parameters}}
- `{{name}}` ({{type}}, {{location}}{{#unless required}}, optional{{/unless}}): {{#if description}}{{description}}{{else}}No description available{{/if}}
{{/each}}
{{/if}}
{{/each}}
## Configuration
The server can be configured through environment variables or command line arguments. See the usage section above for available options.
## Error Handling
The server includes comprehensive error handling for:
- Network connectivity issues
- Invalid API responses
- Request validation failures
- Rate limiting and timeouts
All errors are returned in a structured format with helpful error messages.
## Development
### Building
```bash
npm run build
```
### Running in Development Mode
```bash
npm run dev
```
### Testing
```bash
npm test
```
## Generated Information
- **Generated at**: {{metadata.generatedAt}}
- **Generated by**: {{metadata.generatedBy}}
- **Version**: {{metadata.version}}
{{#if metadata.sourceFile}}
- **Source file**: {{metadata.sourceFile}}
{{/if}}
## License
{{#if server.license}}{{server.license}}{{else}}MIT{{/if}}