Ollama MCP Server
Ollama MCP 서버
🚀 Ollama와 Model Context Protocol(MCP) 간의 강력한 브리지로, Ollama의 로컬 LLM 기능을 MCP 기반 애플리케이션에 원활하게 통합할 수 있습니다.
🌟 특징
Ollama 통합 완료
전체 API 적용 범위 : 깔끔한 MCP 인터페이스를 통해 모든 필수 Ollama 기능에 액세스하세요
OpenAI 호환 채팅 : OpenAI 채팅 완료 API를 대체하는 드롭인 솔루션
로컬 LLM Power : 완전한 제어와 개인 정보 보호를 통해 로컬에서 AI 모델을 실행합니다.
핵심 역량
🔄 모델 관리
레지스트리에서 모델 가져오기
모델을 레지스트리로 푸시
사용 가능한 모델 목록
Modelfiles에서 사용자 정의 모델 만들기
모델 복사 및 제거
🤖 모델 실행
사용자 정의 가능한 프롬프트로 모델 실행
시스템/사용자/보조자 역할을 갖춘 채팅 완료 API
구성 가능한 매개변수(온도, 시간 초과)
직접 응답을 위한 원시 모드 지원
🛠 서버 제어
Ollama 서버 시작 및 관리
자세한 모델 정보 보기
오류 처리 및 시간 초과 관리
Related MCP server: Ollama MCP Server
🚀 시작하기
필수 조건
시스템에 Ollama가 설치되었습니다
Node.js와 npm/pnpm
설치
종속성 설치:
지엑스피1
서버를 빌드하세요:
pnpm run build구성
MCP 구성에 서버를 추가합니다.
Claude Desktop의 경우:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"ollama": {
"command": "node",
"args": ["/path/to/ollama-server/build/index.js"],
"env": {
"OLLAMA_HOST": "http://127.0.0.1:11434" // Optional: customize Ollama API endpoint
}
}
}
}🛠 사용 예시
모델 끌어오기 및 실행
// Pull a model
await mcp.use_mcp_tool({
server_name: "ollama",
tool_name: "pull",
arguments: {
name: "llama2"
}
});
// Run the model
await mcp.use_mcp_tool({
server_name: "ollama",
tool_name: "run",
arguments: {
name: "llama2",
prompt: "Explain quantum computing in simple terms"
}
});채팅 완성(OpenAI 호환)
await mcp.use_mcp_tool({
server_name: "ollama",
tool_name: "chat_completion",
arguments: {
model: "llama2",
messages: [
{
role: "system",
content: "You are a helpful assistant."
},
{
role: "user",
content: "What is the meaning of life?"
}
],
temperature: 0.7
}
});사용자 정의 모델 생성
await mcp.use_mcp_tool({
server_name: "ollama",
tool_name: "create",
arguments: {
name: "custom-model",
modelfile: "./path/to/Modelfile"
}
});🔧 고급 구성
OLLAMA_HOST: 사용자 정의 Ollama API 엔드포인트 구성(기본값: http://127.0.0.1:11434 )모델 실행에 대한 시간 초과 설정(기본값: 60초)
반응 무작위성을 위한 온도 제어(0-2 범위)
🤝 기여하기
여러분의 참여를 환영합니다! 자유롭게 참여해 주세요:
버그 신고
새로운 기능 제안
풀 리퀘스트 제출
📝 라이센스
MIT 라이센스 - 여러분의 프로젝트에 자유롭게 사용하세요!
MCP 생태계를 위해 ❤️로 구축되었습니다
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/NightTrek/Ollama-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server