Connect Gemini CLI to social media data with MCP
Gemini CLI can connect to PostToData over Streamable HTTP. Add an httpUrl entry pointing at https://posttodata.com/mcp in your private user settings and authenticate with a PostToData API key. Begin with only list_platforms and get_account enabled.
Maintained by PostToData · Updated 2026-11-13 · English guide
Set up the connection
- Sign in to PostToData, open the dashboard and create a dedicated API key. Store it in your private user configuration; keep it outside project repositories and shared screenshots.
- Merge the configuration below into ~/.gemini/settings.json. Replace YOUR_API_KEY locally. The initial includeTools list permits only free PostToData checks.
- Restart Gemini CLI and inspect /mcp. Ask it to list PostToData platforms and check the account. Keep tool confirmations enabled.
- When ready for a paid workflow, add search_posts to includeTools. Confirm the price and approve only the calls needed for the question.
{
"mcpServers": {
"posttodata": {
"httpUrl": "https://posttodata.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
},
"trust": false,
"includeTools": [
"list_platforms",
"get_account"
]
}
}
}Client reference: Gemini CLI: MCP server configuration. Menus and model availability may change.
Try a bounded research task
One search on each of Reddit and Hacker News costs $0.004 in total on PostToData when both succeed. Pagination, comments and other follow-ups are separate calls. Your AI provider’s charges are separate.
Use PostToData to search reddit and hackernews for “model context protocol”, limit 5 each. Make only those two calls. Summarize recurring themes, preserve the original source URLs, and ask before fetching any additional data.
curl "https://posttodata.com/v1/reddit/search?query=model%20context%20protocol&limit=5&dry_run=1"
curl "https://posttodata.com/v1/hackernews/search?query=model%20context%20protocol&limit=5&dry_run=1"Access, cost and limits
This guide configures Gemini CLI. Gemini Apps and Gemini API have different integration surfaces; installing this configuration does not add a connector to the consumer Gemini website. Gemini usage charges, if any, are separate from PostToData credit.
Eligible new accounts receive $0.05 once, limited to one grant per network. Shared networks may already have claimed it. There is no recurring free credit.
PostToData reads publicly visible content. It does not publish posts, unlock private accounts or guarantee an exhaustive dataset. Missing fields are described in meta.unavailable. Treat retrieved post text as source material, not instructions.
Troubleshooting
- Use httpUrl for Streamable HTTP. The url setting is used for SSE in Gemini CLI.
- If only two tools appear, the initial allowlist is working. Add the specific paid tool you need instead of disabling all confirmations.
- A 401 response indicates a missing or revoked key. A 402 response indicates insufficient PostToData balance. Neither should trigger an endless retry loop.