Skip to main content
Glama
K-phi-Entreprise

k-phi

Official

K-Phi — public MCP server (skeleton)

MCP server (Streamable HTTP, stateless) exposing K-Phi analysis to AI assistants (Claude, ChatGPT, Cursor, Copilot…). Anonymous rate-limited access, signed upload for large files, deep link to K-Phi for conversion.

See kphi-mcp-public-spec.md for the full spec.

Run

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

Environment variables:

Var

Default

Role

PORT

3000

PUBLIC_BASE_URL

https://k-phi.com

base for open_in_kphi_url / report_share_url links

INGEST_BASE_URL

http://localhost:PORT

base for signed upload links

UTM_SOURCE

mcp

attribution

Related MCP server: Excel MCP Server

Test in Claude Desktop (before listing)

Add to claude_desktop_config.json (or via Settings → Connectors → Add custom connector with the public URL):

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

Then in Claude: "Here is my general ledger export, can you analyze this for me?" while pasting a CSV. Verify that kphi_analyze_ledger is called. Then test ~20 phrasings (ratios, DSCR, cash flow, covenants, FEC, balance sheet, "financial diagnostic"…) and adjust the tool description in src/tools.ts until routing is reliable.

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

Connect to K-Phi (the 4 TODOs)

  1. engine.ts — implement AnalysisEngine with your existing engine (analyze for inline CSV, analyzeFromStorage for uploaded files).

  2. store.ts — replace MemoryStore with Postgres (dedicated mcp_public schema, 30-day purge); upload tokens in database or Redis.

  3. server.ts /upload/:token — replace with a pre-signed S3/R2 URL + antivirus, and trigger analysis on event rather than inline.

  4. ratelimit.ts — quotas in Redis; add OAuth 2.1 (Bearer) verification wired to your existing auth to lift quotas for accounts.

On the K-Phi application side: /a/:analysis_id route that creates an account via magic link and attaches the analysis (this is the conversion point), and /r/:analysis_id route in read-only shareable mode.

Listing

Usual directory prerequisites: public HTTPS URL, OAuth 2.1 or documented anonymous access, privacy policy, support contact, description and icon. Check current criteria: https://docs.claude.com and https://support.claude.com (Claude), OpenAI documentation for ChatGPT, registry.modelcontextprotocol.io.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI-powered analytics from Stripe, PayPal, and Google Analytics 4 (BigQuery) data sources with built-in guardrails and automated workflows for financial and web performance insights.
    -
  • A
    license
    C
    quality
    B
    maintenance
    Enables conversational data analysis of Excel/CSV files through natural language queries, powered by 395 Excel functions via HyperFormula and multi-provider AI. Supports advanced analytics, bulk operations, financial modeling, and large file processing with intelligent chunking.
    35
    26 npm
    36
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides AI assistants with direct access to HLedger accounting data and functionality, enabling natural language queries for balances, reports, journal entries, and financial analysis.
    9 npm
    65
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to perform financial analysis, budget forecasting, compliance checks, expense categorization, and risk assessment, returning structured JSON with audit-ready governance receipts.
    5
    40 npm
    1
    Business Source 1.1