About PassportMCP
PassportMCP (ppmcp) is a Python SDK for building MCP servers for any website, with browser auth state synced automatically. It suits sites without a public API or cases where rate limits should be avoided, and credentials stay on the local machine.
Key features
- 01Automatic browser auth state syncing
- 02Tool creation built on FastMCP
- 03Automatic cookie and header injection
- 04BrowserPassport HTTP client
- 05Credentials stored locally only
Use cases
- 01Building MCP tools for sites without a public API
- 02Accessing logged-in websites without paid developer APIs
- 03Sending authenticated HTTP requests with BrowserPassport
MCP support
This project builds MCP servers that attach browser cookies and headers to outbound requests, so MCP clients can call those tools.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEPassportMCP
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
- Install the Package
pip install ppmcp
- Set Up Native Messaging and Auth Syncing
ppmcp setup # Sets up with Chrome Web Store extension
-
Enable Request Monitoring
- Click the PassportMCP extension icon in Chrome
- Toggle "Monitor Requests" on
- Visit and log into your target website
-
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 setup
Option 2: Local Development
- 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 mode
-
Load in Chrome
- Open Chrome and go to
chrome://extensions - Enable "Developer mode" in the top right
- Click "Load unpacked" and select the
extension/distdirectory - Note the extension ID from Chrome (shown under the extension name)
- Open Chrome and go to
-
Set Up Native Messaging
ppmcp setup --local --extension-id=your_extension_id
# OR
ppmcp setup --local # You'll be prompted for the ID
CLI Commands
ppmcp setup- Set up native messagingppmcp doctor- Check installation statusppmcp uninstall- Remove PassportMCP
How It Works
PassportMCP consists of three main components:
-
Chrome Extension
- Monitors web requests
- Captures authentication state
- Sends to native host
-
Native Host
- Receives data from extension
- Stores authentication state
- Provides data to SDK
-
SDK
- PassportMCP: High-level MCP tool creation
- BrowserPassport: Low-level auth handling
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
httpxfor 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 host
Roadmap
- TypeScript SDK
- Firefox extension
- Safari extension
- Auth state sharing
- Enterprise features
- More language SDKs
License
MIT License - see LICENSE for details
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.