Metadata-Version: 2.4
Name: mcp-server-ogp
Version: 0.1.2
Summary: OGP (Open Graph Protocol) information extraction server for Model Context Protocol (MCP)
Author-email: yareyaredesuyo <yareyaredesuyo@gmail.com>
License-Expression: MIT
Keywords: llm,mcp,model-context-protocol,ogp,open-graph,web-scraping
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: argparse>=1.4.0
Requires-Dist: beautifulsoup4>=4.12.0
Requires-Dist: fastmcp>=2.5.2
Requires-Dist: httpx>=0.27.0
Requires-Dist: pillow>=10.0.0
Description-Content-Type: text/markdown

# OGP Information Server

A Model Context Protocol (MCP) server for extracting Open Graph Protocol (OGP) information from web pages. This server provides OGP metadata commonly used for social media sharing previews and rich link displays.

## Overview

Open Graph Protocol is a standard that allows web pages to control how their content appears when shared on social media platforms like Facebook, Twitter, and LinkedIn. This MCP server extracts that structured metadata and makes it available through simple tool interfaces.

## Tools

### ogp-info

Extracts comprehensive OGP information from any web page URL.

**Parameters:**

- `url` (string, required): The target web page URL

**Returns:**

Dictionary containing extracted OGP metadata such as:

- `title`: Page title
- `description`: Page description
- `image`: OGP image URL
- `site_name`: Site name
- `type`: Content type
- `url`: Canonical page URL
- Additional OGP properties as available

### ogp-image

Retrieves the OGP image from a web page and returns it as an optimized Image object.

**Parameters:**

- `url` (string, required): The target web page URL

**Returns:**

OGP Image Data

## Installation

### Using `uv` (Recommended)

No special installation is required when using `uv`. You can run `mcp-server-ogp` directly using `uvx`.

### Using PIP

Alternatively, you can install `mcp-server-ogp` using pip:

```sh
pip install mcp-server-ogp
```

After installation, you can run the script as follows:

```sh
mcp-server-ogp
```

## Configuration

### Configure for Claude.app

Add to your Claude settings:

<details>
<summary>Using uvx</summary>

```json
{
  "mcpServers": {
    "ogp": {
      "command": "uvx",
      "args": ["mcp-server-ogp"]
    }
  }
}
```

</details>

### Configure for VS Code

For quick installation, use one of the one-click install buttons below...

[![Install with UV in VS Code](https://img.shields.io/badge/VS_Code-UV-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=ogp&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22ogp%22%5D%7D)

### Command Line Options

You can specify the following options when running the server:

- `--sse`: Enable Server-Sent Events transport (on/off)
- `--host`: Server bind address (default: localhost)
- `--port`: Server port number (default: 8000)
- `--log-level`: Logging verbosity (debug, info, warning, error)
