
mcp threads server
基于 Threads API 的服务器,支持帖子读写、媒体发布等功能。
Repository Info
About This Server
基于 Threads API 的服务器,支持帖子读写、媒体发布等功能。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
MCP Threads API 서버
Threads API를 활용한 서버 구현입니다.
기능
- Threads API를 사용하여 게시물 읽기/쓰기
- 액세스 토큰 기반 인증
- 텍스트, 이미지, 비디오 게시물 지원
- TypeScript를 사용한 타입 안전성
설치
npm install
환경 변수 설정
.env 파일을 생성하고 다음 내용을 설정하세요:
# 서버 설정
PORT=3000
NODE_ENV=development
# Threads API 설정
THREADS_ACCESS_TOKEN=your_access_token_here
실행
개발 모드로 실행:
npm run dev
빌드 후 실행:
npm run build
npm start
API 엔드포인트
프로필
GET /api/profile/me- 내 프로필 정보 가져오기GET /api/profile/:username- 사용자 프로필 검색하기
스레드
GET /api/thread/:threadId- 스레드 정보 가져오기POST /api/thread/create- 스레드 컨테이너 생성하기POST /api/thread/publish- 스레드 게시하기
테스트
전체 테스트 실행
npm test
테스트 커버리지 확인
npm run test:coverage
개발 중 테스트 자동 실행
npm run test:watch
테스트 구성
- 단위 테스트:
src/__tests__디렉토리에 위치 - 통합 테스트:
src/__tests__/integration디렉토리에 위치
프로젝트 구조
src/
├── __tests__/ # 테스트 코드
├── bin/ # CLI 도구
├── config/ # 설정 관련 코드
├── controllers/ # HTTP 요청 처리기
├── middlewares/ # 미들웨어 (인증 등)
├── routes/ # API 라우트
├── services/ # 비즈니스 로직
├── types/ # 타입 정의
└── utils/ # 유틸리티 함수
로컬 테스트
프로젝트를 로컬에서 테스트하려면:
-
저장소를 클론합니다:
git clone https://github.com/yourusername/mcp-threads-server.git cd mcp-threads-server -
의존성을 설치합니다:
npm install -
.env파일을 생성하고 인증 정보를 입력합니다:cp .env.example .env # .env 파일을 편집하여 Access Token 추가 -
서버를 실행합니다:
npm start
Claude Desktop 설정
claude_desktop_config.json 파일에 다음과 같이 추가합니다:
{
"mcpServers": {
"threads": {
"command": "npx",
"args": [
"-y",
"@makerkim/mcp-threads-server",
"--token",
"your_access_token"
]
}
}
}
참고 자료
- Threads API 공식 문서
- Threads API Postman Collection
라이선스
ISC
Quick Start
Clone the repository
git clone https://github.com/imakerjun/mcp-threads-serverInstall dependencies
cd mcp-threads-server
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.