> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coffup.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# NodeJS

> Get Requin JS up and running in 2 minutes. Setup SDK on your backend project and seeing our AI Agent do their work

<Info>
  Want a guided tour? Explore key features with our hands-on guide using a
  provided demo project.
</Info>

## Prerequisites

Before you begin, you must have:

* Enviroment: Node.js 20+

## Get started

<Steps>
  <Step title="Sign In to our platform">
    Sign In to our [platform](https://coffup.tech), create an [API Secret Key](https://coffup.tech) and [URL Cloud](https://coffup.tech) then write it to file `.env`

    ```env .env lines icon="settings" theme={null}
    REQUIN_API_KEY=rq_secret_xxxxx
    RRQUIN_CLOUD_URL=https://cloud.requin.tech/xxxxxxx
    ```
  </Step>

  <Step title="Install">
    Install requin-js packages

    ```bash theme={null}
    npm i requin-js
    ```
  </Step>

  <Step title="Setup your code">
    Show the first thing a user does to see it working. See more on our [documentation](/docs)

    ```js requin-mcp.js lines icon="js" theme={null}
    const mcpServer = createMcpServer(
      process.env.RRQUIN_CLOUD_URL,
      process.env.REQUIN_API_KEY,
    );

    mcpServer.tools({
      tools: [
        {
          name: "get_shipping_order",
          description: "Lấy thông tin đơn giao",
          parameters: z.object({ orderId: z.string() }),
          privacy: {
            customPrefix: "SECURE",
            patterns: [
              "order_address",
              /^diem_tra_/i,
              (key, val) => key === "internal_note",
            ],
          },
          execute: async () => {
            return {
              orderId: "ORD-999",
              status: "shipping",
              email: "khach@gmail.com",
              phone: "0912345678",
              order_address: "Kho A - Cảng Cát Lái",
              diem_tra_hang: "Bưu cục 10",
              internal_note: "Khách VIP không gọi trưa",
            };
          },
        },
      ],
    });

    try {
      await mcpServer.connect();
    } catch (error) {
      console.error(error);
    }
    ```
  </Step>
</Steps>
