From 6f2f8ea06b77ed0c13e4aaa5880ea869c27c360d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D0=B8=D0=BD=D0=B0=D1=80=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0=D0=B3=D0=B8=D1=82=D0=BE=D0=B2?= Date: Tue, 2 Jun 2026 12:53:22 +0000 Subject: [PATCH] =?UTF-8?q?MCP-=D1=81=D0=B5=D1=80=D0=B2=D0=B5=D1=80=20?= =?UTF-8?q?=D1=80=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=BE=D0=B2=D0=B0=D0=BD:?= =?UTF-8?q?=20add=20memory=5Fclient.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- memory_client.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 memory_client.py diff --git a/memory_client.py b/memory_client.py new file mode 100644 index 0000000..9bd27b9 --- /dev/null +++ b/memory_client.py @@ -0,0 +1,26 @@ +import asyncio +from fastmcp import Client + +async def main(): + client = Client("python memory_server.py") + await client.connect() + try: + result = await client.call_tool( + "save_with_namespace", + {"key": "username", "value": "Алексей", "namespace": "default"} + ) + print(f"Сохранено: {result}") + result = await client.call_tool( + "get_by_namespace", + {"namespace": "default"} + ) + print("Данные namespace 'default':") + for item in result: + print(f" {item['key']}: {item['value']}") + keys = await client.call_tool("list_keys", {"pattern": "*name"}) + print(f"Ключи с 'name': {keys}") + finally: + await client.close() + +if __name__ == "__main__": + asyncio.run(main())