Skip to main content
Glama

버튼다운 API 통합

Buttondown 뉴스레터 서비스를 위한 포괄적인 TypeScript 통합으로, 뉴스레터, 초안, 분석을 관리하기 위한 CLI 인터페이스와 MCP(Model Context Protocol) 서버를 제공합니다.

특징

  • 다중 인터페이스 :

    • 직접 상호 작용을 위한 명령줄 인터페이스(CLI)

    • AI/LLM 통합을 위한 MCP(모델 컨텍스트 프로토콜) 서버

    • 사용자 정의 통합을 위한 프로그래밍 방식 TypeScript API

  • 핵심 기능 :

    • 이메일 초안 관리(생성, 업데이트, 삭제)

    • 이메일 스케줄링 시스템

    • 분석 검색 및 포맷팅

    • 목록 관리

    • 태그 관리

  • 보안 :

    • API 키 관리를 위한 1Password 통합

    • 환경 변수 지원

    • 보안 자격 증명 처리

  • 개발자 경험 :

    • 전체 TypeScript 지원

    • 포괄적인 유형 정의

    • 실제 API 응답 기반 유형

    • 내장된 테스트 유틸리티

Related MCP server: ClickUp MCP Server

설치

지엑스피1

구성

API 키는 두 가지 방법으로 제공될 수 있습니다.

  1. 환경 변수:

    export BUTTONDOWN_API_KEY=your_api_key
  2. 1Password CLI(권장):

    • op://Development/Buttondown API/notesPlain 1Password에 API 키를 저장하세요.

    • 통합은 필요할 때 자동으로 가져옵니다.

용법

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 라이센스 - 자세한 내용은 라이센스를 참조하세요.

감사의 말

One-click Deploy
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/The-Focus-AI/buttondown-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server