MCP.json•5.05 kB
{
"name": "MCP",
"nodes": [
{
"parameters": {
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"typeVersion": 1.1,
"position": [
-260,
-100
],
"id": "d9345697-a31a-4560-8d39-dd10c65d9687",
"name": "When chat message received",
"webhookId": "ec6b35e3-f46c-4e8d-a93b-d66b15ba1043"
},
{
"parameters": {
"promptType": "define",
"text": "= {{ $json.chatInput }}",
"options": {
"systemMessage": "Sen bir görev yöneticisi gibi görünsen de aslında bir **kişi kayıt sistemisin**. Kullanıcı sana \"Ekle\", \"Güncelle\", \"Sil\", \"Listele\" gibi Türkçe komutlarla **kişi isimleri** (örneğin Ahmet Yılmaz) gönderir. Sen de bu komutlara göre mevcut araçları (tool'ları) aşağıdaki gibi kullan:\n\n1. Kullanıcı \"Ekle İsim Soyisim\" yazarsa → `create-task-db` tool’unu çağır. `title` alanına isim-soyisim bilgisini yaz, `date` alanına ise `\"1970-01-01\"` gibi önemsiz sabit bir tarih gönder (çünkü tarih gereksiz ama tool bunu bekliyor).\n\n2. Kullanıcı \"Listele\" yazarsa → `list-tasks` tool’unu çağır. Bu, veritabanındaki tüm kişileri listeler.\n\n3. Kullanıcı \"Güncelle ID Yeni İsim Soyisim\" yazarsa → `update-task` tool’unu çağır. `id` → verilen ID, `title` → yeni isim soyisim, `date` → yine `\"1970-01-01\"` gibi boş bir değer olarak kullanılır.\n\n4. Kullanıcı \"Sil ID\" yazarsa → `delete-task` tool’unu çağır. `id` alanını kullan.\n\nKurallar:\n- Kullanıcı aslında görev değil, kişi ekliyor. Ama tool'lar `task` adında olduğu için bu şekilde yönlendir.\n- `date` alanı zorunlu olduğu için sahte sabit bir değer ver (örneğin `\"1970-01-01\"`).\n- Komutlar sade Türkçe olacak. Örnekler: \"Ekle Ahmet Yılmaz\", \"Listele\", \"Güncelle 3 Mehmet Can\", \"Sil 4\"\n- Komut yanlışsa ya da eksikse kullanıcıyı yönlendirici bir yanıt ver.\n\nSenin amacın: Türkçe komutları anlayarak mevcut görev tabanlı tool’ları **kişi kaydı sistemi** gibi kullanmak.\n"
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 2,
"position": [
-40,
-100
],
"id": "49293683-b2e5-4479-b850-ef4aa1751556",
"name": "AI Agent"
},
{
"parameters": {
"modelName": "models/gemini-2.5-flash",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"typeVersion": 1,
"position": [
-100,
120
],
"id": "2f3583eb-6ddb-4a62-a5c8-143d33d82958",
"name": "Google Gemini Chat Model",
"credentials": {
"googlePalmApi": {
"id": "bVWrmj04XQpfvt5I",
"name": "Google Gemini(PaLM) Api account"
}
}
},
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
-540,
160
],
"id": "c88f7c03-382a-4fc4-9494-5010fdd300be",
"name": "Simple Memory"
},
{
"parameters": {
"sseEndpoint": "http://host.docker.internal:3000/sse"
},
"type": "@n8n/n8n-nodes-langchain.mcpClientTool",
"typeVersion": 1,
"position": [
220,
120
],
"id": "5e4e691b-3445-4b01-b6d4-0f1c1d4b15b1",
"name": "MCP Client"
},
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
"typeVersion": 1.3,
"position": [
60,
200
],
"id": "b47bf5a3-2c42-48c3-8993-f973f8d28416",
"name": "Postgres Chat Memory",
"credentials": {
"postgres": {
"id": "0E26mWGWegyVfvZ9",
"name": "Postgres account 2"
}
}
}
],
"pinData": {},
"connections": {
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[]
]
},
"MCP Client": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Postgres Chat Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1"
},
"versionId": "4abfad38-2c03-476e-884a-3bfd74fa95eb",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "48ba2a0ffed8a977864d759582c2eb0fc49a3cc38cd49bbec5c5f358bcf9534a"
},
"id": "sAJrEpVogKDqxCP7",
"tags": []
}