{"id":459419,"date":"2025-05-13T03:02:47","date_gmt":"2025-05-13T03:02:47","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=459419"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=459419","title":{"rendered":"<span>Model Context Protocol (MCP): \u043a\u0430\u043a \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442\u044c \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 API \u0437\u0430 \u043f\u0430\u0440\u0443 \u043a\u043b\u0438\u043a\u043e\u0432<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/09c\/1cd\/fc5\/09c1cdfc5327e067733c0a4d0129c2b5.jpg\" width=\"1280\" height=\"853\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/09c\/1cd\/fc5\/09c1cdfc5327e067733c0a4d0129c2b5.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/09c\/1cd\/fc5\/09c1cdfc5327e067733c0a4d0129c2b5.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0447\u0435\u043c\u043f\u0438\u043e\u043d\u044b!<br \/>\u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u0438\u0440 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0430\u043b \u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 (LLM). \u0412\u0441\u043a\u043e\u0440\u0435 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0438\u0445 \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 &#8212; \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u0432\u043a\u0443\u0441 \u0438 \u0446\u0432\u0435\u0442, \u043e\u0442 \u0443\u0437\u043a\u043e\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u0417\u0430\u0442\u0435\u043c \u043d\u0430\u0447\u0430\u043b\u0430\u0441\u044c \u0432\u043e\u043b\u043d\u0430 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0439: LLM \u043d\u0430\u0447\u0430\u043b\u0438 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 API, \u0443\u043f\u0440\u043e\u0449\u0430\u044f \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u044f \u0440\u0443\u0442\u0438\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u044d\u0442\u0430\u043f\u043e\u043c \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 LLM-\u0430\u0433\u0435\u043d\u0442\u043e\u0432 &#8212; \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0445 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044f \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438. \u0412\u043c\u0435\u0441\u0442\u0435 \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u0438\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043d\u043e\u0432\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 &#8212; \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438 \u0438 \u0438\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>\u0418 \u0432\u043e\u0442, \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Anthropic \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 &#8212; \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u00a0<strong>Model Context Protocol (MCP)<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 \u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 MCP, \u0438 \u0441 \u0447\u0435\u043c \u0435\u0433\u043e \u0435\u0434\u044f\u0442!  <\/p>\n<h2>MCP \u0438\u043b\u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u043c \u043d\u0430 \u043f\u0430\u043b\u044c\u0446\u0430\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 LLM \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043c\u0438\u0440\u043e\u043c<\/h2>\n<p>\u0415\u0449\u0451 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043a\u0430\u0436\u0434\u044b\u0439 AI-\u0430\u0433\u0435\u043d\u0442 \u0431\u044b\u043b \u043a\u0430\u043a \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u0443\u0440\u0438\u0441\u0442: \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u0430\u0437\u0430\u0442\u044c \u0431\u0438\u043b\u0435\u0442, \u043d\u0430\u0439\u0442\u0438 \u043e\u0442\u0435\u043b\u044c \u0438\u043b\u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u0435\u0440, \u0435\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c. \u041e\u0434\u0438\u043d API \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b \u043e\u0434\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430, \u0434\u0440\u0443\u0433\u043e\u0439 &#8212; \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0434\u0440\u0443\u0433\u043e\u0435. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 &#8212; \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0439, \u043b\u0438\u0448\u043d\u044f\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0435 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438.  <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/11f\/558\/d5f\/11f558d5f83a44e1d6bf7dba0ad4f56c.png\" width=\"686\" height=\"453\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/11f\/558\/d5f\/11f558d5f83a44e1d6bf7dba0ad4f56c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/11f\/558\/d5f\/11f558d5f83a44e1d6bf7dba0ad4f56c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0442\u0435\u043f\u0435\u0440\u044c, \u0447\u0442\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0435\u0434\u0438\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u043e\u0431\u0449\u0435\u043d\u0438\u044f &#8212;\u00a0<strong>MCP<\/strong>. \u0410\u0433\u0435\u043d\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0442\u0440\u0430\u0442\u0438\u0442 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u041e\u043d \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u044f\u0442\u0435\u043d \u0432\u0441\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0438.  <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/102\/a6d\/c0b\/102a6dc0b8d4514dc1fdf9e137605a99.png\" width=\"446\" height=\"360\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/102\/a6d\/c0b\/102a6dc0b8d4514dc1fdf9e137605a99.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/102\/a6d\/c0b\/102a6dc0b8d4514dc1fdf9e137605a99.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>MCP \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 <a href=\"https:\/\/t.me\/datafeeling\/1293\">\u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0443\u0440\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/a>: \u0432\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0435, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043b\u0435\u0442\u0435\u0442\u044c \u0432 \u041f\u0430\u0440\u0438\u0436 \u0441 \u043f\u0440\u043e\u0436\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 \u0433\u043e\u0440\u043e\u0434\u0430, \u0430 \u0442\u0443\u0440\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u0430\u043c \u0431\u0435\u0437 \u043b\u0438\u0448\u043d\u0438\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0431\u0440\u043e\u043d\u0438\u0440\u0443\u0435\u0442 \u0432\u0430\u043c \u0431\u0438\u043b\u0435\u0442\u044b, \u043e\u0442\u0435\u043b\u044c \u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0431\u0449\u0438\u0439 \u044f\u0437\u044b\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u0430\u043c\u0438 \u0443\u0441\u043b\u0443\u0433.<\/p>\n<h3>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430<\/h3>\n<p>\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b MCP \u0447\u0430\u0441\u0442\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442 \u0441 USB-C \u0437\u0430 \u0435\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0443\u043d\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/59f\/562\/b0b\/59f562b0b9ef0d6459649f7fa6d7c89b.png\" width=\"916\" height=\"512\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/59f\/562\/b0b\/59f562b0b9ef0d6459649f7fa6d7c89b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/59f\/562\/b0b\/59f562b0b9ef0d6459649f7fa6d7c89b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 MCP \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043a\u0430\u043a \u0441 \u043d\u0438\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 API, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u0438 \u0442\u0435\u043a\u0441\u0442 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0441\u0443\u0442\u043a\u0438. \u0417\u0430\u0442\u0435\u043c \u0440\u0435\u0448\u0438\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0443\u0434\u0438\u043e. \u0411\u0435\u0437 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u044b \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043f\u043e\u0442\u0435\u0440\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<p>\u041d\u043e \u0441 <strong>MCP <\/strong>\u0432\u0441\u0451 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435:  <\/p>\n<ul>\n<li>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 MCP.<\/p>\n<\/li>\n<li>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u0436\u0451\u0441\u0442\u043a\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u044b \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u0432\u043e\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043e\u0431\u043c\u0435\u043d\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0437\u043d\u0430\u0451\u0442, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0442\u0435\u043a\u0441\u0442, \u043d\u043e \u0438 \u0430\u0443\u0434\u0438\u043e\u0444\u0430\u0439\u043b\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c LLM \u043c\u043e\u0436\u0435\u0442 \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0451 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 \u043d\u043e\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 &#8212; \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0432\u0440\u0443\u0447\u043d\u0443\u044e.  <\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043a\u0440\u0430\u0442\u043a\u043e\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0440\u0430\u0431\u043e\u0442\u044b.<\/strong><\/p>\n<p><strong>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 MCP \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0440\u0451\u0445 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:  <\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u0425\u043e\u0441\u0442 (Host)<\/strong>: \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 LLM (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Claude Desktop, \u0432\u0430\u0448\u0430 IDE \u0438\u043b\u0438 Docker) .<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043b\u0438\u0435\u043d\u0442 (Client)<\/strong>: \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432 \u0445\u043e\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0441 MCP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0435\u0440\u0432\u0435\u0440 (Server)<\/strong>: \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b MCP.\u200b<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u044e \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<p><strong>\u0421\u0435\u0440\u0432\u0435\u0440\u044b MCP \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0442\u0440\u0438 \u0442\u0438\u043f\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u0430\u043c\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b (Tools)<\/strong>: \u0424\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 LLM \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, API-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438).<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0435\u0441\u0443\u0440\u0441\u044b (Resources)<\/strong>: \u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 (Prompts)<\/strong>: \u0428\u0430\u0431\u043b\u043e\u043d\u044b \u0438\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a LLM.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a22\/987\/255\/a2298725540b9788c76ee48796eee3e5.png\" width=\"708\" height=\"127\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/a22\/987\/255\/a2298725540b9788c76ee48796eee3e5.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a22\/987\/255\/a2298725540b9788c76ee48796eee3e5.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0413\u0438\u0444\u043a\u0430 \u043d\u0438\u0436\u0435 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u044d\u0442\u0443 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e!  <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/04c\/69c\/c67\/04c69cc6797c1bb21230f8ae83034e53.gif\" width=\"1030\" height=\"594\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/04c\/69c\/c67\/04c69cc6797c1bb21230f8ae83034e53.gif 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/04c\/69c\/c67\/04c69cc6797c1bb21230f8ae83034e53.gif 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b MCP <\/h3>\n<p>\u0421\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u0437 mcp \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438 LLM, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 LLM \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0441\u0432\u0435\u0436\u0435\u043d\u044c\u043a\u0443\u044e <code>qwen3:1.7b.<\/code><\/p>\n<p>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f:<\/p>\n<ul>\n<li>\n<p><strong>LLM<\/strong>:<strong> <\/strong>Qwen3 \u043d\u0430 1.7b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043b\u0438\u0435\u043d\u0442 MCP<\/strong>: \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 langchain_mcp_adapters.  <\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0435\u0440\u0432\u0435\u0440\u0430 MCP<\/strong>: \u043f\u0435\u0440\u0432\u044b\u0439 &#8212; \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e duckduckgo, \u0432\u0442\u043e\u0440\u043e\u0439 &#8212; \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438.  <\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">from mcp.server.fastmcp import FastMCP, Context import httpx from bs4 import BeautifulSoup from typing import List, Dict, Optional, Any from dataclasses import dataclass import urllib.parse import sys import traceback import asyncio from datetime import datetime, timedelta import time import re   @dataclass class SearchResult:     title: str     link: str     snippet: str     position: int   class RateLimiter:     def __init__(self, requests_per_minute: int = 30):         self.requests_per_minute = requests_per_minute         self.requests = []      async def acquire(self):         now = datetime.now()         # Remove requests older than 1 minute         self.requests = [             req for req in self.requests if now - req &lt; timedelta(minutes=1)         ]          if len(self.requests) &gt;= self.requests_per_minute:             # Wait until we can make another request             wait_time = 60 - (now - self.requests[0]).total_seconds()             if wait_time &gt; 0:                 await asyncio.sleep(wait_time)          self.requests.append(now)   class DuckDuckGoSearcher:     BASE_URL = \"https:\/\/html.duckduckgo.com\/html\"     HEADERS = {         \"User-Agent\": \"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/91.0.4472.124 Safari\/537.36\"     }      def __init__(self):         self.rate_limiter = RateLimiter()      def format_results_for_llm(self, results: List[SearchResult]) -&gt; str:         \"\"\"Format results in a natural language style that's easier for LLMs to process\"\"\"         if not results:             return \"No results were found for your search query. This could be due to DuckDuckGo's bot detection or the query returned no matches. Please try rephrasing your search or try again in a few minutes.\"          output = []         output.append(f\"Found {len(results)} search results:\\n\")          for result in results:             output.append(f\"{result.position}. {result.title}\")             output.append(f\"   URL: {result.link}\")             output.append(f\"   Summary: {result.snippet}\")             output.append(\"\")  # Empty line between results          return \"\\n\".join(output)      async def search(         self, query: str, ctx: Context, max_results: int = 10     ) -&gt; List[SearchResult]:         try:             await self.rate_limiter.acquire()              data = {                 \"q\": query,                 \"b\": \"\",                 \"kl\": \"\",             }              await ctx.info(f\"Searching DuckDuckGo for: {query}\")              async with httpx.AsyncClient() as client:                 response = await client.post(                     self.BASE_URL, data=data, headers=self.HEADERS, timeout=30.0                 )                 response.raise_for_status()              soup = BeautifulSoup(response.text, \"html.parser\")             if not soup:                 await ctx.error(\"Failed to parse HTML response\")                 return []              results = []             for result in soup.select(\".result\"):                 title_elem = result.select_one(\".result__title\")                 if not title_elem:                     continue                  link_elem = title_elem.find(\"a\")                 if not link_elem:                     continue                  title = link_elem.get_text(strip=True)                 link = link_elem.get(\"href\", \"\")                  # Skip ad results                 if \"y.js\" in link:                     continue                  # Clean up DuckDuckGo redirect URLs                 if link.startswith(\"\/\/duckduckgo.com\/l\/?uddg=\"):                     link = urllib.parse.unquote(link.split(\"uddg=\")[1].split(\"&amp;\")[0])                  snippet_elem = result.select_one(\".result__snippet\")                 snippet = snippet_elem.get_text(strip=True) if snippet_elem else \"\"                  results.append(                     SearchResult(                         title=title,                         link=link,                         snippet=snippet,                         position=len(results) + 1,                     )                 )                  if len(results) &gt;= max_results:                     break              await ctx.info(f\"Successfully found {len(results)} results\")             return results          except httpx.TimeoutException:             await ctx.error(\"Search request timed out\")             return []         except httpx.HTTPError as e:             await ctx.error(f\"HTTP error occurred: {str(e)}\")             return []         except Exception as e:             await ctx.error(f\"Unexpected error during search: {str(e)}\")             traceback.print_exc(file=sys.stderr)             return []   class WebContentFetcher:     def __init__(self):         self.rate_limiter = RateLimiter(requests_per_minute=20)      async def fetch_and_parse(self, url: str, ctx: Context) -&gt; str:         \"\"\"Fetch and parse content from a webpage\"\"\"         try:             await self.rate_limiter.acquire()              await ctx.info(f\"Fetching content from: {url}\")              async with httpx.AsyncClient() as client:                 response = await client.get(                     url,                     headers={                         \"User-Agent\": \"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36\"                     },                     follow_redirects=True,                     timeout=30.0,                 )                 response.raise_for_status()              # Parse the HTML             soup = BeautifulSoup(response.text, \"html.parser\")              # Remove script and style elements             for element in soup([\"script\", \"style\", \"nav\", \"header\", \"footer\"]):                 element.decompose()              # Get the text content             text = soup.get_text()              # Clean up the text             lines = (line.strip() for line in text.splitlines())             chunks = (phrase.strip() for line in lines for phrase in line.split(\"  \"))             text = \" \".join(chunk for chunk in chunks if chunk)              # Remove extra whitespace             text = re.sub(r\"\\s+\", \" \", text).strip()              # Truncate if too long             if len(text) &gt; 8000:                 text = text[:8000] + \"... [content truncated]\"              await ctx.info(                 f\"Successfully fetched and parsed content ({len(text)} characters)\"             )             return text          except httpx.TimeoutException:             await ctx.error(f\"Request timed out for URL: {url}\")             return \"Error: The request timed out while trying to fetch the webpage.\"         except httpx.HTTPError as e:             await ctx.error(f\"HTTP error occurred while fetching {url}: {str(e)}\")             return f\"Error: Could not access the webpage ({str(e)})\"         except Exception as e:             await ctx.error(f\"Error fetching content from {url}: {str(e)}\")             return f\"Error: An unexpected error occurred while fetching the webpage ({str(e)})\"   # Initialize FastMCP server mcp = FastMCP(\"ddg-search\") searcher = DuckDuckGoSearcher() fetcher = WebContentFetcher()   @mcp.tool() async def search(query: str, ctx: Context, max_results: int = 10) -&gt; str:     \"\"\"     Search DuckDuckGo and return formatted results.      Args:         query: The search query string         max_results: Maximum number of results to return (default: 10)         ctx: MCP context for logging     \"\"\"     try:         results = await searcher.search(query, ctx, max_results)         return searcher.format_results_for_llm(results)     except Exception as e:         traceback.print_exc(file=sys.stderr)         return f\"An error occurred while searching: {str(e)}\"   @mcp.tool() async def fetch_content(url: str, ctx: Context) -&gt; str:     \"\"\"     Fetch and parse content from a webpage URL.      Args:         url: The webpage URL to fetch content from         ctx: MCP context for logging     \"\"\"     return await fetcher.fetch_and_parse(url, ctx)   def main():     mcp.run()   if __name__ == \"__main__\":     main()<\/code><\/pre>\n<p><strong>\u041a\u043e\u0434 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 mcp duckduckgo<\/strong><\/p>\n<pre><code class=\"python\">import os from mcp.server.fastmcp import FastMCP from core.cfg import CFG  mcp = FastMCP(\"FileTools\")  BASE_DIR = CFG.BASE_DIR  os.makedirs(BASE_DIR, exist_ok=True)  @mcp.tool() def create_folder(folder_name: str) -&gt; str:     \"\"\"\u0421\u043e\u0437\u0434\u0430\u0451\u0442 \u043f\u0430\u043f\u043a\u0443 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438.\"\"\"     folder_path = os.path.join(BASE_DIR, folder_name)     try:         os.makedirs(folder_path, exist_ok=True)         return f\"\u041f\u0430\u043f\u043a\u0430 '{folder_name}' \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0430.\"     except Exception as e:         return f\"\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u0430\u043f\u043a\u0438: {e}\"  @mcp.tool() def create_text_file(file_name: str, content: str) -&gt; str:     \"\"\"\u0421\u043e\u0437\u0434\u0430\u0451\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438.\"\"\"     file_path = os.path.join(BASE_DIR, file_name)     try:         with open(file_path, 'w', encoding='utf-8') as file:             file.write(content)         return f\"\u0424\u0430\u0439\u043b '{file_name}' \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d.\"     except Exception as e:         return f\"\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u0430: {e}\"  if __name__ == \"__main__\":     mcp.run(transport=\"stdio\") <\/code><\/pre>\n<p><strong>\u041a\u043e\u0434 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 mcp \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438<\/strong><\/p>\n<pre><code class=\"python\">import asyncio import os from langchain_mcp_adapters.client import MultiServerMCPClient from langchain_mcp_adapters.tools import load_mcp_tools from langgraph.prebuilt import create_react_agent from langchain_ollama import ChatOllama  model = ChatOllama(model=\"qwen3:1.7b\")  async def main():     project_root = os.path.dirname(os.path.abspath(__file__))          async with MultiServerMCPClient({         \"search\": {             \"command\": \"python\",             \"args\": [\".\/mcp_server\/search_sever_duckduck_go.py\"],             \"transport\": \"stdio\",             \"env\": {\"PYTHONPATH\": project_root}         },         \"files\": {             \"command\": \"python\",             \"args\": [\".\/mcp_server\/server_2.py\"],             \"transport\": \"stdio\",             \"env\": {\"PYTHONPATH\": project_root}         }     }) as client:         search_session = client.sessions[\"search\"]         files_session = client.sessions[\"files\"]          search_tools = await load_mcp_tools(search_session)         files_tools = await load_mcp_tools(files_session)          agent = create_react_agent(model, search_tools + files_tools)          print(\"\u0418\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0447\u0430\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d. \u041d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 'exit' \u0434\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430.\\n\")          while True:             user_input = input(\"\u0412\u044b: \").strip()             if user_input.lower() in {\"exit\", \"quit\"}:                 print(\"\u0412\u044b\u0445\u043e\u0434 \u0438\u0437 \u0447\u0430\u0442\u0430.\")                 break              try:                 res = await agent.ainvoke({\"messages\": user_input})                 for m in res['messages']:                     print(\"\u0410\u0433\u0435\u043d\u0442:\", m.content)             except Exception as e:                 print(f\"\u041e\u0448\u0438\u0431\u043a\u0430: {e}\")  if __name__ == \"__main__\":     asyncio.run(main()) <\/code><\/pre>\n<p>\u041a\u043e\u0434 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 mcp \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e mcp \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430 mcp, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043e\u0431\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0430\u0433\u0435\u043d\u0442\u043e\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>load_mcp_tools<\/code>   \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c Reasoning and Acting \u0430\u0433\u0435\u043d\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>create_react_agent<\/code>.<\/p>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u043a\u043e\u0434 \u0432\u0440\u043e\u0434\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438, \u043d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u0436\u0435 \u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043d\u0430 \u043c\u0438\u043d\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0435.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435: <\/p>\n<blockquote>\n<p>find brief information about mcp capabilities and do it in the reports mcp_res.txt folder  <\/p>\n<\/blockquote>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0430\u0443\u0437\u044b \u0430\u0433\u0435\u043d\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0438 \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f: \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442!  <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cb1\/583\/84d\/cb158384dce8dde2325111c694a9fd75.png\" width=\"692\" height=\"66\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/cb1\/583\/84d\/cb158384dce8dde2325111c694a9fd75.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cb1\/583\/84d\/cb158384dce8dde2325111c694a9fd75.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bb4\/21d\/b9a\/bb421db9ac5842e08f426bdd6ccbd504.png\" width=\"1160\" height=\"184\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/bb4\/21d\/b9a\/bb421db9ac5842e08f426bdd6ccbd504.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bb4\/21d\/b9a\/bb421db9ac5842e08f426bdd6ccbd504.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b32\/806\/538\/b32806538f41a4f55e00bb79b237d273.png\" width=\"1423\" height=\"317\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/b32\/806\/538\/b32806538f41a4f55e00bb79b237d273.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b32\/806\/538\/b32806538f41a4f55e00bb79b237d273.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u042d\u0442\u043e \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0437\u0430 \u043f\u0430\u0440\u0443 \u0448\u0430\u0433\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c <strong>\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e <\/strong>\u043c\u043e\u0434\u0435\u043b\u044c, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0443\u044e \u0441 \u0432\u0430\u0448\u0438\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u043c. \u0422\u0430\u043a\u0436\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u043c \u043e\u043a\u043d\u043e\u043c \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0438\u0445 \u0444\u0438\u0447\u0435\u0439.<\/p>\n<p>\u0412\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 &#8212;  \u0441\u043a\u043e\u0440\u0435\u0435 \u0434\u043b\u044f \u0438\u0433\u0440\u044b \u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432. <a href=\"https:\/\/t.me\/datafeeling\/1323\">\u0412 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u044b \u0438 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u044b<\/a>, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 MCP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u043d\u043e\u0432\u0430\u044f \u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0435\u0449\u0451 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f.  <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5a4\/92d\/389\/5a492d389916383e099ee9f0f69bd13e.png\" width=\"905\" height=\"608\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/5a4\/92d\/389\/5a492d389916383e099ee9f0f69bd13e.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5a4\/92d\/389\/5a492d389916383e099ee9f0f69bd13e.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 MCP &#8212;  \u044d\u0442\u043e \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u0439 \u0448\u0430\u0433 \u0432 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0449\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u0431\u0430\u0432\u044f\u0442 \u0432\u0430\u0441 \u043e\u0442 \u0440\u0443\u0442\u0438\u043d\u044b. \u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u0435\u0441\u044c, \u043f\u0440\u0438\u044f\u0442\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043a\u0442\u043e-\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0437\u0430 \u0432\u0430\u0441 \u0441\u043a\u0443\u0447\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438?  <\/p>\n<p><a href=\"https:\/\/emojigraph.org\/ru\/fire\/\">\ud83d\udd25<\/a>\u00a0\u0421\u0442\u0430\u0432\u044c\u0442\u0435 \u043b\u0430\u0439\u043a \u0438 \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u0430\u043a\u0438\u0435 \u0442\u0435\u043c\u044b \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435! \u0421\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 &#8212;  \u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435!<\/p>\n<p><a href=\"https:\/\/emojigraph.org\/ru\/check-mark\/\">\u2714\ufe0f<\/a>\u00a0\u041f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u043a \u043d\u0430\u0448\u0435\u043c\u0443 Telegram-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0443\u00a0<a href=\"https:\/\/t.me\/+w0V_HEhKSkIyMTYy\">@datafeeling<\/a>, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0432\u044b\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043f\u0435\u0440\u0435\u0434\u043e\u0432\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/907448\/\"> https:\/\/habr.com\/ru\/articles\/907448\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0447\u0435\u043c\u043f\u0438\u043e\u043d\u044b!<br \/>\u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u0438\u0440 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0430\u043b \u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 (LLM). \u0412\u0441\u043a\u043e\u0440\u0435 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0438\u0445 \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 &#8212; \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u0432\u043a\u0443\u0441 \u0438 \u0446\u0432\u0435\u0442, \u043e\u0442 \u0443\u0437\u043a\u043e\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u0417\u0430\u0442\u0435\u043c \u043d\u0430\u0447\u0430\u043b\u0430\u0441\u044c \u0432\u043e\u043b\u043d\u0430 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0439: LLM \u043d\u0430\u0447\u0430\u043b\u0438 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 API, \u0443\u043f\u0440\u043e\u0449\u0430\u044f \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u044f \u0440\u0443\u0442\u0438\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u044d\u0442\u0430\u043f\u043e\u043c \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 LLM-\u0430\u0433\u0435\u043d\u0442\u043e\u0432 &#8212; \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0445 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044f \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438. \u0412\u043c\u0435\u0441\u0442\u0435 \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u0438\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043d\u043e\u0432\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 &#8212; \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438 \u0438 \u0438\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>\u0418 \u0432\u043e\u0442, \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Anthropic \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 &#8212; \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u00a0<strong>Model Context Protocol (MCP)<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 \u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 MCP, \u0438 \u0441 \u0447\u0435\u043c \u0435\u0433\u043e \u0435\u0434\u044f\u0442!  <\/p>\n<h2>MCP \u0438\u043b\u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u043c \u043d\u0430 \u043f\u0430\u043b\u044c\u0446\u0430\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 LLM \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043c\u0438\u0440\u043e\u043c<\/h2>\n<p>\u0415\u0449\u0451 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043a\u0430\u0436\u0434\u044b\u0439 AI-\u0430\u0433\u0435\u043d\u0442 \u0431\u044b\u043b \u043a\u0430\u043a \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u0443\u0440\u0438\u0441\u0442: \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u0430\u0437\u0430\u0442\u044c \u0431\u0438\u043b\u0435\u0442, \u043d\u0430\u0439\u0442\u0438 \u043e\u0442\u0435\u043b\u044c \u0438\u043b\u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u0435\u0440, \u0435\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c. \u041e\u0434\u0438\u043d API \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b \u043e\u0434\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430, \u0434\u0440\u0443\u0433\u043e\u0439 &#8212; \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0434\u0440\u0443\u0433\u043e\u0435. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 &#8212; \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0439, \u043b\u0438\u0448\u043d\u044f\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0435 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438.  <\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0442\u0435\u043f\u0435\u0440\u044c, \u0447\u0442\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0435\u0434\u0438\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u043e\u0431\u0449\u0435\u043d\u0438\u044f &#8212;\u00a0<strong>MCP<\/strong>. \u0410\u0433\u0435\u043d\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0442\u0440\u0430\u0442\u0438\u0442 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u041e\u043d \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u044f\u0442\u0435\u043d \u0432\u0441\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0438.  <\/p>\n<figure class=\"\"><\/figure>\n<p>MCP \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 <a href=\"https:\/\/t.me\/datafeeling\/1293\">\u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0443\u0440\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/a>: \u0432\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0435, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043b\u0435\u0442\u0435\u0442\u044c \u0432 \u041f\u0430\u0440\u0438\u0436 \u0441 \u043f\u0440\u043e\u0436\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 \u0433\u043e\u0440\u043e\u0434\u0430, \u0430 \u0442\u0443\u0440\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u0430\u043c \u0431\u0435\u0437 \u043b\u0438\u0448\u043d\u0438\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0431\u0440\u043e\u043d\u0438\u0440\u0443\u0435\u0442 \u0432\u0430\u043c \u0431\u0438\u043b\u0435\u0442\u044b, \u043e\u0442\u0435\u043b\u044c \u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0431\u0449\u0438\u0439 \u044f\u0437\u044b\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u0430\u043c\u0438 \u0443\u0441\u043b\u0443\u0433.<\/p>\n<h3>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430<\/h3>\n<p>\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b MCP \u0447\u0430\u0441\u0442\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442 \u0441 USB-C \u0437\u0430 \u0435\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0443\u043d\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 MCP \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043a\u0430\u043a \u0441 \u043d\u0438\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 API, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u0438 \u0442\u0435\u043a\u0441\u0442 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0441\u0443\u0442\u043a\u0438. \u0417\u0430\u0442\u0435\u043c \u0440\u0435\u0448\u0438\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0443\u0434\u0438\u043e. \u0411\u0435\u0437 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u044b \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043f\u043e\u0442\u0435\u0440\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<p>\u041d\u043e \u0441 <strong>MCP <\/strong>\u0432\u0441\u0451 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435:  <\/p>\n<ul>\n<li>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 MCP.<\/p>\n<\/li>\n<li>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u0436\u0451\u0441\u0442\u043a\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u044b \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u0432\u043e\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043e\u0431\u043c\u0435\u043d\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0437\u043d\u0430\u0451\u0442, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0442\u0435\u043a\u0441\u0442, \u043d\u043e \u0438 \u0430\u0443\u0434\u0438\u043e\u0444\u0430\u0439\u043b\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c LLM \u043c\u043e\u0436\u0435\u0442 \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0451 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 \u043d\u043e\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 &#8212; \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0432\u0440\u0443\u0447\u043d\u0443\u044e.  <\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043a\u0440\u0430\u0442\u043a\u043e\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0440\u0430\u0431\u043e\u0442\u044b.<\/strong><\/p>\n<p><strong>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 MCP \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0440\u0451\u0445 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:  <\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u0425\u043e\u0441\u0442 (Host)<\/strong>: \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 LLM (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Claude Desktop, \u0432\u0430\u0448\u0430 IDE \u0438\u043b\u0438 Docker) .<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043b\u0438\u0435\u043d\u0442 (Client)<\/strong>: \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432 \u0445\u043e\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0441 MCP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0435\u0440\u0432\u0435\u0440 (Server)<\/strong>: \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b MCP.\u200b<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u044e \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<p><strong>\u0421\u0435\u0440\u0432\u0435\u0440\u044b MCP \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0442\u0440\u0438 \u0442\u0438\u043f\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u0430\u043c\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b (Tools)<\/strong>: \u0424\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 LLM \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, API-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438).<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0435\u0441\u0443\u0440\u0441\u044b (Resources)<\/strong>: \u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 (Prompts)<\/strong>: \u0428\u0430\u0431\u043b\u043e\u043d\u044b \u0438\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a LLM.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><\/figure>\n<p>\u0413\u0438\u0444\u043a\u0430 \u043d\u0438\u0436\u0435 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u044d\u0442\u0443 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e!  <\/p>\n<figure class=\"full-width\"><\/figure>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b MCP <\/h3>\n<p>\u0421\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u0437 mcp \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438 LLM, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 LLM \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0441\u0432\u0435\u0436\u0435\u043d\u044c\u043a\u0443\u044e <code>qwen3:1.7b.<\/code><\/p>\n<p>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f:<\/p>\n<ul>\n<li>\n<p><strong>LLM<\/strong>:<strong> <\/strong>Qwen3 \u043d\u0430 1.7b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043b\u0438\u0435\u043d\u0442 MCP<\/strong>: \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 langchain_mcp_adapters.  <\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0435\u0440\u0432\u0435\u0440\u0430 MCP<\/strong>: \u043f\u0435\u0440\u0432\u044b\u0439 &#8212; \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e duckduckgo, \u0432\u0442\u043e\u0440\u043e\u0439 &#8212; \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438.  <\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">from mcp.server.fastmcp import FastMCP, Context import httpx from bs4 import BeautifulSoup from typing import List, Dict, Optional, Any from dataclasses import dataclass import urllib.parse import sys import traceback import asyncio from datetime import datetime, timedelta import time import re   @dataclass class SearchResult:     title: str     link: str     snippet: str     position: int   class RateLimiter:     def __init__(self, requests_per_minute: int = 30):         self.requests_per_minute = requests_per_minute         self.requests = []      async def acquire(self):         now = datetime.now()         # Remove requests older than 1 minute         self.requests = [             req for req in self.requests if now - req &lt; timedelta(minutes=1)         ]          if len(self.requests) &gt;= self.requests_per_minute:             # Wait until we can make another request             wait_time = 60 - (now - self.requests[0]).total_seconds()             if wait_time &gt; 0:                 await asyncio.sleep(wait_time)          self.requests.append(now)   class DuckDuckGoSearcher:     BASE_URL = \"https:\/\/html.duckduckgo.com\/html\"     HEADERS = {         \"User-Agent\": \"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/91.0.4472.124 Safari\/537.36\"     }      def __init__(self):         self.rate_limiter = RateLimiter()      def format_results_for_llm(self, results: List[SearchResult]) -&gt; str:         \"\"\"Format results in a natural language style that's easier for LLMs to process\"\"\"         if not results:             return \"No results were found for your search query. This could be due to DuckDuckGo's bot detection or the query returned no matches. Please try rephrasing your search or try again in a few minutes.\"          output = []         output.append(f\"Found {len(results)} search results:\\n\")          for result in results:             output.append(f\"{result.position}. {result.title}\")             output.append(f\"   URL: {result.link}\")             output.append(f\"   Summary: {result.snippet}\")             output.append(\"\")  # Empty line between results          return \"\\n\".join(output)      async def search(         self, query: str, ctx: Context, max_results: int = 10     ) -&gt; List[SearchResult]:         try:             await self.rate_limiter.acquire()              data = {                 \"q\": query,                 \"b\": \"\",                 \"kl\": \"\",             }              await ctx.info(f\"Searching DuckDuckGo for: {query}\")              async with httpx.AsyncClient() as client:                 response = await client.post(                     self.BASE_URL, data=data, headers=self.HEADERS, timeout=30.0                 )                 response.raise_for_status()              soup = BeautifulSoup(response.text, \"html.parser\")             if not soup:                 await ctx.error(\"Failed to parse HTML response\")                 return []              results = []             for result in soup.select(\".result\"):                 title_elem = result.select_one(\".result__title\")                 if not title_elem:                     continue                  link_elem = title_elem.find(\"a\")                 if not link_elem:                     continue                  title = link_elem.get_text(strip=True)                 link = link_elem.get(\"href\", \"\")                  # Skip ad results                 if \"y.js\" in link:                     continue                  # Clean up DuckDuckGo redirect URLs                 if link.startswith(\"\/\/duckduckgo.com\/l\/?uddg=\"):                     link = urllib.parse.unquote(link.split(\"uddg=\")[1].split(\"&amp;\")[0])                  snippet_elem = result.select_one(\".result__snippet\")                 snippet = snippet_elem.get_text(strip=True) if snippet_elem else \"\"                  results.append(                     SearchResult(                         title=title,                         link=link,                         snippet=snippet,                         position=len(results) + 1,                     )                 )                  if len(results) &gt;= max_results:                     break              await ctx.info(f\"Successfully found {len(results)} results\")             return results          except httpx.TimeoutException:             await ctx.error(\"Search request timed out\")             return []         except httpx.HTTPError as e:             await ctx.error(f\"HTTP error occurred: {str(e)}\")             return []         except Exception as e:             await ctx.error(f\"Unexpected error during search: {str(e)}\")             traceback.print_exc(file=sys.stderr)             return []   class WebContentFetcher:     def __init__(self):         self.rate_limiter = RateLimiter(requests_per_minute=20)      async def fetch_and_parse(self, url: str, ctx: Context) -&gt; str:         \"\"\"Fetch and parse content from a webpage\"\"\"         try:             await self.rate_limiter.acquire()              await ctx.info(f\"Fetching content from: {url}\")              async with httpx.AsyncClient() as client:                 response = await client.get(                     url,                     headers={                         \"User-Agent\": \"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36\"                     },                     follow_redirects=True,                     timeout=30.0,                 )                 response.raise_for_status()              # Parse the HTML             soup = BeautifulSoup(response.text, \"html.parser\")              # Remove script and style elements             for element in soup([\"script\", \"style\", \"nav\", \"header\", \"footer\"]):                 element.decompose()              # Get<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-459419","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/459419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=459419"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/459419\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=459419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=459419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=459419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}