# pil [Health: Active]

**Category:** 🌐 Social Media  
**Repository:** https://github.com/pjpoulose/PIL  
**GitHub Stars:** 2  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/pil

## Description
PIL: local-first knowledge base for your Instagram saved posts, with a read-only MCP server.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "pil": {
    "command": "uvx",
    "args": ["personal-instagram-library"]
  }
}
```

## Documentation

## What pil does

PIL turns an Instagram saved-post collection into a searchable local knowledge base. The application stores the library in SQLite and can enrich posts with summaries, key points, how-to instructions, discussed links, and tags. A read-only MCP server makes that indexed information available to AI tools without requiring screenshots, repeated uploads, or manual copying.

The pil MCP server is suited to developers who want an assistant to answer questions about their own saved posts. It can search across captions and extracted knowledge, retrieve an individual post, show saved collections and tags, and report coverage statistics. The server does not change the library.

## How the pil MCP server works

A typical workflow begins with `instagram-cli`, which must already have the Instagram account linked. PIL ingests collections and saved posts into a local SQLite database. Separate processing steps perform vision-AI content extraction, apply programmatic tags, and generate exports such as searchable HTML or static JSON.

The MCP process runs with stdio and opens the SQLite database using read-only mode. Each request is handled through SELECT-only operations. The live connection reads the current database, so new posts become available after the ingestion and processing steps are run again. Static JSON is also available, but it represents a point-in-time snapshot rather than a live library.

## Setup and configuration

Manual setup requires Python 3.11 or newer, a linked `instagram-cli` account, and the MCP package dependency `mcp<2`. The Python package can be installed from PyPI with `pip install personal-instagram-library`, or the repository can be cloned directly. The package supplies commands for ingestion, extraction, tagging, and several export formats.

Configuration is stored in `~/.config/pil/pil.config.json`, copied from the example configuration. Set `account_id` to the `user_fbid` reported by `instagram-cli accounts`. By default, application data is kept under `~/.local/share/pil`; the configured data directory contains the SQLite database and generated exports.

After setup, run the ingestion, extraction, and tagging scripts as needed. Start the MCP endpoint with `python3 bin/mcp_server.py`, or invoke the installed equivalent from the package. The server command is a stdio process and remains active until stopped.

## Tools and capabilities

The pil MCP server exposes these read-only tools:

- `search_posts`: searches captions and deep-read content, with optional folder and tag filters.
- `get_post`: returns a post’s summary, key points, how-to content, links, folders, and tags.
- `list_folders`: lists saved collections and their indexed counts.
- `list_tags`: lists tags with usage information.
- `library_stats`: reports totals and deep-read coverage by field.

The repository documents connections for Claude Code, Claude Desktop, and Cursor. Other MCP-compatible clients can use the stdio endpoint. The database can also be opened directly with SQLite in read-only mode when an MCP connection is not needed.

## Limitations and notes

This is a read-only interface: it cannot edit, delete, or add records to the library. Ingestion must be rerun when new Instagram posts are saved, and extraction only processes posts that have not already been handled. JSON exports must be regenerated to reflect later changes.

The SQLite database, captions, account details, and exports contain personal data. Keep them on the local machine and share files only with tools you trust. The repository’s `.gitignore` is intended to prevent local databases, configuration, and exports from being committed.

_Full upstream README: https://allmcps.com/mcp/pil/readme_

