How to Set Up LinkedIn Access Using the linkedin-mcp Backend in Agent-Reach
To enable LinkedIn scraping in Agent-Reach, install the linkedin-scraper-mcp package, register it via mcporter config add linkedin http://localhost:3000/mcp, and verify the connection with python -m agent_reach.cli doctor.
Agent-Reach treats LinkedIn as a backend-driven channel that delegates all scraping operations to an external MCP (Micro-Content-Provider) service. According to the source code in agent_reach/channels/linkedin.py and documented in docs/README_en.md, the channel supports two backends—linkedin-scraper-mcp and Jina Reader—with the MCP backend providing the most robust access to profiles, companies, and job listings.
Backend Architecture and Requirements
The LinkedIn channel implementation declares available backends in a static list at line 15 of agent_reach/channels/linkedin.py:
backends = ["linkedin-scraper-mcp", "Jina Reader"]
When you run python -m agent_reach.cli doctor or process a LinkedIn URL, the LinkedInChannel.check() method (lines 22-40) probes the mcporter tool to verify whether a LinkedIn MCP service has been registered. If mcporter is installed but no LinkedIn backend is configured, the check returns instructions to complete the setup.
Step-by-Step Setup Process
Install the LinkedIn Scraper MCP
First, install the linkedin-scraper-mcp package, which provides the actual scraping logic and exposes a local HTTP server on port 3000 by default:
pip install linkedin-scraper-mcp
This package runs as a standalone MCP server that Agent-Reach communicates with indirectly through mcporter.
Register the Backend with mcporter
Next, tell mcporter where to forward LinkedIn-specific calls by registering the MCP URL:
mcporter config add linkedin http://localhost:3000/mcp
This command creates a mapping that routes all LinkedIn channel requests through mcporter to your local scraper instance.
Verify the Configuration
Finally, confirm that Agent-Reach recognizes the backend:
python -m agent_reach.cli doctor
A successful configuration shows "ok" for the LinkedIn channel and lists linkedin-scraper-mcp as the active backend.
Querying LinkedIn Data
Once configured, you can retrieve LinkedIn data through the unified CLI or directly via mcporter for debugging.
Read a profile via Agent-Reach:
python -m agent_reach.cli read https://www.linkedin.com/in/username
Direct mcporter calls for advanced usage:
# Retrieve a person profile
mcporter call 'linkedin-scraper.get_person_profile(linkedin_url: "https://linkedin.com/in/username")'
# Search for people
mcporter call 'linkedin-scraper.search_people(keyword: "AI engineer", limit: 5)'
# Retrieve company information
mcporter call 'linkedin-scraper.get_company_profile(linkedin_url: "https://linkedin.com/company/example")'
# Search job listings
mcporter call 'linkedin-scraper.search_jobs(keyword: "software engineer", limit: 10)'
All commands route through agent_reach/backends/opencli.py, the generic backend wrapper that forwards requests to mcporter, keeping the CLI thin and backend-agnostic.
Summary
- Agent-Reach uses a backend-driven architecture for LinkedIn, delegating HTTP operations to external MCP services via mcporter.
- The primary backend is
linkedin-scraper-mcp, declared inagent_reach/channels/linkedin.pyalongside the fallbackJina Reader. - Setup requires three commands:
pip install linkedin-scraper-mcp,mcporter config add linkedin http://localhost:3000/mcp, and verification viapython -m agent_reach.cli doctor. - Health checks are performed by
LinkedInChannel.check(), which probes mcporter to ensure the LinkedIn MCP is registered and responsive. - Data access is unified through the CLI or direct mcporter calls, supporting profiles, companies, people searches, and job listings.
Frequently Asked Questions
What is the difference between linkedin-scraper-mcp and Jina Reader?
linkedin-scraper-mcp is a specialized MCP backend that provides structured access to LinkedIn profiles, companies, and job listings via a local HTTP server. Jina Reader serves as a fallback generic content extractor that can parse public LinkedIn pages but lacks the specific entity modeling and search capabilities of the dedicated scraper. The channel in agent_reach/channels/linkedin.py prioritizes the MCP backend when available.
Why does Agent-Reach use mcporter instead of direct HTTP calls?
Agent-Reach maintains a thin CLI architecture by delegating all HTTP operations to mcporter, which acts as a service mesh for MCP providers. This design, implemented in agent_reach/backends/opencli.py, allows you to swap scraping implementations by changing the mcporter configuration without modifying the Agent-Reach codebase. It also centralizes connection pooling, error handling, and service discovery.
How do I troubleshoot when the doctor command shows LinkedIn as not configured?
If python -m agent_reach.cli doctor reports that LinkedIn is unavailable, verify three things: (1) the linkedin-scraper-mcp package is installed in your Python environment, (2) the MCP server is running on port 3000 (or your specified port), and (3) the mcporter config contains the correct URL via mcporter config add linkedin <url>. The LinkedInChannel.check() method specifically looks for these conditions at lines 22-40 of agent_reach/channels/linkedin.py.
Can I use a remote MCP server instead of localhost:3000?
Yes. While the default setup uses http://localhost:3000/mcp for a local scraper instance, you can point mcporter to any reachable MCP endpoint. Simply substitute the localhost URL with your remote address when running mcporter config add linkedin <remote-url>. Agent-Reach routes all requests through mcporter, so the physical location of the scraper is transparent to the channel logic.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →