Skip to main content

Lampion MCP Server

Serveur MCP (Model Context Protocol) pour Lampion — permet aux agents IA (Claude, Cursor, Windsurf, etc.) de gerer des bases de donnees PostgreSQL managees.

Installation

pip install lampion-mcp
Depuis les sources (développement)
git clone https://github.com/Sylv-Lej/lampion-mcp.git
cd lampion-mcp
pip install -e '.[dev]'
pytest tests/

Usage

# Via CLI
lampion-mcp --token lmp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Via env vars
export LAMPION_TOKEN=lmp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export LAMPION_API_URL=https://api.lampion.cloud  # optionnel
lampion-mcp

Configuration Claude Desktop

Fichier claude_desktop_config.json, selon le système :

  • macOS : ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows : %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "lampion": {
      "command": "lampion-mcp",
      "env": {
        "LAMPION_TOKEN": "lmp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

Configuration Cursor / VS Code

Fichier .cursor/mcp.json ou .vscode/mcp.json :

{
  "servers": {
    "lampion": {
      "command": "lampion-mcp",
      "env": {
        "LAMPION_TOKEN": "lmp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

Tools disponibles (51)

Projets

  • list_projects — Lister les projets
  • get_project — Details d'un projet
  • create_project — Creer un projet PostgreSQL (region fr-par-1, Scaleway Paris ; fr-gra-1, OVH Gravelines, n'est pas encore ouverte : aucun data plane OVH n'est configure)
  • delete_project — Supprimer un projet (admin requis)

Branches

  • list_branches — Lister les branches
  • create_branch — Creer une branche copy-on-write
  • delete_branch — Supprimer une branche
  • reset_branch — Reset une branche a l'etat du parent (comme git reset --hard)
  • merge_branch — Merger les changements de schema vers la branche principale (dry_run possible)
  • promote_branch — Promouvoir une branche en nouvelle branche principale (destructif)

Computes

  • list_endpoints — Lister les endpoints avec connection strings
  • get_endpoint — Details d'un endpoint
  • suspend_endpoint — Suspendre (scale to zero)
  • resume_endpoint — Relancer un compute

SQL

  • execute_sql — Executer une requete SQL
  • get_schema — Introspecter le schema (databases -> schemas -> tables -> colonnes)

Databases & Roles

  • list_databases / create_database / drop_database
  • list_roles / create_role / drop_role

Extensions

  • list_extensions / install_extension / uninstall_extension

Observabilite

  • get_metrics — Metriques temps reel (CPU, RAM, connections, cache)
  • get_slow_queries — Top queries lentes (pg_stat_statements)
  • get_logs — Tail des logs PostgreSQL
  • get_project_usage / get_org_usage — Usage et couts

Backups

  • list_backups / create_backup / restore_backup

Dump

  • pg_dump — Export SQL d'une database

Anonymisation (PII Masking)

  • get_anonymization — Statut et regles de masquage d'une branche
  • enable_anonymization — Activer le masquage dynamique (cree un role lampion_analyst)
  • disable_anonymization — Desactiver le masquage
  • list_masking_functions — Fonctions disponibles (fake_email, hash, partial, etc.)
  • list_masking_rules — Regles actives (schema.table.column -> fonction)
  • add_masking_rule — Ajouter une regle de masquage
  • delete_masking_rule — Supprimer une regle

Securite

  • get_allowlist — IP allowlist d'un endpoint
  • set_allowlist — Configurer l'IP allowlist
  • list_permissions — Permissions table-level par role
  • grant_permission — GRANT un privilege (SELECT, INSERT, UPDATE, DELETE, ALL)
  • revoke_permission — REVOKE un privilege

Compliance

  • get_residency — Ou sont les donnees physiquement (datacenter, provider, chiffrement, certifications)
  • get_security_questionnaire — Base de connaissances securite de l'organisation (Markdown), pour repondre a un questionnaire fournisseur ; chaque reponse porte un statut yes/partial/no/planned a respecter
  • list_subprocessors — Sous-traitants ultérieurs RGPD, marques in_use selon les regions des projets
  • get_dpa_status — Statut du DPA de l'organisation (version, acceptation, changement de sous-traitants). Lecture seule : l'acceptation engage la societe et reste reservee a l'owner (console, CLI)
  • get_org_residency — Rapport de residence de toute l'organisation (projets par region, chiffrement par couche, empreinte SHA-256 identique au PDF)

Resources MCP (5)

  • lampion://projects — Liste des projets
  • lampion://projects/{id} — Details d'un projet
  • lampion://projects/{id}/endpoints — Endpoints avec connection strings
  • lampion://projects/{id}/branches — Branches d'un projet
  • lampion://usage — Usage organisation et estimation des couts

Exemples d'utilisation par un agent

"Cree un projet PostgreSQL pour mon app de blog"

L'agent appellera create_project(name="blog-db") puis list_endpoints() pour obtenir la connection string.

"Montre-moi le schema de ma base de donnees"

L'agent appellera get_schema(project_id="xxx", database="postgres", schema="public").

"Quelle est ma requete la plus lente ?"

L'agent appellera get_slow_queries(project_id="xxx", endpoint_id="ep-xxx").

"Anonymise les emails de la table users"

L'agent appellera enable_anonymization() puis add_masking_rule(table_name="users", column_name="email", masking_function="anon.fake_email()").

"Merge les changements de schema de ma branche dev vers main"

L'agent appellera merge_branch(project_id="xxx", branch_id="dev-id", dry_run=True) pour previsualiser, puis merge_branch(..., dry_run=False) pour executer.

Generation d'API Key

  1. Se connecter sur https://app.lampion.cloud
  2. Aller dans Settings -> API Keys
  3. Creer une cle (prefixe lmp_live_)
  4. Copier la cle et la configurer dans le MCP server

Metadata

Release files for lampion-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lampion-mcp 0.2.0
File Size Uploaded Provenance Actions
lampion_mcp-0.2.0.tar.gz 14.4 kB With provenance Details for lampion_mcp-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lampion-mcp 0.2.0
File Interpreter ABI Platform Actions
lampion_mcp-0.2.0-py3-none-any.whl Python 3 none any Details for lampion_mcp-0.2.0-py3-none-any.whl

Total release size: 27.1 kB

Release files / lampion_mcp-0.2.0.tar.gz

Download URL lampion_mcp-0.2.0.tar.gz
Size 14.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a3d47717e1de06287d830a7bac5997dece76205e1610c863b73800a18600d1c4
BLAKE2b-256 checksum
How to use checksums
66d1d391c9b2ab0e90de707ff72987378ff3a2feaa6a13aceed461248f0df488
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / lampion_mcp-0.2.0-py3-none-any.whl

Download URL lampion_mcp-0.2.0-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d1cba29a703055771fab209d0b5cfd03c4414e3f09b09f915add45719c0c4a29
BLAKE2b-256 checksum
How to use checksums
d91424d2f43fb6870e9cf73302f7f32b191c56b9d4a395c0317816decc375fe9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Security for lampion-mcp 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for lampion_mcp-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page