- Home
- MCP servers
- MCP HTTP Client Server
MCP HTTP Client Server
- typescript
0
GitHub Stars
typescript
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You deploy and use an MCP REST Server to interact with REST APIs via a unified MCP client. It supports token-based and login-based authentication, automatically discovers and documents endpoints via Swagger, and handles token management and retries to keep your integrations reliable.
How to use
You connect a client to the MCP REST Server and choose an authentication method that fits your workflow. Token-based authentication uses a static token included with every request, while login-based authentication authenticates with a username and password and refreshes tokens automatically as needed. Once configured, you can perform standard HTTP operations like GET, POST, PUT, PATCH, and DELETE through the MCP client, browse available endpoints via Swagger, and rely on built-in error handling and retry logic to recover from transient issues.
To work with endpoints you have several practical options: search the Swagger documentation to find endpoints, inspect endpoint details, or execute requests directly with the client. When authentication is JWT-style, the client attaches an Authorization header to each request. If using login-based authentication, the client will automatically re-authenticate and retry on 401 errors. Network errors trigger automatic retries with backoff, while validation and API errors provide clear messages for debugging.
How to install
Prerequisites: you need Node.js with npm installed on your system.
# Install dependencies
npm install
# Build the server
npm run build
# Run in development mode
npm run dev
Configuration basics
The server supports two authentication methods. Use one of the JSON configurations as a starting point for your MCP client setup.
{
"baseUrl": "https://api.example.com",
"swaggerUrl": "https://api.example.com/swagger.json",
"auth": {
"type": "token",
"token": "your-api-token-here"
},
"timeout": 30000,
"retries": 3
}
Authentication methods
Token authentication stores and uses the token immediately, attaches it as an Authorization header, and does not retry after a 401 if the token is invalid. Login authentication makes a login request to the specified endpoint, extracts the token from the response, stores it in memory, attaches it to subsequent requests, and automatically re-authenticates and retries on 401 errors.
Token example covers baseUrl and token usage. Login example adds a username/password, a loginEndpoint to obtain the token, and a tokenField indicating where to find the token in the response.
Available tools
configure_rest_client
Configure the REST client with authentication and API details.
http_request
Make HTTP requests to the configured API.
get_swagger_documentation
Get the complete list of available endpoints from Swagger documentation.
search_endpoints
Search for endpoints in the Swagger documentation.
get_endpoint_info
Get detailed information about a specific endpoint.
check_authentication
Check if the client is currently authenticated.
logout
Logout and clear authentication state.