Buttondown MCP Server

by The-Focus-AI
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Used for securely storing and retrieving API keys, specifically integrating with the Buttondown API by fetching credentials from a specific 1Password path.

  • Supports creating email content in Markdown format when creating newsletter drafts through the Buttondown API.

  • Supported as an alternative package manager for installing and managing the Buttondown API integration package.

ボタンダウン API 統合

Buttondown ニュースレター サービス用の包括的な TypeScript 統合。ニュースレター、下書き、分析を管理するための CLI インターフェイスと Model Context Protocol (MCP) サーバーの両方を提供します。

特徴

  • 複数のインターフェース:
    • 直接対話するためのコマンドラインインターフェース(CLI)
    • AI/LLM統合のためのモデルコンテキストプロトコル(MCP)サーバー
    • カスタム統合のためのプログラム可能な TypeScript API
  • コア機能:
    • メールの下書き管理(作成、更新、削除)
    • メールスケジュールシステム
    • 分析情報の取得とフォーマット
    • リスト管理
    • タグ管理
  • 安全
    • APIキー管理のための1Password統合
    • 環境変数のサポート
    • 安全な資格情報の取り扱い
  • 開発者エクスペリエンス:
    • 完全なTypeScriptサポート
    • 包括的な型定義
    • 実際のAPIレスポンスベースのタイプ
    • 組み込みのテストユーティリティ

インストール

# Install using pnpm (recommended) pnpm install # Or using npm npm install # Or using yarn yarn install

構成

API キーは次の 2 つの方法で提供できます。

  1. 環境変数:
    export BUTTONDOWN_API_KEY=your_api_key
  2. 1Password CLI(推奨):
    • APIキーを1Passwordのop://Development/Buttondown API/notesPlainに保存します。
    • 統合により、必要に応じて自動的に取得されます

使用法

CLIインターフェース

# List all emails buttondown emails list # Create a new draft buttondown draft create <file> # Schedule an email buttondown schedule set <draft-id> <relative-time> # Get analytics buttondown analytics get <draft-id>

MCPサーバー

  1. サーバーを起動します。
    pnpm mcp:start
  2. インスペクターから開始します(開発用):
    pnpm mcp:inspect

利用可能な MCP ツール:

  • list_emails : オプションのステータスフィルタリングを使用してすべてのメールを一覧表示します
    { "status": "draft" // Optional: "draft", "scheduled", "sent" }
  • create_draft : 新しいメールの下書きを作成する
    { "content": "Email content in markdown", "title": "Optional email subject" }
  • get_analytics : 特定のメールの分析情報を取得する
    { "draftId": "email-id-here" }
  • schedule_draft : メールの送信スケジュールを設定する
    { "draftId": "email-id-here", "scheduledTime": "2024-03-27T10:00:00Z" }

プログラムによる使用

import { ButtondownAPI } from "api-integrator"; // Initialize the client const api = new ButtondownAPI(); // Will use 1Password or env var // List drafts const drafts = await api.getDrafts(); // Create a draft const draft = await api.createEmail({ subject: "My Newsletter", body: "Content here", status: "draft", }); // Schedule an email const scheduled = await api.scheduleEmail(draft.id, "2024-03-27T10:00:00Z"); // Get analytics const analytics = await api.getEmailStats(draft.id);

発達

# Build the project pnpm build # Run tests pnpm test # Start MCP server in development mode pnpm mcp:inspect # Build MCP server pnpm mcp:build

テスト

このプロジェクトにはいくつかの種類のテストが含まれています。

  • コア機能のユニットテスト
  • APIインタラクションの統合テスト
  • CLIコマンドテスト
  • MCP サーバーテスト

次のテストを実行します:

pnpm test

プロジェクト構造

. ├── src/ │ ├── api/ # Core API client │ ├── cli/ # CLI implementation │ ├── mcp/ # MCP server │ ├── types/ # TypeScript definitions │ └── utils/ # Shared utilities ├── tests/ # Test files ├── api-responses/ # Cached API responses └── memory-bank/ # Project documentation

貢献

  1. リポジトリをフォークする
  2. 機能ブランチを作成します( git checkout -b feature/amazing-feature
  3. 変更をコミットします ( git commit -m 'Add some amazing feature' )
  4. ブランチにプッシュする ( git push origin feature/amazing-feature )
  5. プルリクエストを開く

ライセンス

ISCライセンス - 詳細についてはライセンスを参照してください

謝辞

-
security - not tested
F
license - not found
-
quality - not tested

AI および LLM システムが Buttondown ニュースレター サービスと対話できるようにし、モデル コンテキスト プロトコル インターフェイスを通じて電子メールの下書き、スケジュール設定、分析の取得、リスト管理をサポートします。

  1. Features
    1. Installation
      1. Configuration
        1. Usage
          1. CLI Interface
          2. MCP Server
          3. Programmatic Usage
        2. Development
          1. Testing
            1. Project Structure
              1. Contributing
                1. License
                  1. Acknowledgments
                    ID: 788lpnjn1o