Skip to main content
Glama

Ollama를 사용한 로컬 MCP 서버

Ollama 언어 모델을 MCP 서버에 연결하는 로컬 Python 프로젝트입니다. 모델은 서버의 도구를 발견하고, 도구를 호출할 시기를 결정하며, 결과를 받아 간결한 최종 응답을 생성할 수 있습니다.

flowchart TD
    U["User question"] --> C["Python MCP client"]
    C --> O["Ollama llama3.2:3b"]
    O --> C
    C --> S["Local MCP server"]
    S --> D["Student JSON data"]

사용 가능한 도구

도구

용도

add_numbers

명시적으로 제공된 두 숫자를 더합니다

get_student_info

내장된 데모 학생 프로필을 반환합니다

search_students

이름과 요청된 필드로 files/students.json을 검색합니다

Related MCP server: custom-mcp-server

요구 사항

  • Python 3.11+

  • Ollama 설치 및 실행 중

  • Ollama 모델 llama3.2:3b

Windows 설정

python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
ollama pull llama3.2:3b
python client.py

클라이언트는 활성 Python 인터프리터를 통해 server.py를 자동으로 실행합니다. 별도의 터미널에서 서버를 시작할 필요가 없습니다.

예시 질문

  • What is 10 + 20?

  • Tell me about Pranay.

  • Where is Ananya studying?

  • What is Saranya studying?

프로젝트 구조

mcp-server/
├── client.py
├── server.py
├── files/
│   └── students.json
├── tests/
│   └── test_server.py
└── requirements.txt

도구 결과 수정

Ollama는 도구 결과 메시지에 실행된 tool_name이 포함될 것으로 기대합니다. 클라이언트는 이 필드를 포함하고 사용 가능한 도구 정의를 후속 호출에 전달하여, MCP 도구가 실행된 후 모델이 최종 응답을 생성할 수 있게 합니다.

데이터 참고 사항

files/students.json은 데모 데이터입니다. 이 프로젝트를 공개적으로 또는 프로덕션에서 사용하기 전에 가상의 데이터나 동의를 받은 데이터로 교체하세요.

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.

  • 500+ deterministic tools for AI agents: math, conversion, validation, hashing, encoding, date/time.

  • AI-callable calculators and engineering models with real formulas. No hallucinated math.

View all MCP Connectors

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/Pranay-6669/mcp-server'

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