mcp_server

arifdegirmenci/mcp_server

3.2

If you are the rightful owner of mcp_server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

TreasuryPath MCP Server is a simple server that fetches bank accounts from the TreasuryPath API and allows users to ask questions using the Ollama LLM.

TreasuryPath MCP Server

TreasuryPath API'den banka hesaplarını çekip Ollama LLM'e soru sorabilen basit bir MCP server.

Özellikler

  • TreasuryPath API'den banka hesaplarını çeker
  • Ollama LLM ile soru-cevap yapar
  • API üzerinden kullanılabilir

Kurulum

  1. Virtual environment aktif et:
source venv/bin/activate
  1. .env dosyasını oluştur:
TREASURY_API_KEY=your_key
TREASURY_API_SECRET=your_secret
COMPANY_ID=your_company_id
BASE_URL=https://api.tpathdemo.com/api/v1

# Ollama Ayarları
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=llama3
  1. Ollama Kurulumu:
# Ollama'yı kurun
curl -fsSL https://ollama.com/install.sh | sh

# Model indirin
ollama pull llama3.2

# Ollama'yı başlatın (genellikle otomatik başlar)
ollama serve

Kullanım

1. Sunucuyu Başlat

python3 server.py

2. API'den Soru Sor

# POST
curl -X POST http://localhost:8080/ask \
  -H "Content-Type: application/json" \
  -d '{"question": "TreasuryPath'\''te kaç banka hesabı var?"}'

# GET
curl "http://localhost:8080/ask?q=Kaç%20hesap%20var"

Proje Yapısı

mcp_server/
├── server.py              # Ana server (aiohttp)
├── agents/
│   └── bank_agent.py      # TreasuryPath API işlemleri
├── llm_agent.py           # LLM entegrasyonu (Ollama)
└── utils.py               # JWT token yönetimi

Akış

  1. Kullanıcı soru sorar (API üzerinden)
  2. Sistem TreasuryPath API'den banka hesaplarını çeker
  3. Veriler Ollama LLM'e gönderilir
  4. Ollama cevap verir