instagram-nutrition-mcp
# instagram-nutrition-mcp
An [MCP](https://modelcontextprotocol.io) server that lets Claude design and publish
nutrition content to an Instagram **Business** account through Meta's official
Instagram API.
> Status: in development (MVP in progress).
## Requirements
- Node.js 22+
- An Instagram Business (or Creator) account
- A Meta developer app and access token: follow [docs/META_SETUP.md](docs/META_SETUP.md).
Both Instagram-login (`IGAA…`) and Facebook-login (`EAA…`) tokens work.
## Setup
```bash
npm install
cp .env.example .env # then fill in IG_ACCESS_TOKEN and IG_USER_ID
npm run build
```
## Use it with Claude Code
Register the server (use the absolute path to your clone):
```bash
claude mcp add instagram \
-e IG_ACCESS_TOKEN=... -e IG_USER_ID=... \
-- node /abs/path/to/instagram-nutrition-mcp/dist/index.js
```
You can leave out the `-e` flags: the server also reads `.env` from the repo root.
Then ask Claude things like "how many followers do I have?" or "check my Instagram token".
### Tools
| Tool | What it does |
| ------------------ | ------------------------------------------------------------------------------ |
| `check_token` | Checks the token works, which account it belongs to, and days until it expires |
| `get_account_info` | Username, name, account type, followers, following, post count |
### Keeping the token valid
Long-lived tokens last 60 days. Run `npm run token:refresh` every ~50 days (see
[docs/META_SETUP.md](docs/META_SETUP.md#7-keep-the-token-alive)).
### Configuration
| Variable | Required | Default |
| ----------------- | ---------------------- | -------------------- |
| `IG_ACCESS_TOKEN` | yes | |
| `IG_USER_ID` | for publishing (later) | |
| `IG_API_VERSION` | no | `v24.0` |
| `IG_TOKEN_STORE` | no | `.tokens/token.json` |
## Development
```bash
npm run lint
npm run typecheck
npm test
npm run build
npm run inspect # MCP Inspector against dist/index.js
```
## License
MIT
TDQS
Scored across 2 tools
check_token is a diagnostic/auth-health tool while get_account_info returns profile metadata, so their primary purposes are distinct. There is mild overlap since check_token also reveals which account the token belongs to, but description context makes the boundary clear enough.
Both tools follow a uniform snake_case verb_noun pattern (check_token, get_account_info). The convention is predictable and easy to extend.
Only two tools exist, both of which are preliminary/setup-oriented (token check and account lookup). For a server branded around Instagram nutrition data, this surface is far too thin to earn its place.
There are no tools to fetch posts, media, captions, or any nutrition-related content, which is the apparent purpose of the server. The surface covers only connectivity and account identity, leaving core workflows as dead ends.