프리픽 MCP 서버
Freepik API와 상호 작용하고 스톡 사진과 Mystic AI 이미지 생성 기능에 대한 액세스를 제공하기 위한 MCP 서버 구현입니다.
특징
- Freepik 리소스(사진, 벡터, PSD) 검색
- 자세한 리소스 정보를 얻으세요
- 리소스 다운로드
- Mystic AI를 사용하여 이미지 생성
- 이미지 생성 상태 확인
필수 조건
설치
지엑스피1
구성
- 먼저 API_SETUP.md 의 지침에 따라 Freepik API 키를 얻으세요.
- MCP 설정 파일에 서버를 추가합니다.
{
"mcpServers": {
"freepik": {
"command": "node",
"args": ["path/to/freepik-mcp/build/index.js"],
"env": {
"FREEPIK_API_KEY": "your-api-key-here"
},
"disabled": false,
"autoApprove": []
}
}
}
사용 가능한 도구
검색_리소스
다양한 필터로 Freepik 리소스를 검색하세요:
{
term?: string; // Search term
limit?: number; // Results per page
order?: 'relevance' | 'recent';
filters?: {
orientation?: {
landscape?: boolean;
portrait?: boolean;
square?: boolean;
panoramic?: boolean;
};
content_type?: {
photo?: boolean;
psd?: boolean;
vector?: boolean;
};
license?: {
freemium?: boolean;
premium?: boolean;
};
};
}
get_resource
특정 리소스에 대한 자세한 정보를 얻으세요:
{
id: number; // Resource ID to get details for
}
다운로드 리소스
특정 리소스에 대한 다운로드 URL 가져오기:
{
id: number; // Resource ID to download
}
생성_이미지
Freepik Mystic AI를 사용하여 이미지 생성:
{
prompt: string; // Text description of the image to generate
resolution?: '2k' | '4k';
aspect_ratio?: 'square_1_1' | 'classic_4_3' | 'traditional_3_4' |
'widescreen_16_9' | 'social_story_9_16';
realism?: boolean; // Enable realistic style
engine?: 'automatic' | 'magnific_illusio' | 'magnific_sharpy' | 'magnific_sparkle';
creative_detailing?: number; // 0-100
}
체크_상태
Mystic 이미지 생성 작업의 상태를 확인하세요.
{
task_id: string; // ID of the generation task to check
}
개발
# Install dependencies
npm install
# Build the server
npm run build
# Run in development mode
npm run dev
오류 처리
서버는 포괄적인 오류 처리를 구현합니다.
- API 오류는 자세한 정보와 함께 기록됩니다.
- Zod 스키마를 사용한 입력 검증
- 컨텍스트를 포함한 적절한 오류 응답
- 속도 제한 인식
기여하다
- 저장소를 포크하세요
- 기능 브랜치를 생성합니다(
git checkout -b feature/amazing-feature
) - 변경 사항을 커밋하세요(
git commit -m 'Add some amazing feature'
) - 브랜치에 푸시(
git push origin feature/amazing-feature
) - 풀 리퀘스트 열기
특허
MIT