Cover image
Try Now
2025-01-27

Erstellen Sie MCP -Server für jede Website mit automatischer Browserauth -Synchronisierung

3 years

Works with Finder

2

Github Watches

2

Github Forks

32

Github Stars

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 ppmcp
  1. Set Up Native Messaging and Auth Syncing
ppmcp setup  # Sets up with Chrome Web Store extension
  1. Enable Request Monitoring

    • Click the PassportMCP extension icon in Chrome
    • Toggle "Monitor Requests" on
    • Visit and log into your target website
  2. 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

  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 mode
  1. Load in Chrome

    • Open Chrome and go to chrome://extensions
    • Enable "Developer mode" in the top right
    • Click "Load unpacked" and select the extension/dist directory
    • Note the extension ID from Chrome (shown under the extension name)
  2. 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 messaging
  • ppmcp doctor - Check installation status
  • ppmcp uninstall - Remove PassportMCP

How It Works

PassportMCP consists of three main components:

  1. Chrome Extension

    • Monitors web requests
    • Captures authentication state
    • Sends to native host
  2. Native Host

    • Receives data from extension
    • Stores authentication state
    • Provides data to SDK
  3. 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 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 host

Roadmap

  • TypeScript SDK
  • Firefox extension
  • Safari extension
  • Auth state sharing
  • Enterprise features
  • More language SDKs

License

MIT License - see LICENSE for details

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Andris Teikmanis
  • Latvian GPT assistant for developing GPT applications

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • https://tovuti.be
  • Oede knorrepot die vasthoudt an de goeie ouwe tied van 't boerenleven

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Gil kaminski
  • Make sure you are post-ready before you post on social media

  • ANGEL LEON
  • A world class elite tech co-founder entrepreneur, expert in software development, entrepreneurship, marketing, coaching style leadership and aligned with ambition for excellence, global market penetration and worldy perspectives.

  • apappascs
  • Entdecken Sie die umfassendste und aktuellste Sammlung von MCP-Servern auf dem Markt. Dieses Repository dient als zentraler Hub und bietet einen umfangreichen Katalog von Open-Source- und Proprietary MCP-Servern mit Funktionen, Dokumentationslinks und Mitwirkenden.

  • OffchainLabs
  • GO -Umsetzung des Ethereum -Beweises des Anteils

  • huahuayu
  • Ein einheitliches API-Gateway zur Integration mehrerer Ethercan-ähnlicher Blockchain-Explorer-APIs mit Modellkontextprotokoll (MCP) für AI-Assistenten.

  • deemkeen
  • Steuern Sie Ihren MBOT2 mit einer Power Combo: MQTT+MCP+LLM

  • zhaoyunxing92
  • 本项目是一个钉钉 MCP (Message Connector Protocol )服务 , 提供了与钉钉企业应用交互的 api 接口。项目基于 Go 语言开发 , 支持员工信息查询和消息发送等功能。

  • pontusab
  • Die Cursor & Windsurf -Community finden Regeln und MCPs

    Reviews

    2 (1)
    Avatar
    user_RL7FvkVC
    2025-04-15

    GitHub Chat MCP by AsyncFuncAI is an outstanding tool for seamless communication within development teams. The integration with GitHub allows for instant collaboration and issue tracking, making project management efficient. Highly recommended for those who need to keep their workflow smooth and organized. Check it out here: https://mcp.so/server/github-chat-mcp/AsyncFuncAI