convez.ai
MCP ServerIntegração & APIsIntermediário
variaty-app

Variaty Company Brain

variaty-app/variaty-company-brain

Busca inteligente em Discord + Drive com mascara de acesso em tempo real

Ver no GitHub
InicialPluginScore · de 0 a 100

MCP server que transforma Claude em um mecanismo de busca inteligente sobre conhecimento corporativo, integrando Discord e Google Drive com controle de acesso granular via OpenFGA. Cada resultado é filtrado por permissões do usuário — documentos e mensagens inacessíveis são invisíveis ao modelo, não apenas bloqueados.

Instalação

$npx convez-ai variaty-app/variaty-company-brain

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
50%
Último commit
há 5 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Encontrar discussões e decisões anteriores em canais do Discord
  • Pesquisar documentos e conhecimento corporativo no Google Drive
  • Recuperar contexto de projetos respeitando permissões de acesso do usuário
  • Construir agentes Claude que exploram conhecimento interno sem exposição de dados

Veredito

Solução robusta para democratizar acesso a conhecimento corporativo sem comprometer segurança. Implementação séria de controle de acesso na camada de dados (não em prompts) a torna confiável para ambientes empresariais sensíveis.

README

A tradução para o português deste README ainda está na fila.

Variaty Company Brain — Claude plugin

A ready-to-use Claude Code plugin that turns Claude into a permission-filtered company brain. It connects Claude to Variaty's two deployed, read-only MCP servers and ships the skills that teach Claude how to use them:

  • discord-search — search your team's Discord conversations, messages, channels, and threads.
  • gdrive-knowledge — query your Google Drive as a knowledge graph (documents, folders, and the entities they mention).

The point: every result is masked per user by OpenFGA on the server side. You only ever see the channels, threads, and documents you are allowed to read. Authorization lives in the data layer — not in a prompt — so the model physically never receives a message, document, or even a count you don't have access to. A document you can't see is invisible, not "locked".


What you get

ComponentNameWhat it does
MCP serverdiscord-searchRead-only Discord search. Tools: search_messages_tool, get_thread_tool, get_message_tool, list_channels_tool. Hybrid BM25 + vector search.
MCP servergdrive-knowledgeRead-only Drive knowledge graph with mask-before-retrieval. Tools: search, get_node, related_work, describe_schema, read_document.
Skilldiscord-searchTeaches Claude when and how to drive the Discord tools (search → read → quote, time filters, masking rules).
Skillgdrive-knowledgeTeaches Claude when and how to drive the Drive tools (pointers → get_node for content, masking rules).

Both servers are read-only. They cannot post, edit, or delete anything in Discord or Drive.


Prerequisites

  1. You must be an authorized user. Access is gated by Variaty's identity provider (Casdoor) and an email allowlist. Sign in with the Google account your administrator has allowlisted.
  2. For full Google Drive results, your Google account must be linked to your identity. Discord search works as soon as you authenticate; if every gdrive-knowledge call returns an authorization error, your Google link is missing — ask your administrator, or use the login flow, to link it. Until then Claude answers from Discord only.

Authentication is OAuth — you sign in once in your browser; there are no tokens to paste and nothing secret in this repo.


Install

Claude Code (CLI / IDE) — one marketplace, then install

# 1. Add this repo as a plugin marketplace
/plugin marketplace add variaty-app/variaty-company-brain

# 2. Install the plugin
/plugin install company-brain@variaty-company-brain

On first use, Claude Code opens your browser to authenticate each MCP server (OAuth via Casdoor → Google). Run /mcp to confirm both discord-search and gdrive-knowledge are connected, then just ask questions.

Claude Cowork / claude.ai

The two servers are standard remote MCP connectors and the Claude.ai connector callback is already registered, so you can add them directly:

  1. Open Settings → Connectors → Add custom connector.
  2. Add each URL (sign in when prompted):
    • https://discord-mcp.variaty.app/mcp
    • https://gdrive-mcp.variaty.app/mcp
  3. If your Cowork environment supports plugin marketplaces, you can instead install company-brain@variaty-company-brain to get the usage skills bundled with the connectors.

Usage

Just ask Claude in natural language — the skills route to the right tools automatically:

  • "What did the team decide about the embedding model in #engineering last week?" → discord-search
  • "Summarize the Apollo kickoff thread." → discord-search
  • "What does the consulting contract say about termination?" → gdrive-knowledge
  • "Which documents and Discord threads mention Northwind?" → both, joined through shared entities

If something doesn't appear, it's because you don't have access — Claude will say it "couldn't find or access it" rather than claim it doesn't exist.


How it works (one diagram)

You (authenticated via OAuth → Casdoor → Google)
   │  natural-language question
   ▼
Claude (this plugin's skills pick the right tools)
   ├─► discord-search MCP  ──► OpenFGA: which channels/threads may you read?
   │                          └─► SQL pre-filter → masked, ranked messages
   └─► gdrive-knowledge MCP ──► OpenFGA: allowed_doc_ids(you)  [FIRST]
                               └─► mask-before-PPR retrieval → masked nodes

The Drive server computes your allowed document set before it retrieves or ranks anything (mask-before-PPR), so masked documents can't even influence scoring or act as a graph bridge. Both servers return identical "not found" responses for absent and forbidden items, so existence never leaks.


Server reference

ServerURLTransportAuth
discord-searchhttps://discord-mcp.variaty.app/mcpstreamable-HTTPOAuth (RFC 9728 discovery → Casdoor)
gdrive-knowledgehttps://gdrive-mcp.variaty.app/mcpstreamable-HTTPOAuth (RFC 9728 discovery → Casdoor)

Troubleshooting

  • Servers don't connect / 401 — run /mcp and re-authenticate. Make sure you signed in with an allowlisted Google account.
  • Discord works, Drive returns authorization errors — your Google account isn't linked to your identity yet. Link it via the login flow, then retry.
  • No results — that's the masking working: you don't have access to anything matching. It is not an error.
  • Config changes don't take effect — restart Claude Code after enabling/updating the plugin.

License

MIT — see LICENSE.

Ver o original no GitHub

Bom para

Relacionados