k-phi

k-phi

Enables AI assistants to perform anonymous financial analysis on uploaded general ledger (GL) exports, covering ratios, DSCR, cash flow, and other diagnostics, with deep links to the K-Phi platform for conversion.

Category
Visit Server

README

K-Phi — serveur MCP public (squelette)

Serveur MCP (Streamable HTTP, stateless) exposant l'analyse K-Phi aux assistants IA (Claude, ChatGPT, Cursor, Copilot…). Accès anonyme rate-limité, upload signé pour les gros fichiers, deep link vers K-Phi pour la conversion.

Voir kphi-mcp-public-spec.md pour la spec complète.

Lancer

npm install
npm run dev            # compile + démarre sur :3000
curl localhost:3000/healthz

Variables d'environnement :

Var Défaut Rôle
PORT 3000
PUBLIC_BASE_URL https://k-phi.com base des liens open_in_kphi_url / report_share_url
INGEST_BASE_URL http://localhost:PORT base des liens d'upload signés
UTM_SOURCE mcp attribution
KPHI_UPLOAD_STORAGE (non défini) backend de stockage des uploads volumineux. Non défini → upload désactivé (refus honnête, PUT → 501). tmp → fichiers sous os.tmpdir()/kphi-uploads, tmp:/chemin → répertoire dédié (TTL 24 h, supprimés dès l'analyse réussie). mock → routage seul (moteur mock). Valeur inconnue → désactivé avec avertissement : on n'accepte jamais un fichier qu'on ne saura pas relire.
KPHI_SANDBOX_MAX_ENTRIES 200000 cap d'écritures de l'analyse anonyme — DOIT refléter SANDBOX_MAX_ENTRIES côté moteur. Dépassement → refus clair AVANT la création du sandbox (LimitError), au lieu d'un 429 à mi-import.

Tester dans Claude Desktop (avant référencement)

Ajouter dans claude_desktop_config.json (ou via Paramètres → Connecteurs → Ajouter un connecteur personnalisé avec l'URL publique) :

{
  "mcpServers": {
    "k-phi": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "http://localhost:3000/mcp"]
    }
  }
}

Puis dans Claude : « Voici mon export de grand livre, peux-tu m'analyser ça ? » en collant un CSV. Vérifier que kphi_analyze_ledger est appelé. Tester ensuite ~20 formulations (ratios, DSCR, trésorerie, covenants, FEC, balance, « diagnostic financier »…) et ajuster la description de l'outil dans src/tools.ts jusqu'à ce que le routage soit fiable.

Structure

src/
  server.ts     endpoint /mcp (stateless), /upload/:token, /healthz
  tools.ts      les 4 outils + descriptions (= le pitch lu par le modèle)
  engine.ts     interface AnalysisEngine + MockEngine
  store.ts      interface Store + MemoryStore
  ratelimit.ts  session anonyme + quotas

Brancher sur K-Phi (les 4 TODO)

  1. engine.ts — implémenter AnalysisEngine avec votre moteur existant (analyze pour le CSV inline, analyzeFromStorage pour les fichiers déposés).
  2. store.ts — remplacer MemoryStore par Postgres (schéma dédié mcp_public, purge à 30 j) ; jetons d'upload en base ou Redis.
  3. server.ts /upload/:token — remplacer par une URL pré-signée S3/R2 + antivirus, et déclencher l'analyse sur événement plutôt qu'en ligne.
  4. ratelimit.ts — quotas dans Redis ; ajouter la vérification OAuth 2.1 (Bearer) branchée sur votre auth existante pour lever les quotas des comptes.

Côté application K-Phi : route /a/:analysis_id qui crée un compte par magic link et rattache l'analyse (c'est le point de conversion), et route /r/:analysis_id en lecture seule partageable.

Référencement

Prérequis habituels des annuaires : URL publique HTTPS, OAuth 2.1 ou accès anonyme documenté, politique de confidentialité, contact support, description et icône. Vérifier les critères à jour : https://docs.claude.com et https://support.claude.com (Claude), documentation OpenAI pour ChatGPT, registry.modelcontextprotocol.io.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured