我打造了開源 Threads Analytics,提供 31 張圖表、Mac App 及 MCP 支援
I Built an Open-Source Threads Analytics Tool with 31 Charts, a Mac App, and MCP Support
Threads Analytics 推出 v1.0.0,是一款免費、開源的 Meta Threads 分析工具,提供 31 張圖表、歷史數據追蹤及最佳發佈時間分析。工具支援 MCP,讓 Claude Code、Codex 等 AI 智能體存取分析數據。Mac 桌面版適用於 Apple Silicon Mac,亦可自行託管。
I've been working on a side project called Threads Analytics, and I recently released v1.0.0! 🎉
It's a free, open-source analytics tool for Meta's Threads, built to help creators and developers understand their content performance using their own data.
What started as a simple dashboard has grown into a project with:
- 📊 31 analytics charts covering posts, engagement, and audience growth
- ⏰ Best posting time analysis based on historical performance
- 📈 Historical data tracking to monitor long-term growth
- 💻 A native-like Mac desktop app with local data storage
- 🤖 MCP integration for AI agents like Claude Code and Codex
- 🔓 Open-source and self-hostable deployment
GitHub: https://github.com/ridemountainpig/threads-analytics
Website: https://threads-analytics.app/
Why I Built It
I've been using Threads for a while, and I kept asking myself a few questions:
- When is the best time to publish a post?
- Do images or videos perform better than text?
- Does post length affect engagement?
- Which topics consistently perform well?
- How has my account grown over time?
Looking at individual post metrics wasn't enough.
I wanted to understand patterns across my entire posting history rather than relying on intuition or a few viral posts.
So I started building Threads Analytics.
The goal was simple: turn historical Threads data into actionable insights.
31 Analytics Charts
One of the biggest parts of the project is data visualization.
Instead of displaying raw metrics, I wanted to make it easier to identify patterns and compare performance.
The dashboard includes analytics for posting activity, engagement, content performance, follower growth, and more.
Finding the Best Time to Post
One of my favorite features is best posting time analysis.
It groups historical posts by publishing time and compares their performance.
I chose to use median views rather than relying entirely on averages.
Why?
Because a single viral post can significantly distort the average.
Using the median helps reduce the influence of outliers and gives a more representative view of typical performance.
The dashboard also considers sample size, since a time slot with only one successful post shouldn't automatically be treated as the best posting time.
Understanding Content Performance
Threads Analytics also helps answer questions like:
- Are shorter posts performing better?
- Do posts with images receive more engagement?
- Which keywords appear in high-performing posts?
- Are certain content formats more consistent?
The interesting part is that the answers can vary significantly between accounts.
Instead of following generic social media advice, creators can make decisions based on their own historical data.
Tracking Long-Term Growth
Another important feature is historical data storage.
Social media analytics become much more useful when you can compare performance over weeks or months.
Threads Analytics supports automatic synchronization to build a growing history of your account's performance.
This makes it possible to look beyond today's metrics and understand longer-term trends.
Turning a Next.js App into a Mac Desktop App
For v1.0.0, I also released a Mac desktop version.
One challenge with self-hosted analytics tools is that not everyone wants to set up a server, database, and deployment environment.
I wanted to make Threads Analytics easier to run locally.
The desktop version provides:
- Local SQLite database storage
- No separate PostgreSQL server required
- No hosting costs
- The same analytics dashboard
- Support for automatic data synchronization
The app is currently available for Apple Silicon Macs.
I also explored using Vercel's native application tooling to bring the existing Next.js experience to the desktop.
This was particularly interesting because it allowed me to reuse much of the existing application instead of rebuilding the entire interface from scratch.
Desktop version: https://threads-analytics.app/en/desktop
Letting AI Agents Analyze Threads Data with MCP
Another feature I wanted to explore was integrating Threads Analytics with AI coding agents.
That's why I added support for the Model Context Protocol (MCP).
With MCP, tools like Claude Code, Codex, and Cursor can access analytics data through the project's MCP server.
For example, you can ask an AI agent:
Analyze my best-performing posts from the last 30 days and identify common patterns.
Or:
Based on my historical performance, suggest the best times to publish next week.
Or even:
Compare my recent posts and suggest topics I should explore next.
The idea is to make analytics data available beyond the dashboard.
Instead of manually reviewing every chart, developers can build their own AI-assisted workflows around the data.
MCP documentation: https://threads-analytics.app/en/mcp
Tech Stack
The project is built primarily with Next.js and TypeScript.
| Technology | Purpose |
|---|---|
| Next.js | Web application |
| TypeScript | Application development |
| Threads API | Retrieving account and post data |
| Prisma | Database access |
| PostgreSQL | Web deployment storage |
| SQLite | Desktop local storage |
| MCP | AI agent integration |
One of the most important design decisions was separating data collection from data analysis.
Analytics becomes more valuable as historical data accumulates, so reliable synchronization and storage were important parts of the architecture.
The project also supports self-hosting, allowing developers to deploy it in their own environments.
Try It Yourself
There are two main ways to use Threads Analytics.
Option 1: Mac Desktop App
If you're using an Apple Silicon Mac, you can install the desktop version without setting up a separate server.
https://threads-analytics.app/en/desktop
Option 2: Self-Hosting
If you prefer running your own services, you can deploy the open-source version.
The source code and setup instructions are available on GitHub.
https://github.com/ridemountainpig/threads-analytics
You can also explore the product and its features on the official website:
https://threads-analytics.app/
What's Next?
Although v1.0.0 is now available, there's still a lot I'd like to explore.
I'm particularly interested in making historical analytics data more useful for AI agents.
For example, instead of asking an agent to analyze everything from scratch every time, I'd like to explore generating reusable insights from historical performance and making them available when creating new content.
I'm also continuing to improve the desktop experience and analytics features.
Final Thoughts
Threads Analytics started as a small side project to better understand my own Threads posts.
Over time, it evolved into a full analytics dashboard with 31 charts, a Mac desktop app, historical data storage, and MCP support.
It's been a fun project to build, and I'd love to hear what other developers think.
The project is completely open source:
⭐ GitHub: https://github.com/ridemountainpig/threads-analytics
If you find it interesting or useful, a GitHub Star would mean a lot!
Issues, feature requests, and contributions are also welcome.
Thanks for reading! 🚀
來源:DEV Community · dev.to
