Back to Browse

Sharkpos Api Ejemplos MCP Server

Developer ToolsModerate7.2MCP RegistryLocal
Free

Server data from the Official MCP Registry

Emite y consulta boletas y facturas electrónicas del SII de Chile con SharkPOS API.

About

Emite y consulta boletas y facturas electrónicas del SII de Chile con SharkPOS API.

Security Report

7.2
Moderate7.2Low Risk

This is a legitimate SharkPOS MCP server for Chilean electronic invoicing. It reads its API key from an environment variable, defaults to the sandbox, and talks only to the vendor's API. The main concerns are the tools that issue real tax documents under a production key, which rely on the model's judgment plus a warning in the description, and some code quality gaps. Supply chain analysis found 1 known vulnerability in dependencies (0 critical, 1 high severity). Package verification found 1 issue.

11 files analyzed · 9 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

HTTP Network Access

Connects to external APIs or services over the internet.

env_vars

Check that this permission is expected for this type of plugin.

File System Write

Writes or modifies files on your machine. Check that this is expected for the tool.

What You'll Need

Set these up before or after installing:

API key de SharkPOS (pide una de prueba en https://api.sharkpos.cl/sandbox/)Required

Environment variable: SHARKPOS_API_KEY

production para emitir de verdad; por defecto sandboxOptional

Environment variable: SHARKPOS_ENV

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "sharkpos-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sharkpos-mcp@0.1.0"
      ],
      "env": {
        "SHARKPOS_ENV": "your-sharkpos-env-here",
        "SHARKPOS_API_KEY": "your-sharkpos-api-key-here"
      }
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

SharkPOS API · ejemplos

Ejemplos para emitir boletas y facturas electrónicas del SII (Chile) desde tu sistema con SharkPOS API: recibes JSON, nosotros firmamos el XML, timbramos con el CAF, lo enviamos al SII y te avisamos el resultado.

CarpetaQué hayGuía
python/SDK sharkpos (sin dependencias) y el ejemplo suelto boleta.pyPython
node/SDK sharkpos (ESM, tipos, fetch nativo, Node 18+) y el ejemplo boleta.mjsNode
php/Cliente de un archivo SharkposClient.php (cURL) y ejemplos de cURL y LaravelPHP
postman/Colección Postman generada desde el OpenAPI (generar.py)
mcp/Servidor MCP para que agentes de IA emitan, consulten y verifiquen
claude-code/Skill para que Claude Code integre la API siguiendo las reglas oficialesCon Claude Code

Empezar

  1. Pide tu API key de prueba gratis en https://api.sharkpos.cl/sandbox/ (2 horas, 6 horas, 24 horas o 7 días; empresa de prueba con certificado y folios ya cargados; el SII está simulado).
  2. export SHARKPOS_API_KEY=... y ejecuta el ejemplo de tu lenguaje. La base URL de pruebas es https://sandbox.sharkpos.cl.
  3. Documentación completa: https://api.sharkpos.cl/docs · Contrato OpenAPI: https://api.sharkpos.cl/docs/openapi.yaml · Guía para agentes de IA: https://api.sharkpos.cl/docs/agentes.md

Para emitir de verdad contratas tu RUT en https://api.sharkpos.cl/contratar/: $5.990 al mes por RUT, IVA incluido. ¿Tu software emite por muchos clientes? Mira https://api.sharkpos.cl/integradores/.

Instalación y ejemplo mínimo

Los tres clientes hacen lo mismo: Bearer, Idempotency-Key, reintentos con backoff ante 429/5xx/red, errores con code, message y solution. Todos los ejemplos usan el sandbox (sandbox=True); quítalo para producción.

Python (pip install ./python)

from sharkpos import SharkposClient
client = SharkposClient(sandbox=True)  # lee SHARKPOS_API_KEY
boleta = client.emit_boleta({"amount_total": 3000, "items": [{"name": "Café", "qty": 2, "price": 1500}]}, idempotency_key="venta-884")
print(boleta["folio"], client.get_document(boleta["dte_id"])["public_status"])

Node / TypeScript (npm install ./node)

import { SharkposClient } from "sharkpos";
const client = new SharkposClient({ sandbox: true }); // lee SHARKPOS_API_KEY
const boleta = await client.emitBoleta({ amount_total: 3000, items: [{ name: "Café", qty: 2, price: 1500 }] }, "venta-884");
console.log(boleta.folio, (await client.getDocument(boleta.dte_id)).public_status);

PHP (copia php/SharkposClient.php)

require 'SharkposClient.php';
$client = new SharkposClient(null, true); // lee SHARKPOS_API_KEY, true = sandbox
$boleta = $client->emitirBoleta(['amount_total' => 3000, 'items' => [['name' => 'Café', 'qty' => 2, 'price' => 1500]]], 'venta-884');
echo $boleta['folio'], ' ', $client->estado($boleta['dte_id'])['public_status'];

Agentes de IA: el servidor MCP de mcp/ expone la API como herramientas; ver mcp/README.md.

Reglas que importan

  • La API key va solo en el backend (variable de entorno), nunca en el navegador ni en el repositorio.
  • Una Idempotency-Key estable por venta. Ante error de red, 5xx o 429, reintenta con la misma clave y el mismo body.
  • Un 4xx distinto de 429 no se reintenta: corrige la solicitud (code y solution dicen qué hacer).

Licencia MIT.

Reviews

No reviews yet

Be the first to review this server!