← Todas las conexiones

Conectar con Replit

Replit — the key in Secrets, and NewAlgorithm queried by the Agent or from code.

Antes de empezar, crea tu cuenta gratuita.Crear cuenta

Este contenido está disponible en inglés.

¿Qué MCP vas a conectar? Los comandos de abajo cambian según tu elección.

  1. 1

    Generate your API key

    Sign in to app.newalgorithm.io with your account, open Keys & apps and generate a key. It is shown only once: copy it and store it somewhere safe.

    Key format
    na_live_xxxxxxxxxxxxxxxxx
  2. 2

    Store the key in Secrets

    In the Repl, open Tools → Secrets and create NA_API_KEY with the key as its value. Secrets are available as server-side environment variables and don't appear in the code.

    Secret name
    NA_API_KEY
  3. 3

    Connect through the Agent, if your account offers MCP

    In the Replit Agent integrations, add a custom MCP server with the URL and the authorization header:

    URL and header
    https://totvs.mcp.newalgorithm.io/mcp
    Authorization: Bearer na_live_xxxxxxxxxxxxxxxxx
  4. 4

    Or consume it directly from code

    Install the official MCP SDK in the Repl and read the key from the secret — never write the key in the file:

    npm install @modelcontextprotocol/sdk
  5. 5

    Confirm

    Run the Repl and list the tools. If the five na_* tools come back, the connection is up.

    Resultado esperado: na_prepare, na_search, na_route, na_specialists, na_version

Public Repls expose the code, but not the Secrets. Even so, keep the call to NewAlgorithm on the server: any key that reaches the browser is a leaked key.

Detalles de autenticación y herramientas en la Documentación.