npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

mcp-sankhya-server

v1.0.0

Published

MCP Server for Sankhya ERP integration - Dashboard 208

Readme

MCP Sankhya Server

Servidor MCP (Model Context Protocol) para integração com Sankhya ERP - Dashboard 208 de Planejamento de Importação.

🚀 Instalação

Opção 1: NPX (Recomendado)

npx @calimp/mcp-sankhya-server

Opção 2: Instalação Local

# Clone o repositório
git clone [seu-repo]
cd mcp

# Instale dependências
npm install

# Configure variáveis de ambiente
cp .env.example .env
# Edite .env com suas credenciais

# Compile e execute
npm run build
npm start

⚙️ Configuração

1. Variáveis de Ambiente

Crie um arquivo .env com suas credenciais:

# Sankhya API
SANKHYA_API_URL=https://api.sankhya.com.br
SANKHYA_TOKEN=seu_token_aqui
SANKHYA_APPKEY=sua_appkey_aqui
[email protected]
SANKHYA_PASSWORD=senha_segura

2. Configuração no Claude Desktop

Adicione ao seu claude_desktop_config.json:

{
  "mcpServers": {
    "sankhya": {
      "command": "node",
      "args": ["/caminho/para/mcp/dist/index.js"],
      "env": {
        "SANKHYA_API_URL": "https://api.sankhya.com.br",
        "SANKHYA_TOKEN": "seu_token",
        "SANKHYA_APPKEY": "sua_appkey",
        "SANKHYA_USERNAME": "[email protected]",
        "SANKHYA_PASSWORD": "senha"
      }
    }
  }
}

Ou use via NPX:

{
  "mcpServers": {
    "sankhya": {
      "command": "npx",
      "args": ["-y", "@calimp/mcp-sankhya-server"],
      "env": {
        "SANKHYA_API_URL": "https://api.sankhya.com.br",
        "SANKHYA_TOKEN": "seu_token",
        "SANKHYA_APPKEY": "sua_appkey",
        "SANKHYA_USERNAME": "[email protected]",
        "SANKHYA_PASSWORD": "senha"
      }
    }
  }
}

🛠️ Ferramentas Disponíveis

searchProduct

Busca produtos no Dashboard 208 por nome ou código.

Parâmetros:

  • query (string, obrigatório): Termo de busca
  • searchBy (string, opcional): 'name', 'code', ou 'both' (padrão: 'both')
  • limit (number, opcional): Máximo de resultados (padrão: 10)

Exemplos de uso:

"Busque produtos com fondue no nome"
"Qual o estoque do produto 45?"
"Mostre produtos da GERBER"

🧪 Testando

Com MCP Inspector

# Instale o inspector
npm install -g @modelcontextprotocol/inspector

# Execute o teste
npm run inspect

Teste Manual

# Modo desenvolvimento
npm run dev

# Produção
npm run build
npm start

📊 Estrutura de Resposta

O servidor retorna informações detalhadas dos produtos:

{
  codigo: string;
  nome: string;
  fornecedor: string;
  estoque: {
    disponivel: number;
    reservado: number;
    liquido: number;
    emRuptura: boolean;
  };
  medias: {
    ultimas3Quinzenas: number;
    ultimas5Quinzenas: number;
  };
  acao: {
    texto: string;
    urgencia: string;
  };
}

🔍 Troubleshooting

Erro de Autenticação

  • Verifique se as credenciais estão corretas
  • Confirme que o usuário tem acesso à API Sankhya
  • Valide token e appkey com o administrador

Produtos não encontrados

  • A view VW_DASHBOARD_PRODUTOS_RESUMO deve existir
  • Verifique se o usuário tem permissão para acessar a view
  • Confirme que existem produtos ativos no sistema

Timeout

  • Verifique conexão com a internet
  • Confirme que a URL da API está correta
  • Aumente o timeout se necessário

📈 Roadmap

  • [x] v1.0 - Busca básica de produtos
  • [ ] v1.1 - Cache de resultados
  • [ ] v1.2 - Filtros avançados (ruptura, urgência)
  • [ ] v2.0 - Múltiplas views e análises

📝 Licença

MIT

👥 Suporte

Para suporte, entre em contato com a equipe Dashboard 208.