npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@iflow-mcp/the-focus-ai-mastodon-mcp

v1.0.0

Published

MCP server for Mastodon integration

Readme

Mastodon MCP

A Model Context Protocol server that provides tools for interacting with Mastodon. Currently supports creating toots with optional media attachments.

Features

  • Create toots with customizable visibility and content warnings
  • Upload and attach media files (images, videos, audio)
  • Add alt text/descriptions to media attachments
  • Schedule toots for a future time
  • Secure credential management using environment variables or 1Password CLI

Prerequisites

  • Node.js 18+
  • pnpm
  • A Mastodon account and API access token
  • Optionally, 1Password CLI (op) installed and configured if using 1Password for credential management.

Installation

# Clone the repository
git clone [repository-url]
cd mastodon-mcp

# Install dependencies
pnpm install

# Build the project
pnpm build

Configuration

The tool requires a Mastodon API token. You can provide this token in one of the following ways:

  1. Environment Variable (Recommended for simplicity): Set the MASTODON_ACCESS_TOKEN environment variable:
    export MASTODON_ACCESS_TOKEN="your_mastodon_api_token"
  2. 1Password: Store your token at:
    • op://Personal/Floss.Social Key/notesPlain

You can optionally set the Mastodon instance URL via environment variable:

export MASTODON_INSTANCE_URL="https://your.instance.social"

If not set, it defaults to https://floss.social.

Usage

Start the MCP server:

pnpm start

The server exposes a single tool mastodon_create_toot with the following parameters:

  • content (required): The text content of your toot
  • visibility: One of "public", "unlisted", "private", or "direct" (default: "public")
  • sensitive: Boolean flag for sensitive content (default: false)
  • spoiler_text: Warning text shown before the content (default: "")
  • media_file: Path to a media file to attach
  • media_description: Alt text/description for the attached media
  • scheduled_at: Optional ISO 8601 datetime to schedule the toot for a future time (e.g., "2024-07-04T10:00:00-07:00")

Example Usage with MCP Inspector

  1. Start the inspector:
npx @modelcontextprotocol/inspector node dist/mcp-server.js
  1. Open http://localhost:5173 in your browser

  2. Use the tool with parameters like:

{
  "content": "Hello from MCP!",
  "visibility": "public",
  "media_file": "/path/to/image.jpg",
  "media_description": "A beautiful sunset",
  "scheduled_at": "2025-01-01T12:00:00Z"
}

Development

# Run in development mode with auto-reloading
pnpm dev

# Build the project
pnpm build

# Run the built server
pnpm start

Security

  • No credentials are hardcoded in the codebase
  • API tokens can be securely managed via environment variables or retrieved from 1Password.
  • API responses are git-ignored to prevent accidental credential leaks

License

ISC