# meta

Connect an AI agent to Instagram and Threads publishing, analytics, and Meta account tools. Use it to handle social tasks from your coding assistant.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 30
- Author: mikusnuz
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/mikusnuz/meta-mcp
- Updated: 2026-10-19
- HTML: https://affpapa.org/en/nevibecode/mcp/meta

## What it does

This server connects an agent to the Instagram Graph API, Threads API, and Meta management tools. It can publish photos, videos, and carousels, handle comments and Instagram messages, and retrieve account or post analytics. Threads tools also cover polls, GIF attachments, and public post search.

The package includes 66 tools, profile resources for Instagram and Threads, and prompts for cross-platform publishing and analytics reports. It also handles token exchange and refresh, webhook management, and rate-limit tracking through the `x-app-usage` header.

Node.js 20 or later and access tokens are required. Instagram Graph API use requires a business or creator profile; a personal profile cannot use that API. Meta token and webhook tools require a Meta Developer App.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `INSTAGRAM_ACCESS_TOKEN`, `INSTAGRAM_USER_ID`, `INSTAGRAM_MESSAGING_ACCESS_TOKEN`, `INSTAGRAM_PAGE_ID`, `THREADS_ACCESS_TOKEN`, `THREADS_USER_ID`, `META_APP_ID`, `META_APP_SECRET` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env INSTAGRAM_ACCESS_TOKEN=<INSTAGRAM_ACCESS_TOKEN> --env INSTAGRAM_USER_ID=<INSTAGRAM_USER_ID> --env INSTAGRAM_MESSAGING_ACCESS_TOKEN=<INSTAGRAM_MESSAGING_ACCESS_TOKEN> --env INSTAGRAM_PAGE_ID=<INSTAGRAM_PAGE_ID> --env THREADS_ACCESS_TOKEN=<THREADS_ACCESS_TOKEN> --transport stdio meta -- npx -y @mikusnuz/meta-mcp
```
Replace <…> with your own values. 3 more environment variables are in the server README

### Codex

**Platform CLI**
```bash
codex mcp add meta --env INSTAGRAM_ACCESS_TOKEN=<INSTAGRAM_ACCESS_TOKEN> --env INSTAGRAM_USER_ID=<INSTAGRAM_USER_ID> --env INSTAGRAM_MESSAGING_ACCESS_TOKEN=<INSTAGRAM_MESSAGING_ACCESS_TOKEN> --env INSTAGRAM_PAGE_ID=<INSTAGRAM_PAGE_ID> --env THREADS_ACCESS_TOKEN=<THREADS_ACCESS_TOKEN> -- npx -y @mikusnuz/meta-mcp
```
Replace <…> with your own values. 3 more environment variables are in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "meta": {
            "command": "npx",
            "args": [
                "-y",
                "@mikusnuz/meta-mcp"
            ],
            "env": {
                "INSTAGRAM_ACCESS_TOKEN": "<INSTAGRAM_ACCESS_TOKEN>",
                "INSTAGRAM_USER_ID": "<INSTAGRAM_USER_ID>",
                "INSTAGRAM_MESSAGING_ACCESS_TOKEN": "<INSTAGRAM_MESSAGING_ACCESS_TOKEN>",
                "INSTAGRAM_PAGE_ID": "<INSTAGRAM_PAGE_ID>",
                "THREADS_ACCESS_TOKEN": "<THREADS_ACCESS_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values. 3 more environment variables are in the server README

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "meta": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@mikusnuz/meta-mcp"
            ],
            "env": {
                "INSTAGRAM_ACCESS_TOKEN": "<INSTAGRAM_ACCESS_TOKEN>",
                "INSTAGRAM_USER_ID": "<INSTAGRAM_USER_ID>",
                "INSTAGRAM_MESSAGING_ACCESS_TOKEN": "<INSTAGRAM_MESSAGING_ACCESS_TOKEN>",
                "INSTAGRAM_PAGE_ID": "<INSTAGRAM_PAGE_ID>",
                "THREADS_ACCESS_TOKEN": "<THREADS_ACCESS_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values. 3 more environment variables are in the server README

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e INSTAGRAM_ACCESS_TOKEN=<INSTAGRAM_ACCESS_TOKEN> -e INSTAGRAM_USER_ID=<INSTAGRAM_USER_ID> -e INSTAGRAM_MESSAGING_ACCESS_TOKEN=<INSTAGRAM_MESSAGING_ACCESS_TOKEN> -e INSTAGRAM_PAGE_ID=<INSTAGRAM_PAGE_ID> -e THREADS_ACCESS_TOKEN=<THREADS_ACCESS_TOKEN> meta npx -y @mikusnuz/meta-mcp
```
Replace <…> with your own values. 3 more environment variables are in the server README

## When to use it
- publish an Instagram photo or carousel
- reply to Instagram comments and messages
- retrieve Threads account analytics
- search public posts by keyword
- refresh a Meta token or manage a webhook

## Example prompts
- Publish this photo to Instagram and add an accessibility description.
- Find public Threads posts about the keyword “design”.
- Show my Threads account metrics and draft a short report.

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [OpenWork MCP Gateway](https://affpapa.org/en/nevibecode/mcp/openwork-mcp-gateway.md) — MCP server · ★ 24242
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9366
- [basebalance.cloud — x402 RPC & MCP gateway](https://affpapa.org/en/nevibecode/mcp/basebalancecloud-x402-rpc-mcp-gateway.md) — MCP server · ★ 7506

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
