Skip to main content
Glama
Wobani034

Le Parrain MCP

by Wobani034

Le Parrain MCP

Serveur MCP (Model Context Protocol) pour interroger l'annuaire de parrainage leparrain.com directement depuis un assistant IA (ChatGPT, Claude…), avec injection automatique du bon lien de parrainage.

Repo volontairement séparé du Parrain. Aucun code source ni accès base du dépôt principal. Aucun secret n'est commité. Ce dépôt peut être public sans rien exposer.


Démarrage rapide (POC)

npm install
cp .env.example .env     # ajustez LP_USER pour simuler un appelant connecté
npm run smoke            # tests de la logique et des garde-fous
npm start                # lance le serveur MCP (transport stdio)

Le POC tourne sur un dataset d'exemple en mémoire (LP_DATA_MODE=sample) : aucune infra Le Parrain requise.

Simuler un appelant

.env

Comportement

LP_USER= (vide)

Appelant anonyme → lien plateforme par défaut

LP_USER=marie

Connectée, a déjà publié des liens → ses liens ressortent

LP_USER=zoe

Connectée sans lien → lien plateforme + invitation à créer

Related MCP server: Backlinks MCP

Outils principaux

Tool

Rôle

search_programs

Cherche des programmes, renvoie le lien résolu pour vous

get_program

Détail d'un programme + lien résolu

create_referral_link

Publie votre lien (connecté, https, anti-doublon)

suggest_program

Propose un programme → modération (pas de publication auto)

list_pro_programs

Liste les programmes partenaires acceptant des recommandations (connecté)

recommend_contact

Transmet un contact consentant après confirmation explicite (connecté)

get_my_commissions

Suit les commissions de recommandation du compte (connecté)

Les outils de recommandation n'inscrivent et n'administrent aucun professionnel. Ils sont réservés à l'utilisateur connecté qui recommande un contact consentant, et ne renvoient pas les coordonnées du contact après l'envoi.

La logique de choix du lien (« chaîne de résolution ») est décrite dans PLAN.md.

Brancher à un client MCP

Option A — Remote (URL à coller, recommandé)

Serveur en ligne, aucun fichier à éditer : collez l'URL dans un connecteur custom de ChatGPT / Claude.

https://leparrain.com/mcp

POC ouvert sans auth → appelant anonyme → lien plateforme par défaut. Endpoint de santé : GET https://leparrain.com/mcp/health.

Déploiement (serveur Plesk) : process PM2 leparrain-mcp (src/http.js, port 127.0.0.1:3005), reverse-proxy nginx location /mcp dans le vhost_nginx.conf de leparrain.com. Process séparé : aucun code ni base du Parrain.

Option B — Local (stdio)

Claude Desktopclaude_desktop_config.json :

{
  "mcpServers": {
    "leparrain": {
      "command": "node",
      "args": ["/chemin/absolu/vers/leparrain-mcp/src/server.js"],
      "env": { "LP_DATA_MODE": "sample", "LP_USER": "" }
    }
  }
}

Inspecteur officiel (pour tester visuellement) :

npm run inspect

Structure

src/
  server.js     # serveur MCP : branche les tools sur le protocole (stdio)
  core.js       # logique métier pure des tools (testable)
  resolver.js   # chaîne de résolution du lien + tirage pondéré
  data.js       # dataset d'exemple (remplacé par l'API en couche 2)
  flavor.js     # la voix du Parrain (clins d'œil The Mask)
test/smoke.js   # tests de la logique pure
landing/        # landing page de présentation

Sécurité

  • .env est gitignored. Ne commitez jamais de clé.

  • En production (couche 2), le serveur tape l'API publique de leparrain.com via LP_API_KEY (fournie à l'exécution) — jamais d'accès base direct, jamais de source du Parrain dans ce repo.

Ssssplendide !

Available Tools

4 tools
get_programDétail d'un programmeA

Renvoie le détail d'un programme de parrainage (description + lien de parrainage résolu pour vous).

ParametersJSON Schema
NameRequiredDescriptionDefault
slugYesIdentifiant du programme (ex: 'qonto'). Voir search_programs.

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description adds some behavioral context by stating the link is 'résolu pour vous' (resolved). However, it does not disclose other traits like read-only nature, side effects, or error conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, concise sentence that front-loads the core purpose. Every word adds value with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (1 param, no output schema), the description covers the main functionality and return content. It lacks details about response format or structure, but overall is adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema description already explains the slug parameter thoroughly. The tool description adds no further parameter meaning beyond what the schema provides, staying at baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns details of a referral program (description + resolved referral link), using a specific verb ('Renvoie') and resource. It distinguishes from siblings such as search_programs and suggest_program.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or when-not-to-use guidance is provided. The slug parameter hints at using search_programs to get the slug, but no direct advice on selecting this tool over alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_blogChercher dans le blogA

Cherche dans les articles du blog Le Parrain (conseils, comparatifs, bons plans parrainage) et renvoie les programmes liés. Utile pour des questions plus larges qu'une simple recherche de programme.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSujet ou mot-clé (ex: 'meilleure banque', 'cashback').

TDQS

A3.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. It only states the action (search) and outcome (returns programs) without mentioning read-only nature, limitations, or side effects. Minimal behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with purpose, followed by usage hint. Every sentence earns its place; no unnecessary text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one param, no output schema), the description covers essential context: what it searches, what it returns, and when to use it. Could be improved by mentioning output format or pagination, but sufficient for basic understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for the single parameter. The tool description adds no new details about the parameter beyond the schema description, so it does not exceed the baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it searches blog articles and returns related programs. It differentiates from siblings (get_program, search_programs, suggest_program) by specifying the blog resource and broader query applicability.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes 'Utile pour des questions plus larges qu'une simple recherche de programme,' which implicitly guides when to use this tool vs. a program-specific search. It provides clear context but lacks explicit 'when-not-to-use' statements.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_programsRechercher des programmes de parrainageA

Cherche des programmes de parrainage dans l'annuaire Le Parrain. Renvoie pour chaque résultat le bon lien de parrainage (le vôtre si vous êtes connecté et l'avez publié, sinon le lien par défaut).

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesMot-clé : nom de marque, catégorie, secteur…

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description bears full burden. It discloses the key behavior of returning a personalized link based on user login and publication status. However, it omits other traits like pagination, error handling, or authentication requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences, front-loaded with the action verb 'Cherche' and clearly structured. Every sentence adds essential information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple search tool with one parameter and no output schema, the description is fairly complete. It covers the core functionality and the unique link behavior. Could mention result format or edge cases, but not critical.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for the single parameter 'query', which already has a description. The tool description adds no additional semantic detail beyond restating the keyword concept, so it adds minimal value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches for sponsorship programs in a specific directory and returns results with personalized links. This distinguishes it from siblings like get_program (single program) and search_blog (blog search).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for finding sponsorship programs but does not explicitly state when to use this tool over alternatives like suggest_program or when not to use it. No exclusions or context for alternative tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

suggest_programProposer un nouveau programmeA

Propose un programme de parrainage absent de l'annuaire. La proposition passe en modération (vérification humaine) avant toute publication — aucune mise en ligne automatique.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlNoLien officiel du programme (https), optionnel.
nameYesNom de la marque / du programme.
categoryNoCatégorie suggérée, optionnel.

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully carries the burden of disclosing behavior. It informs that the proposal goes through human moderation before any publication and that automatic online posting does not occur. This is important for an agent to set expectations, though more detail on the moderation process or timing could be added.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence. It front-loads the purpose and immediately follows with the key behavioral note about moderation. No unnecessary words or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 3 parameters, no output schema, and no annotations, the description provides the core purpose and a key behavior (moderation). However, it lacks information about what the agent should expect as a return value (e.g., confirmation, ID) or what happens after successful suggestion. This leaves a slight gap in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All three parameters (name, url, category) are described in the schema with 100% coverage. The description does not add additional semantic meaning beyond what the schema already provides, so a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: to propose a sponsorship program not already in the directory. The verb 'Propose' and resource 'programme de parrainage absent de l'annuaire' are specific. Siblings like get_program, search_blog, and search_programs are clearly distinct (retrieval/search vs. suggesting new).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for suggesting a program that is absent from the directory, giving clear context for use. However, it does not explicitly state when NOT to use it or suggest alternatives, though the sibling tools are quite different in nature.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.1.0
    • First observedget_program
    • First observedsearch_blog
    • First observedsearch_programs
    • First observedsuggest_program

TDQS

A4.2/5.0

Scored across 4 tools

Disambiguation5/5

Each tool targets a distinct action: retrieving program details, searching blog articles, searching programs, and suggesting missing programs. There is no overlap or ambiguity.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (get_program, search_blog, search_programs, suggest_program), making them predictable and easy to distinguish.

Tool Count5/5

With 4 tools, the set is tightly scoped to the core functionality of a referral program directory: discovering, detailing, and suggesting programs, plus supporting blog content. No tool feels extraneous or missing.

Completeness4/5

The set covers the main use cases: program search, detail retrieval, blog advice, and program suggestions. Lacks explicit update or delete actions, but those may be out of scope for a directory service.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers