mcp_project
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp_projectshow me the top selling products"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Satış Danışmanı Agent (Gemini + FastMCP + Prisma)
agent.py ──stdio──> server.py (FastMCP) ──Prisma──> data.db (SQLite)
Gemini 8 tool synthetic_ecommerce_datasetAgent, MCP sunucusunu alt süreç olarak başlatır. Tool şemaları doğrudan Gemini'ye verilir; tool çağrılarını google-genai SDK'sının otomatik fonksiyon çağırma (AFC) mekanizması yürütür — elle bir tool döngüsü yazmaya gerek yok.
Kurulum
uv sync
uv run prisma generate # şema değiştiğinde tekrar çalıştır.env dosyasına Gemini anahtarını ekle:
DATABASE_URL="file:../data.db"
GEMINI_API_KEY="..."
GEMINI_MODEL="gemini-2.5-flash" # opsiyonelRelated MCP server: Shop Analytics MCP Server
Çalıştırma
uv run agent.py # sohbet arayüzü
uv run server.py # sadece MCP sunucusu (Claude Desktop vb. için)Tool'lar (server.py)
Tool | Ne yapar |
| 20 kategori, ürün sayısı, ortalama fiyat |
| Kategoriye göre ürünler + fiyat aralığı, satış adedi |
| İsim/kategori/bütçe filtresiyle arama |
| Tek ürün: fiyat, ciro, popüler şehirler, ödeme yöntemleri |
| En çok satanlar (adet veya ciro bazlı) |
| E-postaya göre sipariş geçmişi + özet |
| Sipariş no ile tek sipariş |
| Genel mağaza istatistikleri |
Hepsi salt-okunur. Yeni tool eklemek için server.py içine @mcp.tool ile bir
async fonksiyon yaz — docstring'i Gemini'nin gördüğü açıklamadır, o yüzden
tool'u ne zaman kullanacağını docstring'de anlat.
SDK notları (google-genai 2.15.0)
Canlı bir MCP ClientSession'ı Gemini'ye tool olarak vermek iki yerde patlıyor.
agent.py ikisini de baypas ediyor:
configdict olarak veriliyor,GenerateContentConfigobjesi olarak değil. SDK, config objesi aldığında MCP session'ını ayıklamadan önceconfig.model_copy(deep=True)yapıyor; canlı session deepcopy edilemediği içinTypeError: cannot pickle '_asyncio.Future'alıyorsun. Dict dalında bu kopyalama yok. Aynı sebepleclient.aio.chatskullanılamıyor (config'i her zaman objeye çevirir) — bu yüzden sohbet geçmişi elle yönetiliyor.SanitizedClientSessiontool şemalarını temizliyor. FastMCP şemaya"additionalProperties": falsekoyuyor; SDK'nın şema dönüştürücüsü bu alanı her zaman iç içe bir şema sanıpFalse.items()çağırıyor →AttributeError: 'bool' object has no attribute 'items'. Wrapper değil alt sınıf kullanmak şart, çünkü SDK session'ıisinstanceile tespit ediyor.
SDK sürümünü yükseltirken bu ikisinin hâlâ gerekli olup olmadığını kontrol et.
Veri notları
Tek tablo, 10.000 sipariş satırı (2024-03-20 → 2025-03-20), 20 kategori, 80 ürün.
Ayrı ürün/müşteri tablosu yok: katalog ve müşteri profili sipariş satırlarından türetiliyor. Bu yüzden "fiyat" sabit değil, geçmiş siparişlerin ortalaması.
Stok bilgisi yok — agent stok sorusuna cevap veremez.
Sentetik veri: aynı e-posta farklı isimlerle görünebilir.
This server cannot be deployed
Maintenance
Related MCP Connectors
Generate, fix, explain and run read-only SQL on PostgreSQL, MySQL and SQL Server
Sandbox workspace tools: search, file read, DB queries, integrations. Returns synthetic data.
Read-only Recharge store analytics: metrics, dimensions, and governed queries in plain language.
Read-only access to your Consequential eCommerce marketing analytics and attribution data.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceProvides read-only access to a sales database, letting LLMs answer analytics questions like revenue by region or top customers via MCP tools.-
- FlicenseAqualityCmaintenanceEnables AI agents to answer analytical questions about an online store's SQLite database through specialized read-only tools, without any risk of modifying the underlying data.8-
- FlicenseAqualityCmaintenanceEnables AI agents to read-only query an online store's SQLite database, listing tables, inspecting schemas, and running SELECT queries over customers, products, orders, and order items.3-
- FlicenseAqualityBmaintenanceGives AI agents read-only analytical access to an e-commerce SQLite database (customers, orders, order_items, products) via SQL queries, table listing, and schema inspection.3-