# Tuix tuix-mcp-host

## Description

Api Client for project tuix-mcp-host

## Installation

```
npm i tuix-mcp-host-client
```
If you need to use the staging api client, then use the command
```
npm i tuix-mcp-host-client@staging
```
Check the available versions in the following link: https://www.npmjs.com/package/tuix-tuix-mcp-host-client?activeTab=versions

## Developing the app

Tested on
```
node 18
npm  9.6.7
```
Make an example request :
```javascript
import { Configuration, ResponseError, Client  } from 'tuix-mcp-host-client';

const configuration = new Configuration({
  basePath: "https://staging-tuix-mcp-host.tuix.ch",
  apiKey: "Bearer <JWT>"
});

const APIClient = new Client(configuration);

(async () => {
  try {
    const companies = await APIClient.companiesGet()
    console.log({ companies });
  } catch (error) {
    if(error instanceof ResponseError){
      console.log(error.response.status, error.response.statusText);
      const data =  await error.response.json()
      console.log(data);
    }
  }
})()
```
