leboncoin-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
leboncoin-mcp
An MCP server that lets an AI assistant work with your Leboncoin account through a real, logged-in Chrome.
It runs as two Docker containers: a headed Google Chrome that you log in to once (through your web browser, via noVNC), and the MCP server, which drives that Chrome over the DevTools protocol. Your assistant only sees the MCP tools.
MCP client ──HTTP──> mcp ──CDP──> browser (Chrome) ──> leboncoin.fr
^
you ──noVNC (login, CAPTCHA)─────────┘This is an unofficial project, not affiliated with or endorsed by Leboncoin. Automating your account may go against Leboncoin's terms of use and can get it challenged or blocked. Use it on your own account, keep the volume low, and at your own risk.
Status
Early (alpha). Available tools:
Tool | What it does |
| Checks that the session works; tells you what to do if it does not. |
| The 50 most recent conversations, optionally unread only. |
| One conversation's history, oldest first. May mark it as read. Says when the person shared a tenant profile. |
| Sends a message in one conversation. By default it only returns a preview and a token. |
| Your ads (« Mes annonces »): id, title, status, price, category, photos. |
| Publishes a rental ad (Locations or Colocations) with photos from the photos folder. Returns a preview and a token first. |
| Deletes one of your ads. Always returns a preview and a token first. |
| Carries out a prepared action (a send, a new ad or a delete) after you approved its preview. |
| A tenant profile (« profil locataire ») a candidate shared for one of your rentals: contact details, income, job, guarantor, household, move-in wishes. |
Planned: editing ads, other categories than rentals, more of the landlord space (« espace bailleur »).
Related MCP server: linkedin-mcp
Principles
No CAPTCHA or 2FA automation. When Leboncoin shows a challenge, the tool stops and asks you to solve it in noVNC.
No paid options. The server never buys boosts or other paid features: when publishing an ad, a network guard blocks any submit that carries one.
Looks like a person, not a scraper. It reads what the real pages load for themselves instead of calling Leboncoin's API directly, runs one browser operation at a time, and never retries a refusal.
You approve what is sent. By default
send_messagesends nothing: it returns the recipient, the ad, the last messages and the exact text, and onlyconfirm_actionsends it. In the browser, a network guard lets the send through only if it goes to that conversation with exactly that text. Repeating your last message is refused, and every send is checked afterwards by reading the conversation again.Publishing an ad always asks first. The preview is checked against Leboncoin's own form rules, and the create request goes through only if it carries exactly the approved ad.
Deleting an ad always asks first, whatever the settings. The delete goes through only if the dialog shows that ad and the request names exactly that one ad.
Your session stays yours. Cookies and auth headers are never logged or returned.
Other people's data stays private. Messages and tenant profiles are returned to your assistant only, never logged or stored by the server.
Requirements
Docker with Compose.
An x86_64 machine (the browser image uses Google Chrome for Linux, which has no ARM build).
Quick start
git clone <this repository> leboncoin-mcp
cd leboncoin-mcp
docker compose up -d --build --waitOpen http://localhost:6080/vnc.html?autoconnect=1&resize=scale. You see Chrome on leboncoin.fr.
Log in to your account as usual. To paste a password, use noVNC's clipboard panel (left sidebar), then Ctrl+V in the remote Chrome.
Connect your MCP client to
http://127.0.0.1:8000/mcp(streamable HTTP). With Claude Code:claude mcp add --transport http leboncoin http://127.0.0.1:8000/mcpAsk your assistant to check the session, then to list your conversations.
To publish an ad with photos, put them in the photos folder next to compose.yaml (or set
PHOTOS_DIR to another folder, e.g. one your agent writes to), then give their file names to
create_ad. The server reads that folder only, read-only.
The Chrome profile is kept in the chrome-profile Docker volume, so you stay logged in across
restarts. Log in again in noVNC whenever session_status says the session expired.
Security
Both ports are bound to
127.0.0.1only. The Chrome DevTools port is not published at all: anyone who reaches it controls your logged-in browser.Requests whose
HostorOriginheader is not local are refused, so a web page you visit cannot reach the server through your browser (DNS rebinding). Reaching it under another name requires adding that name toLEBONCOIN_MCP_ALLOWED_HOSTS.Messages come from strangers. Treat their content as untrusted: an assistant must not follow instructions found in a message. Keeping confirmation on is the safeguard.
The MCP endpoint has no authentication yet. Do not expose it beyond your machine, and do not publish noVNC either: it shows your logged-in session without a password.
The browser container gets
SYS_ADMINso Chrome can keep its sandbox. Chrome itself runs as a non-root user. The alternative,--no-sandbox, would disable Chrome's isolation between web pages and your session.
Configuration
Set in compose.yaml (mcp service):
Variable | Default | Meaning |
|
| Chrome DevTools endpoint |
|
|
|
|
| HTTP listen address |
|
| HTTP listen port |
| (none) | Extra accepted |
|
|
|
|
| Folder holding the photos |
|
| URL shown in "log in" / "solve the CAPTCHA" errors |
Development
python3 -m venv .venv
.venv/bin/pip install -e '.[dev]'
.venv/bin/pytest
.venv/bin/ruff check src testsThe tests are pure parsing tests on synthetic payloads: they need no network and no account. Never commit real Leboncoin responses: they contain other people's names and messages.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Let your AI agent operate any website through a real, logged-in browser session.
Let AI agents work in your own signed-in Chrome, with approvals and verified results.
Let AI agents use any website you're logged in to. Sessions stay encrypted on your machine.
Let AI agents use your real, signed-in Chrome: tabs, clicks, forms, screenshots and video.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceLets AI assistants control your real Chrome browser to perform web tasks like reading pages, taking screenshots, clicking, and typing, using your existing logged-in sessions.145MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to search LinkedIn jobs and read LinkedIn profiles read-only using a real Chrome session via CDP, with tools for job listings, full job details, profile data, and session management.5Apache 2.0
- AlicenseAqualityCmaintenanceEnables AI assistants to browse profiles and companies, manage messages and inboxes, and search jobs, posts, and people through a locally logged-in browser session. All actions run on the user's own machine.19Apache 2.0
- AlicenseBqualityBmaintenanceEnables AI agents to access LinkedIn through the user's own browser session, so they can read profiles and company pages, search for jobs and people, and manage messages, conversations, and connection requests. Supports checking session status, reading the home feed and posts, and inspecting Easy Apply forms without submitting them.26Apache 2.0