Skip to main content
Glama

mcp-lbc

Serveur MCP qui expose les annonces Leboncoin à Claude via la lib lbc.

Prompt

En utilisant le serveur mcp leboncoin, les indications dans @pc-fixe/pc-fixe.md et les pc déjà das @pc-fixe/pc-gaming-occasion.xlsx, fais des recherches leboncoin afin de trouver les meilleurs affaires aujourd'hui (utilise uv si tu as besoin de commande python)

En utilisant le serveur mcp leboncoin, les indications dans @voiture/voiture-recherche.md et les pc déjà das @voiture/voiture-occasion.xlsx, fais des recherches leboncoin afin de trouver les meilleurs affaires aujourd'hui (utilise uv si tu as besoin de commande python)

Related MCP server: leboncoin-mcp

Prérequis

  • uv

  • Réseau résidentiel (les IPs datacenter/VPS sont bloquées par DataDome)

Installation

git clone <repo>
cd mcp-leboncoin
uv sync

Outils exposés

Tool

Description

search_ads

Recherche avec filtres (texte, catégorie, région, prix, pagination)

get_ad_detail

Détail complet d'une annonce par ID

Rate limit : search_ads est limité à 10 appels/heure côté serveur pour éviter le blocage DataDome. Au-delà, le tool retourne une erreur avec le temps d'attente restant.

Intégration Claude Code

claude mcp add leboncoin -s user -- uv run --project /user/mcp-lbc python /user/mcp-lbc/lbc_mcp_server.py

Vérifier avec /mcp après avoir redémarré une nouvelle session.

Intégration Claude Desktop

Ajouter dans claude_desktop_config.json :

  • macOS : ~/Library/Application Support/Claude/claude_desktop_config.json

  • Linux : ~/.config/claude/claude_desktop_config.json

{
  "mcpServers": {
    "leboncoin": {
      "command": "uv",
      "args": ["run", "--project", "/chemin/vers/mcp-leboncoin", "python", "/chemin/vers/mcp-leboncoin/lbc_mcp_server.py"]
    }
  }
}

Proxy résidentiel (si IP datacenter)

Dans lbc_mcp_server.py, remplacer la ligne _client = Client(...) par :

from lbc.model.proxy import Proxy
_client = Client(
    impersonate="safari18_4_ios",
    max_retries=2,
    proxy=Proxy(url="http://user:pass@host:port"),
)

Tests

uv run python test_mcp_server.py   # teste le serveur MCP via stdio
uv run python test_lbc.py          # teste la lib lbc directement

Available Tools

2 tools
get_ad_detailB

Retourne le détail complet d'une annonce Leboncoin (description, prix, localisation, images).

ParametersJSON Schema
NameRequiredDescriptionDefault
ad_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations, the description carries full burden for behavioral transparency. It only states the function but doesn't disclose any traits like read-only nature, required permissions, rate limits, or error behavior (e.g., if ad_id not found). The description is insufficient for understanding operational implications.

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 sentence, immediately stating the tool's core function. It is concise with no extraneous information, and the key data points are listed briefly. Every word contributes to the purpose.

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 retrieval tool with one parameter and an output schema, the description adequately covers what the tool does and what data is returned. It explicitly mentions common fields (description, price, location, images). The presence of an output schema means return values are defined elsewhere. Minor improvement would be to mention that ad_id is required and obtained from search_ads.

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

Parameters2/5

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

The input schema has one parameter (ad_id) with 0% description coverage. The description does not explain the parameter beyond the schema type and requirement. Although the parameter name is self-explanatory, the description should clarify that it is the unique identifier of the ad (e.g., from Leboncoin). Additional context is missing.

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 verb ('Retourne'), the resource ('détail complet d'une annonce Leboncoin'), and the key fields returned (description, price, location, pictures). It distinguishes from the sibling tool 'search_ads', which likely returns a list of ads rather than full details.

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

Usage Guidelines2/5

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

No usage guidelines are provided. The description does not indicate when to use this tool versus alternatives, such as needing an ad_id retrieved from 'search_ads' first. No prerequisites or limitations are mentioned.

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

search_adsB

Recherche des annonces Leboncoin avec filtres. Limité à 10 requêtes/heure (DataDome).

ParametersJSON Schema
NameRequiredDescriptionDefault
textNo
categoryNo
regionNo
sortNoNEWEST
limitNo
pageNo
price_minNo
price_maxNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior3/5

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

The rate limit is disclosed, but no other behavioral traits like authentication needs, data freshness, or handling of missing results are mentioned. With no annotations, the description carries full burden and only covers one aspect.

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 extremely concise with two sentences, front-loading the purpose and rate limit constraint.

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

Completeness2/5

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

Given 8 parameters, an output schema, and a sibling tool, the description is insufficient. It lacks parameter guidance, pagination logic, and return value explanation, despite the output schema existing to mitigate completeness.

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

Parameters1/5

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

Schema coverage is 0%, and the description only says 'with filters' without explaining any of the 8 parameters (text, category, region, etc.), leaving the agent without meaning for the inputs.

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 Leboncoin ads with filters, distinguishing it from sibling tool get_ad_detail which retrieves individual ad details.

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 mentions a rate limit (10 requests/hour) but provides no guidance on when to use this tool versus the sibling, nor any prerequisites or limitations on filters.

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. 2 tool updatesv0.1.0
    • First observedget_ad_detail
    • First observedsearch_ads

TDQS

B3.4/5.0

Scored across 2 tools

Disambiguation5/5

Both tools have clearly distinct purposes: one searches for ads, the other retrieves details of a specific ad. There is no overlap or ambiguity.

Naming Consistency5/5

Both tool names follow a consistent verb_noun pattern using snake_case: 'search_ads' and 'get_ad_detail'. This is predictable and clear.

Tool Count2/5

With only two tools, the server feels thin for a full-fledged classified ads platform. Typical scopes require more tools for CRUD operations and additional features.

Completeness2/5

The server only provides read operations (search and detail). Missing create, update, delete, or management tools, leaving significant gaps for user workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants to search and consult Leboncoin classified ads through the MCP protocol, with tools for ad search, detail retrieval, user profiles, and category/region listings.
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to search and retrieve Yad2 real estate listings (for rent or sale) using MCP tools, with data scraped via GitHub Actions and served from a Cloudflare D1 database.
    -