passport-mcp
Build MCP servers for any website with automatic browser auth syncing
Documentation
PassportMCP
PassportMCP (ppmcp) lets you build MCP servers for any given website with automatic browser auth syncing. Every website is fair game. It wraps FastMCP and automatically adds necessary auth headers and cookies from the browser to outbound requests. As long as you log in through the browser, it's ready to be used. Often easier than paying for developer APIs (ex: twitter/X), avoiding rate limits, waiting for approval, or great for sites that don't have one.
Not building an MCP server? You can use the ultra-lightweight `BrowserPassport` http client instead! Scroll down
Features
- 🔐 Automatic browser auth syncing
- 🛠️ Normal MCP tool creation
- 🌐 Works with any website
- 🔄 Always uses latest auth state
- 🍪 Handles cookies and headers
- 🔒 All credentials stay on your machine
Quick Start
1. Install the Package
pip install ppmcp2. Set Up Native Messaging and Auth Syncing
ppmcp setup # Sets up with Chrome Web Store extension3. Enable Request Monitoring
4. Create Your First MCP Tool
from passportmcp import PassportMCP
# Create an MCP instance
mcp = PassportMCP("example", "example.com")
# Define a tool
@mcp.tool()
async def get_data():
response = mcp.client.get("https://example.com/api/data")
return response.json()Installation Options
Option 1: Chrome Web Store Extension (Recommended)
pip install ppmcp
ppmcp setupOption 2: Local Development
1. Build the Extension
git clone https://github.com/joshmayerr/passport-mcp.git
cd extension
npm install
npm run build # or npm run dev for watch mode2. Load in Chrome
3. Set Up Native Messaging
ppmcp setup --local --extension-id=your_extension_id
# OR
ppmcp setup --local # You'll be prompted for the IDCLI Commands
- `ppmcp setup` - Set up native messaging
- `ppmcp doctor` - Check installation status
- `ppmcp uninstall` - Remove PassportMCP
How It Works
PassportMCP consists of three main components:
1. Chrome Extension
2. Native Host
3. SDK
Advanced Example: LinkedIn API
from passportmcp import PassportMCP
mcp = PassportMCP("linkedin", "linkedin.com")
@mcp.tool()
async def search_linkedin(query: str):
response = mcp.client.get(
"https://www.linkedin.com/voyager/api/graphql",
params={
"includeWebMetadata": "true",
"variables": "()",
"queryId": "voyagerDashMySettings.7ea6de345b41dfb57b660a9a4bebe1b8"
}
)
return response.json()BrowserPassport HTTP Client
For simpler use cases where you don't need MCP tools, use the lightweight `BrowserPassport` HTTP client directly:
from passportmcp import BrowserPassport
# Initialize the client
client = BrowserPassport()
# Make authenticated requests
response = client.get("https://api.example.com/data")
data = response.json()Features
- 🔄 Automatic credential injection from browser
- 🌳 Path-based credential inheritance
- 🛠️ Full HTTP method support (GET, POST, PUT, DELETE)
- 🔒 Local credential storage
- 🚀 Built on `httpx` for modern HTTP features
Advanced Usage
# Custom configuration
client = BrowserPassport(
storage_path="~/custom/path/creds.json",
timeout=60.0,
verify=True # SSL verification
)
# Custom headers/cookies (override stored ones)
response = client.post(
"https://api.example.com/data",
headers={"Custom-Header": "value"},
cookies={"custom_cookie": "value"},
json={"key": "value"}
)Security
- ✅ Credentials never leave your machine
- ✅ No cloud storage or transmission
- ✅ Limited to authorized domains
- ✅ LLMs never see your credentials
Unlike services like Anon and Rabbit that automate accounts in the cloud, PassportMCP keeps everything local and secure.
Development
For SDK development:
cd sdks/python
pip install -e .Project Structure
passport-mcp/
├── extension/ # Chrome extension
├── sdks/
│ ├── python/ # Python SDK
│ └── typescript/ # TypeScript SDK (coming soon)
└── shared/
└── native-host/ # Native messaging hostRoadmap
- [ ] TypeScript SDK
- [ ] Firefox extension
- [ ] Safari extension
- [ ] Auth state sharing
- [ ] Enterprise features
- [ ] More language SDKs
License
MIT License - see LICENSE for details
Frequently asked questions
What is passport-mcp?
passport-mcp is Build MCP servers for any website with automatic browser auth syncing
How do I install passport-mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is passport-mcp open source?
Yes — it is hosted on GitHub at https://github.com/JoshMayerr/passport-mcp and has 37 stars.
Related MCP tools
Browse the web, directly from Cursor etc. Built for the Model Context Protocol to enhance AI capabilities. Python-based implementation.
🙌 OpenHands: Code Less, Make More for the Model Context Protocol. Enhance AI assistants with powerful integrations. Python-based implementation.
Universal memory layer for AI Agents; Announcing OpenMemory MCP - local and secure memory management. Python-based implementation.
基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择ChatGPT/Claude/DeepSeek/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
Cognee is the open-source AI memory platform for agents. Give your AI agents persistent long-term memory across sessions with a self-hosted knowledge graph engine.
An LLM agent that conducts deep research (local and web) on any given topic and generates a long report with citations. Built for the Model Context Protocol to
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP