{"id":460685,"date":"2025-05-23T03:03:37","date_gmt":"2025-05-23T03:03:37","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=460685"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=460685","title":{"rendered":"<span>Lasso MCP Gateway: \u0449\u0438\u0442 \u043c\u0435\u0436\u0434\u0443 AI-\u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438, \u0442\u0443\u043b\u0430\u043c\u0438 \u0438 \u0432\u0430\u0448\u0438\u043c\u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u0430\u043c\u0438?<\/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<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0421 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435\u043c AI-\u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u0438 Model Context Protocol (MCP) \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438. \u0427\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u0430\u0448 AI-\u0430\u0433\u0435\u043d\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438 &#171;\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e&#187; \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0441\u044f \u0438\u043c\u0438 \u0441 \u0432\u0430\u043c\u0438 \u0432 \u0441\u0432\u043e\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u0435, \u0430 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0430\u0448\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043e\u043d \u0442\u043e\u0447\u043d\u043e \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u0430\u0433\u0435\u043d\u0442\u0430, \u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0435 \u0438 IDE, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044d\u0442\u043e\u0442 \u0430\u0433\u0435\u043d\u0442 \u0438 \u043e\u0431\u0438\u0442\u0430\u0435\u0442, \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0440\u044f\u0434 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>\u042f\u0440\u043a\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0442\u0443\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0432\u0430\u0448\u0438\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/modelcontextprotocol\/servers\/tree\/main\/src\/filesystem\">mcp-filesystem<\/a>. \u041e\u0434\u0438\u043d \u0448\u0430\u0433 \u043d\u0435 \u0442\u0443\u0434\u0430 \u0438 \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0431\u0435\u0436\u0430\u0442\u044c \u0437\u0430 \u0440\u0435\u0432\u043e\u043a\u043e\u043c \u0442\u043e\u043a\u0435\u043d\u0430, \u0430 \u0435\u0441\u043b\u0438 \u043e\u043d \u0435\u0449\u0435 \u0438 \u043e\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438, \u0432\u0430\u0448\u0438 \u0430\u0434\u043c\u0438\u043d\u044b \u044f\u0432\u043d\u043e \u043d\u0435 \u0441\u043a\u0430\u0436\u0443\u0442 \u0432\u0430\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e.<\/p>\n<p>\u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e \u0442\u043e, \u043a\u0430\u043a \u0443 XAI \u0442\u043e\u043a\u0435\u043d \u043f\u0440\u043e\u0441\u0442\u043e \u043b\u0435\u0436\u0430\u043b \u043d\u0430 github \u043f\u0430\u0440\u0443 \u043c\u0435\u0441\u044f\u0446\u0435\u0432: <a href=\"https:\/\/habr.com\/ru\/news\/907198\/\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a> <\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u0430 Lasso Security \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 <a href=\"https:\/\/github.com\/lasso-security\/mcp-gateway\">MCP Gateway<\/a> \u2014 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0442\u0430\u0435\u0442 \u043c\u0435\u0436\u0434\u0443 AI-\u0430\u0433\u0435\u043d\u0442\u043e\u043c \u0438 MCP-\u0442\u0443\u043b\u0430\u043c\u0438, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u0441\u0430\u043d\u0438\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Lasso MCP Gateway \u0432 \u0434\u0432\u0443\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445: \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 Cursor IDE \u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0430\u0433\u0435\u043d\u0442\u043e\u043c \u043d\u0430 PydanticAI.<\/p>\n<h2>\u0427\u0442\u043e \u0443\u043c\u0435\u0435\u0442 Lasso MCP Gateway <\/h2>\n<p>1) \u041f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u044b\u0437\u043e\u0432\u044b \u0432\u0441\u0435\u0445 MCP-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u0434 \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c<br \/>2) \u041c\u0430\u0441\u043a\u0438\u0440\u0443\u0435\u0442 \u0432 <code>basic<\/code> \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 (\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439): <\/p>\n<ul>\n<li>\n<p>azure client secret<\/p>\n<\/li>\n<li>\n<p>github tokens<\/p>\n<\/li>\n<li>\n<p>github oauth<\/p>\n<\/li>\n<li>\n<p>gcp api key<\/p>\n<\/li>\n<li>\n<p>aws access token<\/p>\n<\/li>\n<li>\n<p>jwt token<\/p>\n<\/li>\n<li>\n<p>gitlab session cookie<\/p>\n<\/li>\n<li>\n<p>huggingface access token<\/p>\n<\/li>\n<li>\n<p>microsoft teams webhook<\/p>\n<\/li>\n<li>\n<p>slack app token\\<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 presidio \u0438 \u0441\u0430\u043c\u0438\u043c lasso. \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u044b \u0447\u0435\u0440\u0435\u0437 <code>xetrack<\/code><\/p>\n<h2>\u041e\u0431\u0449\u0438\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b<\/h2>\n<p>\u0418\u0434\u0435\u044f MCP-gateway \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u043a\u0438\u043c \u043f\u0440\u043e\u043a\u0441\u0438 \u043c\u0435\u0436\u0434\u0443 \u0430\u0433\u0435\u043d\u0442\u043e\u043c \u0438 \u0442\u0443\u043b\u0430\u043c\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u043e\u043d \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 MCP \u0442\u0443\u043b, \u0430 \u043a\u0430\u043a MCP-\u0442\u0443\u043b, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0443\u043b\u044b. \u0422\u043e \u0435\u0441\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0432\u044b\u0437\u043e\u0432 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043f\u043e \u0442\u0438\u043f\u0443\u00a0<code>read_file<\/code> <code>create_file<\/code> \u0438 \u0442\u0434 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a <code>mcp-gateway<\/code> \u0434\u0430\u043b \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0435 \u043e\u0434\u043e\u0431\u0440\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u043b \u0441\u0430\u043d\u0438\u0442\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0fc\/63b\/cc9\/0fc63bcc93a7160207bb5972ffc5412e.png\" alt=\"\u0441\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043d\u0430 github\" title=\"\u0441\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043d\u0430 github\" width=\"1191\" height=\"733\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/0fc\/63b\/cc9\/0fc63bcc93a7160207bb5972ffc5412e.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0fc\/63b\/cc9\/0fc63bcc93a7160207bb5972ffc5412e.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0441\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043d\u0430 github<\/figcaption><\/div>\n<\/figure>\n<h2>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b<\/h2>\n<h3>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 Cursor <\/h3>\n<p><strong>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/strong> \u0421\u043b\u0435\u0434\u0443\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0438\u0437 <a href=\"http:\/\/readme.md\"><code>readme.md<\/code><\/a> \u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b <code>mcp-gateway<\/code> \u043a <code>cursor<\/code>, \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043f\u0443\u0442\u044c \u043a \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0447\u0435\u0440\u0435\u0437 <code>xetrack<\/code>. \u041a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442:<\/p>\n<pre><code class=\"json\">{   \"mcpServers\": {     \"mcp-gateway\": {       \"command\": \"uvx\",       \"args\": [         \"mcp-gateway\",         \"--mcp-json-path\",         \"\/home\/user\/.cursor\/mcp.json\",         \"--plugin\",         \"basic\",         \"--plugin\",          \"xetrack\"       ],       \"env\": {         \"XETRACK_LOGS_PATH\": \"logs\/\",         \"XETRACK_DB_PATH\": \"tracing.db\"       },       \"servers\": {         \"filesystem\": {           \"command\": \"npx\",           \"args\": [             \"-y\",             \"@modelcontextprotocol\/server-filesystem\",             \".\"           ]         }       }     }   } }<\/code><\/pre>\n<h4>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 1: \u0427\u0442\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0441 HuggingFace \u0442\u043e\u043a\u0435\u043d\u043e\u043c<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u043b \u0444\u0430\u0439\u043b<\/p>\n<pre><code class=\"bash\">echo 'HF_TOKEN = \"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\"' &gt; tokens.txt<\/code><\/pre>\n<p>\u0432 \u043d\u0435\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432\u044b\u0434\u0443\u043c\u0430\u043d\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u0438\u0437 Huggingface<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044f \u0441\u043d\u043e\u0432\u0430 \u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0438\u0437 <a href=\"http:\/\/readme.md\"><code>readme.md<\/code><\/a> \u043f\u0438\u0448\u0443 \u0437\u0430\u043f\u0440\u043e\u0441<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a96\/5ed\/cae\/a965edcaef42f330f6a7e96513f522e4.png\" alt=\"\u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u0441\u0430\u043c\u043e\u043c \u0432\u0435\u0440\u0445\u0443\" title=\"\u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u0441\u0430\u043c\u043e\u043c \u0432\u0435\u0440\u0445\u0443\" width=\"1953\" height=\"1086\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/a96\/5ed\/cae\/a965edcaef42f330f6a7e96513f522e4.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a96\/5ed\/cae\/a965edcaef42f330f6a7e96513f522e4.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u0441\u0430\u043c\u043e\u043c \u0432\u0435\u0440\u0445\u0443<\/figcaption><\/div>\n<\/figure>\n<p>Cursor \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0443\u0436\u0435 \u043e\u0447\u0438\u0449\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0438 \u0432\u0435\u0440\u043d\u0443\u043b \u043c\u043d\u0435 <code>&lt;HUGGINGFACE_TOKEN&gt;<\/code>.<\/p>\n<p><strong>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/strong>:<\/p>\n<p>\u0432 \u0442\u0443\u043b\u0443 \u043f\u0435\u0440\u0435\u0434\u0430\u043b\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440:<\/p>\n<pre><code class=\"json\">{   \"path\": \"~\/lasso-mcp\/sts\/tokens.txt\"   }<\/code><\/pre>\n<p>\u0432\u043d\u0443\u0442\u0440\u0438 <code>tokens.txt<\/code> \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043c\u043e\u0439 \u0432\u044b\u0434\u0443\u043c\u0430\u043d\u043d\u044b\u0439 hf token<\/p>\n<p>\u0442\u0443\u043b\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u043b\u0430 \u043e\u0447\u0438\u0441\u0442\u043a\u0443:<\/p>\n<pre><code class=\"json\">{ \"_meta\": null, \"content\": [ { \"type\": \"text\", \"text\": \"HF_TOKEN = \\\"&lt;HUGGINGFACE_TOKEN&gt;\\n\", \"annotations\": null } ], \"isError\": false } <\/code><\/pre>\n<p>\u0437\u0430\u0442\u0435\u043c \u0442\u0443\u043b\u0430 \u0432\u0435\u0440\u043d\u0443\u043b\u0430 \u0440\u0435\u0441\u043f\u0430\u043d\u0441 cursor \u0430\u0433\u0435\u043d\u0442\u0443 \u0438 \u043e\u043d \u0432\u0435\u0440\u043d\u0443\u043b \u043e\u0447\u0438\u0449\u0435\u043d\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d:<\/p>\n<pre><code class=\"dart\">&lt;HUGGINGFACE_TOKEN&gt;<\/code><\/pre>\n<h4>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 2: \u041e\u0431\u0445\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0430\u0433\u0435\u043d\u0442\u0430<\/h4>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043d\u044e\u0430\u043d\u0441: \u043a\u043e\u0433\u0434\u0430 \u044f \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b \u0430\u0433\u0435\u043d\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0441 \u043a\u043e\u0434\u043e\u043c, \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u0442\u043e\u043a\u0435\u043d \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0447\u0430\u0442\u0435, MCP Gateway \u043d\u0435 \u0441\u043c\u043e\u0433 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e. \u0421\u0430\u043d\u0438\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u043e\u0432, \u043d\u043e \u043d\u0435 \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438\/\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043c\u043e\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 <br \/>(\u0447\u0442\u043e \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0438 \u043d\u0435 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e).<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c12\/670\/f70\/c12670f7065935ca3bf0390d349a12f3.png\" alt=\"\u043f\u0438\u0448\u0435\u043c \u044f\u0432\u043d\u043e \u043d\u0430\u0448 \u043a\u043b\u044e\u0447 \u0432 \u0434\u0438\u0430\u043b\u043e\u0433\u0435\" title=\"\u043f\u0438\u0448\u0435\u043c \u044f\u0432\u043d\u043e \u043d\u0430\u0448 \u043a\u043b\u044e\u0447 \u0432 \u0434\u0438\u0430\u043b\u043e\u0433\u0435\" width=\"2493\" height=\"677\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c12\/670\/f70\/c12670f7065935ca3bf0390d349a12f3.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c12\/670\/f70\/c12670f7065935ca3bf0390d349a12f3.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u043f\u0438\u0448\u0435\u043c \u044f\u0432\u043d\u043e \u043d\u0430\u0448 \u043a\u043b\u044e\u0447 \u0432 \u0434\u0438\u0430\u043b\u043e\u0433\u0435<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c8d\/943\/af5\/c8d943af5899af8fd73bca2b629e5482.png\" alt=\"Cursor \u0441\u043e\u0437\u0434\u0430\u043b \u0444\u0430\u0439\u043b \u0438 \u044f\u0432\u043d\u043e \u0432\u043f\u0438\u0441\u0430\u043b \u0442\u0443\u0434\u0430 \u043c\u043e\u0439 \u0442\u043e\u043a\u0435\u043d\" title=\"Cursor \u0441\u043e\u0437\u0434\u0430\u043b \u0444\u0430\u0439\u043b \u0438 \u044f\u0432\u043d\u043e \u0432\u043f\u0438\u0441\u0430\u043b \u0442\u0443\u0434\u0430 \u043c\u043e\u0439 \u0442\u043e\u043a\u0435\u043d\" width=\"1475\" height=\"631\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c8d\/943\/af5\/c8d943af5899af8fd73bca2b629e5482.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c8d\/943\/af5\/c8d943af5899af8fd73bca2b629e5482.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Cursor \u0441\u043e\u0437\u0434\u0430\u043b \u0444\u0430\u0439\u043b \u0438 \u044f\u0432\u043d\u043e \u0432\u043f\u0438\u0441\u0430\u043b \u0442\u0443\u0434\u0430 \u043c\u043e\u0439 \u0442\u043e\u043a\u0435\u043d<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u043e\u0433\u0434\u0430 \u044f \u043f\u043e\u0437\u0436\u0435 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, MCP Gateway \u0441\u043d\u043e\u0432\u0430 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e. \u041e\u0434\u043d\u0430\u043a\u043e Cursor &#171;\u043f\u043e\u043c\u043d\u0438\u043b&#187; \u043e \u0442\u043e\u043a\u0435\u043d\u0435 \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0431\u0435\u0441\u0435\u0434\u044b \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u043b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0432\u0435\u0440\u043d\u0443\u0432 \u043c\u043e\u0439 \u0442\u043e\u043a\u0435\u043d \u043c\u043d\u0435 \u0436\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d74\/828\/310\/d74828310c8549e32431ce72bd6682f2.png\" alt=\"\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b \u0444\u0430\u0439\u043b\" title=\"\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b \u0444\u0430\u0439\u043b\" width=\"2459\" height=\"674\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/d74\/828\/310\/d74828310c8549e32431ce72bd6682f2.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d74\/828\/310\/d74828310c8549e32431ce72bd6682f2.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b \u0444\u0430\u0439\u043b<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/380\/c49\/4ff\/380c494ff97650591357b5d7b5154e9b.png\" alt=\"MCP-Gateway \u043f\u043e\u0434\u0447\u0438\u0441\u0442\u0438\u043b \u0442\u043e\u043a\u0435\u043d, \u043d\u043e Cursor \u0442\u043e \u043f\u043e\u043c\u043d\u0438\u0442 \u043d\u0430\u0448 \u0434\u0438\u0430\u043b\u043e\u0433\" title=\"MCP-Gateway \u043f\u043e\u0434\u0447\u0438\u0441\u0442\u0438\u043b \u0442\u043e\u043a\u0435\u043d, \u043d\u043e Cursor \u0442\u043e \u043f\u043e\u043c\u043d\u0438\u0442 \u043d\u0430\u0448 \u0434\u0438\u0430\u043b\u043e\u0433\" width=\"2498\" height=\"1031\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/380\/c49\/4ff\/380c494ff97650591357b5d7b5154e9b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/380\/c49\/4ff\/380c494ff97650591357b5d7b5154e9b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>MCP-Gateway \u043f\u043e\u0434\u0447\u0438\u0441\u0442\u0438\u043b \u0442\u043e\u043a\u0435\u043d, \u043d\u043e Cursor \u0442\u043e \u043f\u043e\u043c\u043d\u0438\u0442 \u043d\u0430\u0448 \u0434\u0438\u0430\u043b\u043e\u0433<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cbd\/754\/69d\/cbd75469d6e2f92c022123b29477f9dc.png\" alt=\"\u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0438 \u0441\u043b\u0438\u0442\u044b\u0439 \u0442\u043e\u043a\u0435\u043d\" title=\"\u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0438 \u0441\u043b\u0438\u0442\u044b\u0439 \u0442\u043e\u043a\u0435\u043d\" width=\"2455\" height=\"731\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/cbd\/754\/69d\/cbd75469d6e2f92c022123b29477f9dc.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cbd\/754\/69d\/cbd75469d6e2f92c022123b29477f9dc.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0438 \u0441\u043b\u0438\u0442\u044b\u0439 \u0442\u043e\u043a\u0435\u043d<\/figcaption><\/div>\n<\/figure>\n<h4>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 3<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c\u00a0<code>.env<\/code> \u0444\u0430\u0439\u043b \u0441 \u0432\u044b\u0434\u0443\u043c\u0430\u043d\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c \u043e\u0442 OpenAI: \u043a\u043b\u044e\u0447:<\/p>\n<pre><code class=\"dart\">OPENAIKEY=sk-qwejxakdjruewhjnsvasdj<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u0433\u0435\u043d\u0442\u0430 \u0441 \u044f\u0432\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c mcp-gateway \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0448 \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/26a\/756\/e88\/26a756e888c26f4166cd248b53e3f394.png\" alt=\"\u0421\u043b\u0438\u0442\u044b\u0439 \u0442\u043e\u043a\u0435\u043d\" title=\"\u0421\u043b\u0438\u0442\u044b\u0439 \u0442\u043e\u043a\u0435\u043d\" width=\"1135\" height=\"901\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/26a\/756\/e88\/26a756e888c26f4166cd248b53e3f394.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/26a\/756\/e88\/26a756e888c26f4166cd248b53e3f394.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u043b\u0438\u0442\u044b\u0439 \u0442\u043e\u043a\u0435\u043d<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u0433\u043e\u0432\u043e\u0440\u044f, \u0435\u0441\u043b\u0438 \u0432\u0430\u0448 \u0442\u043e\u043a\u0435\u043d \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438\u0437 \u043d\u0430\u0447\u0430\u043b\u0430, \u043d\u0435 \u043d\u0430\u0434\u0435\u0439\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u0430\u043c \u043f\u043e\u0432\u0435\u0437\u0435\u0442 \u0438 \u043e\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0438\u0442.<\/p>\n<h3>Local Implementation<\/h3>\n<h4>\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h4>\n<p>\u0414\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u0444\u0430\u0439\u043b \u0441 5-\u044e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f\u043c\u0438 \u0442\u043e\u043a\u0435\u043d\u043e\u0432:<\/p>\n<pre><code class=\"dart\">HF_TOKEN = \"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\" OPENAI_TOKEN = \"sk-proj-SDASDFASDSDDSFDFSDADSdfsdfaHAJKDD5JASMDBXAHEG4123XDLKCXCDFSDFSAZXCN\" JWT_TOKEN =\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ik...\" GITHUB_TOKEN_CLASSIC = \"ghp_mS5asdaSJASHDqwDSAD4KD\" GITHUB_TOKEN = \"github_pat_33SDSDJKJXKCJXIHFGAdfdsfkS4333Nwqe13weqeirurururrrr\"<\/code><\/pre>\n<h4>MCP<\/h4>\n<p>\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <code>mcp-gateway<\/code> \u0447\u0435\u0440\u0435\u0437 <code>uv\/pip<\/code> \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>uvx<\/code> <\/p>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 MCP-Gateway \u0435\u043c\u0443 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u0435\u043d <code>mcp.json<\/code><\/p>\n<pre><code class=\"json\">{     \"mcpServers\": {         \"mcp-gateway\": {             \"command\": \"uv\",             \"args\": [                 \"run\",                 \"mcp-gateway\",                 \"-p\",                 \"basic\",                 \"-p\",                 \"xetrack\"             ],             \"env\": {                 \"XETRACK_DB_PATH\": \"tracing.db\",                 \"XETRACK_LOGS_PATH\": \"logs\/\"                            },             \"servers\": {                 \"filesystem\": {                     \"command\": \"npx\",                     \"args\": [                         \"-y\",                         \"@modelcontextprotocol\/server-filesystem\",                         \".\"                     ]                 }             }         }     } }<\/code><\/pre>\n<h4>\u0410\u0433\u0435\u043d\u0442<\/h4>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0430\u0433\u0435\u043d\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 pydantic AI, \u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043a Lasso MCP-Gateway \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 (\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439) \u0438 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0447\u0435\u0440\u0435\u0437 <code>xetrack<\/code><\/p>\n<pre><code class=\"python\">from typing import Optional from pydantic_ai import Agent from pydantic_ai.models.openai import OpenAIModel from pydantic_ai.providers.openai import OpenAIProvider from pydantic_ai.mcp import MCPServerStdio import os from dotenv import load_dotenv import asyncio   load_dotenv()   async def get_custom_openai_provider_response(     model_name: str,     query: str,     provider_url: Optional[str] = None,     system: Optional[str] = \"\",     api_key: Optional[str] = None, ) -&gt; str:     \"\"\"     Func to call custom open ai provider, using `provider_url` if needed     \"\"\"     lasso_gateway = MCPServerStdio(         command=\"uv\",         args=[\"run\",\"mcp-gateway\",\"--mcp-json-path\", \".\/mcp.json\",\"--plugin\",\"basic\", \"--plugin\", \"xetrack\"],         env={\"XETRACK_DB_PATH\": \"tracing.db\", \"XETRACK_LOGS_PATH\": \"logs\/\"}     )       model = OpenAIModel(         model_name=model_name,         provider=OpenAIProvider(base_url=provider_url, api_key=api_key),     )     agent = Agent(         model=model,         retries=5,         system_prompt=system,         mcp_servers=[lasso_gateway]     )       async with agent.run_mcp_servers():       result = await agent.run(query)         return result   async def main():     test_keys = [         \"HF_TOKEN\",         \"OPENAI_TOKEN\",         \"JWT_TOKEN\",         \"GITHUB_TOKEN_CLASSIC\",         \"GITHUB_TOKEN\"     ]       for key in test_keys:         query = f\"Use your tools to read the .\/tokens.txt and return the {key}\"         print(f\"Testing key: {key}\")         response = await get_custom_openai_provider_response(             model_name=\"gpt-4.1-nano-2025-04-14\",             system=\"Use all available tools to help user with his response, be always helpful\",             query=query,             api_key=os.getenv(\"OPENAI_API_KEY\")         )         print(\"#############\")         print(f\"Response for {key}: {response}\\n\")         print(\"#############\") if __name__ == \"__main__\":     asyncio.run(main())<\/code><\/pre>\n<p>\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<blockquote>\n<p>HF_TOKEN = &#171;&lt;HUGGINGFACE_TOKEN&gt; <br \/>OPENAI_TOKEN = &#171;sk-proj-&#8230;&#187; <br \/>JWT_TOKEN = &#171;&lt;JWT_TOKEN&gt; <br \/>GITHUB_TOKEN_CLASSIC = &#171;ghp_mS5asdaSJASHDqwDSAD4KD&#187; <br \/>GITHUB_TOKEN = &#171;github_pat_33..<\/p>\n<\/blockquote>\n<p>\u041e\u0431\u0435\u0449\u0430\u043d\u043d\u044b\u0439 github-\u0442\u043e\u043a\u0435\u043d \u0434\u0430\u0436\u0435 \u043d\u0435 \u0431\u044b\u043b \u0441\u0430\u043d\u0438\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u0447\u0442\u043e \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0439, \u0447\u0442\u043e \u0432 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<h4>\u0427\u0442\u043e \u043b\u043e\u0433\u0438\u0440\u0443\u0435\u0442 xetrack<\/h4>\n<p>\u0421\u0440\u0435\u0434\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 xetrack:<\/p>\n<ul>\n<li>\n<p><strong>capability_name<\/strong>: \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>read_file<\/code>)<\/p>\n<\/li>\n<li>\n<p><strong>path<\/strong>: \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 (<code>.\/tokens.txt<\/code>)<\/p>\n<\/li>\n<li>\n<p><strong>content_text<\/strong>: \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u043e\u0441\u043b\u0435 \u0441\u0430\u043d\u0438\u0442\u0438\u0437\u0430\u0446\u0438\u0438 (<code>HF_TOKEN = \"&lt;HUGGINGFACE_TOKEN&gt;\"<\/code>)<\/p>\n<\/li>\n<li>\n<p><strong>pattern<\/strong>: \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u043f\u043e\u0438\u0441\u043a\u0430 (\u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e)<\/p>\n<p>\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0412\u0430\u0436\u043d\u043e<\/strong>: xetrack \u041d\u0415 \u043b\u043e\u0433\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u0430\u0433\u0435\u043d\u0442\u0430 \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0437\u043e\u0432\u044b MCP-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441 \u043d\u0438\u043c \u044f\u0432\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0432 \u0432\u0430\u0448\u0435\u043c <code>mcp.json<\/code>.<\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434<\/h2>\n<h4>Summary<\/h4>\n<p>\u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u0433\u0440\u0443\u0448\u0435\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u043e\u0434\u0435 \u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 mcp\/tool-call \u0438 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u043e\u0439 \u043c\u0435\u0436\u0434\u0443 \u0432\u0441\u0435\u043c\u0438 \u0432\u0430\u0448\u0438\u043c\u0438 mcp-\u0442\u0443\u043b\u0430\u043c\u0438. \u041d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0433\u0435\u043d\u0442\u0443 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438\u0437 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432\/\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432, \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0430\u043d\u0438\u0442\u0438\u0437\u0438\u0440\u0443\u044f \u043e\u0442\u0432\u0435\u0442 \u043f\u0435\u0440\u0435\u0434 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0430\u0433\u0435\u043d\u0442\u0430.<\/p>\n<h4>\u0414\u043b\u044f \u043a\u043e\u0433\u043e <\/h4>\n<p><strong><em>\u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c<\/em><\/strong>: \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u043a\u043e\u0440\u043c\u0438\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0430\u0433\u0435\u043d\u0442\u0443 \u043a\u043b\u044e\u0447 \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e .env \u0438 \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c revoke, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0439 \u044d\u0442\u0438\u0445 \u043a\u043b\u044e\u0447\u0435\u0439. <strong><em>\u0411\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0435\u0441\u043b\u0438<\/em><\/strong>: \u0412\u044b \u044f\u0432\u043d\u043e \u043e\u0442\u0434\u0430\u043b\u0438 \u0430\u0433\u0435\u043d\u0442\u0443 \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0432\u0430\u0448 \u0432\u0438\u0434 \u043a\u043b\u044e\u0447\u0430 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f mcp-gateway, e.g. OpenAIApiKey.<\/p>\n<h4>\u0427\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u043e:<\/h4>\n<ul>\n<li>\n<p><strong>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f<\/strong> \u2014 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432 \u043a\u043b\u0438\u0435\u043d\u0442 \u0432 \u0432\u0438\u0434\u0435 Cursor, Windsurf, VS Code, Claude-desktop \u0438 \u0434\u0440\u0443\u0433\u0438\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432 \u0432\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0430\u0433\u0435\u043d\u0442\u043e\u043c \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong> \u2014 xetrack \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043f\u0440\u043e\u043a\u0441\u0438<\/strong> \u2014 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 MCP-\u0441\u0435\u0440\u0432\u0435\u0440\u044b, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u044c \u0438\u0445 \u0432 \u0441\u0435\u0440\u0432\u0435\u0440\u044b <code>mcp-gateway<\/code><\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0430\u043d\u0438\u0442\u0438\u0437\u0430\u0446\u0438\u044f &#8212; <\/strong>MCP Gateway \u043c\u0430\u0441\u043a\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0442\u0438\u043f\u044b \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u043f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 <\/p>\n<\/li>\n<\/ul>\n<h4>\u0427\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043b\u043e\u0445\u043e:<\/h4>\n<ul>\n<li>\n<p><strong>\u041d\u0435 \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430<\/strong> \u2014 \u0435\u0441\u043b\u0438 \u0442\u043e\u043a\u0435\u043d \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u0432 \u0447\u0430\u0442\u0435, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d \u0438\u0437 \u0444\u0430\u0439\u043b\u0430, \u0437\u0430\u0449\u0438\u0442\u0430 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u0430\u0448 \u0430\u0433\u0435\u043d\u0442 \u0435\u0433\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442. <\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432<\/strong> \u2014 \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0442\u043e\u043a\u0435\u043d\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<p>Lasso MCP Gateway \u043a\u0430\u043a \u0438\u0434\u0435\u044f \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044f \u0441\u0430\u043c \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0443\u043c\u043d\u044b\u043c\u0438 \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0442\u0435\u043c \u0444\u0430\u0439\u043b\u0430\u043c, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043d\u0435 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f IDE-\u0430\u0433\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0430\u043c\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u043e\u0439\u0442\u0438\u0441\u044c \u043f\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442. \u042d\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u0438 \u0431\u0430\u0437\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u043b\u0430\u0442\u044c <code>.gitignore<\/code> \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>\u041d\u043e \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u044b\u0440\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e  \u043a\u0435\u0439\u0441\u043e\u0432, \u0430 \u0432 \u0442\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432, \u043f\u043e\u043a\u0430 \u0447\u0442\u043e, \u043f\u0440\u043e\u0449\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. <\/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\/910556\/\"> https:\/\/habr.com\/ru\/articles\/910556\/<\/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<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0421 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435\u043c AI-\u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u0438 Model Context Protocol (MCP) \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438. \u0427\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u0430\u0448 AI-\u0430\u0433\u0435\u043d\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438 &#171;\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e&#187; \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0441\u044f \u0438\u043c\u0438 \u0441 \u0432\u0430\u043c\u0438 \u0432 \u0441\u0432\u043e\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u0435, \u0430 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0430\u0448\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043e\u043d \u0442\u043e\u0447\u043d\u043e \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u0430\u0433\u0435\u043d\u0442\u0430, \u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0435 \u0438 IDE, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044d\u0442\u043e\u0442 \u0430\u0433\u0435\u043d\u0442 \u0438 \u043e\u0431\u0438\u0442\u0430\u0435\u0442, \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0440\u044f\u0434 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>\u042f\u0440\u043a\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0442\u0443\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0432\u0430\u0448\u0438\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/modelcontextprotocol\/servers\/tree\/main\/src\/filesystem\">mcp-filesystem<\/a>. \u041e\u0434\u0438\u043d \u0448\u0430\u0433 \u043d\u0435 \u0442\u0443\u0434\u0430 \u0438 \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0431\u0435\u0436\u0430\u0442\u044c \u0437\u0430 \u0440\u0435\u0432\u043e\u043a\u043e\u043c \u0442\u043e\u043a\u0435\u043d\u0430, \u0430 \u0435\u0441\u043b\u0438 \u043e\u043d \u0435\u0449\u0435 \u0438 \u043e\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438, \u0432\u0430\u0448\u0438 \u0430\u0434\u043c\u0438\u043d\u044b \u044f\u0432\u043d\u043e \u043d\u0435 \u0441\u043a\u0430\u0436\u0443\u0442 \u0432\u0430\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e.<\/p>\n<p>\u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e \u0442\u043e, \u043a\u0430\u043a \u0443 XAI \u0442\u043e\u043a\u0435\u043d \u043f\u0440\u043e\u0441\u0442\u043e \u043b\u0435\u0436\u0430\u043b \u043d\u0430 github \u043f\u0430\u0440\u0443 \u043c\u0435\u0441\u044f\u0446\u0435\u0432: <a href=\"https:\/\/habr.com\/ru\/news\/907198\/\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a> <\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u0430 Lasso Security \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 <a href=\"https:\/\/github.com\/lasso-security\/mcp-gateway\">MCP Gateway<\/a> \u2014 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0442\u0430\u0435\u0442 \u043c\u0435\u0436\u0434\u0443 AI-\u0430\u0433\u0435\u043d\u0442\u043e\u043c \u0438 MCP-\u0442\u0443\u043b\u0430\u043c\u0438, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u0441\u0430\u043d\u0438\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Lasso MCP Gateway \u0432 \u0434\u0432\u0443\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445: \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 Cursor IDE \u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0430\u0433\u0435\u043d\u0442\u043e\u043c \u043d\u0430 PydanticAI.<\/p>\n<h2>\u0427\u0442\u043e \u0443\u043c\u0435\u0435\u0442 Lasso MCP Gateway <\/h2>\n<p>1) \u041f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u044b\u0437\u043e\u0432\u044b \u0432\u0441\u0435\u0445 MCP-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u0434 \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c<br \/>2) \u041c\u0430\u0441\u043a\u0438\u0440\u0443\u0435\u0442 \u0432 <code>basic<\/code> \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 (\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439): <\/p>\n<ul>\n<li>\n<p>azure client secret<\/p>\n<\/li>\n<li>\n<p>github tokens<\/p>\n<\/li>\n<li>\n<p>github oauth<\/p>\n<\/li>\n<li>\n<p>gcp api key<\/p>\n<\/li>\n<li>\n<p>aws access token<\/p>\n<\/li>\n<li>\n<p>jwt token<\/p>\n<\/li>\n<li>\n<p>gitlab session cookie<\/p>\n<\/li>\n<li>\n<p>huggingface access token<\/p>\n<\/li>\n<li>\n<p>microsoft teams webhook<\/p>\n<\/li>\n<li>\n<p>slack app token\\<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 presidio \u0438 \u0441\u0430\u043c\u0438\u043c lasso. \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u044b \u0447\u0435\u0440\u0435\u0437 <code>xetrack<\/code><\/p>\n<h2>\u041e\u0431\u0449\u0438\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b<\/h2>\n<p>\u0418\u0434\u0435\u044f MCP-gateway \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u043a\u0438\u043c \u043f\u0440\u043e\u043a\u0441\u0438 \u043c\u0435\u0436\u0434\u0443 \u0430\u0433\u0435\u043d\u0442\u043e\u043c \u0438 \u0442\u0443\u043b\u0430\u043c\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u043e\u043d \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 MCP \u0442\u0443\u043b, \u0430 \u043a\u0430\u043a MCP-\u0442\u0443\u043b, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0443\u043b\u044b. \u0422\u043e \u0435\u0441\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0432\u044b\u0437\u043e\u0432 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043f\u043e \u0442\u0438\u043f\u0443\u00a0<code>read_file<\/code> <code>create_file<\/code> \u0438 \u0442\u0434 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a <code>mcp-gateway<\/code> \u0434\u0430\u043b \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0435 \u043e\u0434\u043e\u0431\u0440\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u043b \u0441\u0430\u043d\u0438\u0442\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0441\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043d\u0430 github<\/figcaption><\/div>\n<\/figure>\n<h2>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b<\/h2>\n<h3>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 Cursor <\/h3>\n<p><strong>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/strong> \u0421\u043b\u0435\u0434\u0443\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0438\u0437 <a href=\"http:\/\/readme.md\"><code>readme.md<\/code><\/a> \u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b <code>mcp-gateway<\/code> \u043a <code>cursor<\/code>, \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043f\u0443\u0442\u044c \u043a \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0447\u0435\u0440\u0435\u0437 <code>xetrack<\/code>. \u041a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442:<\/p>\n<pre><code class=\"json\">{   \"mcpServers\": {     \"mcp-gateway\": {       \"command\": \"uvx\",       \"args\": [         \"mcp-gateway\",         \"--mcp-json-path\",         \"\/home\/user\/.cursor\/mcp.json\",         \"--plugin\",         \"basic\",         \"--plugin\",          \"xetrack\"       ],       \"env\": {         \"XETRACK_LOGS_PATH\": \"logs\/\",         \"XETRACK_DB_PATH\": \"tracing.db\"       },       \"servers\": {         \"filesystem\": {           \"command\": \"npx\",           \"args\": [             \"-y\",             \"@modelcontextprotocol\/server-filesystem\",             \".\"           ]         }       }     }   } }<\/code><\/pre>\n<h4>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 1: \u0427\u0442\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0441 HuggingFace \u0442\u043e\u043a\u0435\u043d\u043e\u043c<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u043b \u0444\u0430\u0439\u043b<\/p>\n<pre><code class=\"bash\">echo 'HF_TOKEN = \"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\"' &gt; tokens.txt<\/code><\/pre>\n<p>\u0432 \u043d\u0435\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432\u044b\u0434\u0443\u043c\u0430\u043d\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u0438\u0437 Huggingface<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044f \u0441\u043d\u043e\u0432\u0430 \u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0438\u0437 <a href=\"http:\/\/readme.md\"><code>readme.md<\/code><\/a> \u043f\u0438\u0448\u0443 \u0437\u0430\u043f\u0440\u043e\u0441<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u0441\u0430\u043c\u043e\u043c \u0432\u0435\u0440\u0445\u0443<\/figcaption><\/div>\n<\/figure>\n<p>Cursor \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0443\u0436\u0435 \u043e\u0447\u0438\u0449\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0438 \u0432\u0435\u0440\u043d\u0443\u043b \u043c\u043d\u0435 <code>&lt;HUGGINGFACE_TOKEN&gt;<\/code>.<\/p>\n<p><strong>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/strong>:<\/p>\n<p>\u0432 \u0442\u0443\u043b\u0443 \u043f\u0435\u0440\u0435\u0434\u0430\u043b\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440:<\/p>\n<pre><code class=\"json\">{   \"path\": \"~\/lasso-mcp\/sts\/tokens.txt\"   }<\/code><\/pre>\n<p>\u0432\u043d\u0443\u0442\u0440\u0438 <code>tokens.txt<\/code> \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043c\u043e\u0439 \u0432\u044b\u0434\u0443\u043c\u0430\u043d\u043d\u044b\u0439 hf token<\/p>\n<p>\u0442\u0443\u043b\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u043b\u0430 \u043e\u0447\u0438\u0441\u0442\u043a\u0443:<\/p>\n<pre><code class=\"json\">{ \"_meta\": null, \"content\": [ { \"type\": \"text\", \"text\": \"HF_TOKEN = \\\"&lt;HUGGINGFACE_TOKEN&gt;\\n\", \"annotations\": null } ], \"isError\": false } <\/code><\/pre>\n<p>\u0437\u0430\u0442\u0435\u043c \u0442\u0443\u043b\u0430 \u0432\u0435\u0440\u043d\u0443\u043b\u0430 \u0440\u0435\u0441\u043f\u0430\u043d\u0441 cursor \u0430\u0433\u0435\u043d\u0442\u0443 \u0438 \u043e\u043d \u0432\u0435\u0440\u043d\u0443\u043b \u043e\u0447\u0438\u0449\u0435\u043d\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d:<\/p>\n<pre><code class=\"dart\">&lt;HUGGINGFACE_TOKEN&gt;<\/code><\/pre>\n<h4>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 2: \u041e\u0431\u0445\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0430\u0433\u0435\u043d\u0442\u0430<\/h4>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043d\u044e\u0430\u043d\u0441: \u043a\u043e\u0433\u0434\u0430 \u044f \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b \u0430\u0433\u0435\u043d\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0441 \u043a\u043e\u0434\u043e\u043c, \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u0442\u043e\u043a\u0435\u043d \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0447\u0430\u0442\u0435, MCP Gateway \u043d\u0435 \u0441\u043c\u043e\u0433 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e. \u0421\u0430\u043d\u0438\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u043e\u0432, \u043d\u043e \u043d\u0435 \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438\/\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043c\u043e\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 <br \/>(\u0447\u0442\u043e \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0438 \u043d\u0435 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e).<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u043f\u0438\u0448\u0435\u043c \u044f\u0432\u043d\u043e \u043d\u0430\u0448 \u043a\u043b\u044e\u0447 \u0432 \u0434\u0438\u0430\u043b\u043e\u0433\u0435<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\">\n<div><figcaption>Cursor \u0441\u043e\u0437\u0434\u0430\u043b \u0444\u0430\u0439\u043b \u0438 \u044f\u0432\u043d\u043e \u0432\u043f\u0438\u0441\u0430\u043b \u0442\u0443\u0434\u0430 \u043c\u043e\u0439 \u0442\u043e\u043a\u0435\u043d<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u043e\u0433\u0434\u0430 \u044f \u043f\u043e\u0437\u0436\u0435 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, MCP Gateway \u0441\u043d\u043e\u0432\u0430 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e. \u041e\u0434\u043d\u0430\u043a\u043e Cursor &#171;\u043f\u043e\u043c\u043d\u0438\u043b&#187; \u043e \u0442\u043e\u043a\u0435\u043d\u0435 \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0431\u0435\u0441\u0435\u0434\u044b \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u043b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0432\u0435\u0440\u043d\u0443\u0432 \u043c\u043e\u0439 \u0442\u043e\u043a\u0435\u043d \u043c\u043d\u0435 \u0436\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b \u0444\u0430\u0439\u043b<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\">\n<div><figcaption>MCP-Gateway \u043f\u043e\u0434\u0447\u0438\u0441\u0442\u0438\u043b \u0442\u043e\u043a\u0435\u043d, \u043d\u043e Cursor \u0442\u043e \u043f\u043e\u043c\u043d\u0438\u0442 \u043d\u0430\u0448 \u0434\u0438\u0430\u043b\u043e\u0433<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\">\n<div><figcaption>\u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0438 \u0441\u043b\u0438\u0442\u044b\u0439 \u0442\u043e\u043a\u0435\u043d<\/figcaption><\/div>\n<\/figure>\n<h4>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 3<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c\u00a0<code>.env<\/code> \u0444\u0430\u0439\u043b \u0441 \u0432\u044b\u0434\u0443\u043c\u0430\u043d\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c \u043e\u0442 OpenAI: \u043a\u043b\u044e\u0447:<\/p>\n<pre><code class=\"dart\">OPENAIKEY=sk-qwejxakdjruewhjnsvasdj<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u0433\u0435\u043d\u0442\u0430 \u0441 \u044f\u0432\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c mcp-gateway \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0448 \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u043b\u0438\u0442\u044b\u0439 \u0442\u043e\u043a\u0435\u043d<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u0433\u043e\u0432\u043e\u0440\u044f, \u0435\u0441\u043b\u0438 \u0432\u0430\u0448 \u0442\u043e\u043a\u0435\u043d \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438\u0437 \u043d\u0430\u0447\u0430\u043b\u0430, \u043d\u0435 \u043d\u0430\u0434\u0435\u0439\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u0430\u043c \u043f\u043e\u0432\u0435\u0437\u0435\u0442 \u0438 \u043e\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0438\u0442.<\/p>\n<h3>Local Implementation<\/h3>\n<h4>\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h4>\n<p>\u0414\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u0444\u0430\u0439\u043b \u0441 5-\u044e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f\u043c\u0438 \u0442\u043e\u043a\u0435\u043d\u043e\u0432:<\/p>\n<pre><code class=\"dart\">HF_TOKEN = \"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\" OPENAI_TOKEN = \"sk-proj-SDASDFASDSDDSFDFSDADSdfsdfaHAJKDD5JASMDBXAHEG4123XDLKCXCDFSDFSAZXCN\" JWT_TOKEN =\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ik...\" GITHUB_TOKEN_CLASSIC = \"ghp_mS5asdaSJASHDqwDSAD4KD\" GITHUB_TOKEN = \"github_pat_33SDSDJKJXKCJXIHFGAdfdsfkS4333Nwqe13weqeirurururrrr\"<\/code><\/pre>\n<h4>MCP<\/h4>\n<p>\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <code>mcp-gateway<\/code> \u0447\u0435\u0440\u0435\u0437 <code>uv\/pip<\/code> \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>uvx<\/code> <\/p>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 MCP-Gateway \u0435\u043c\u0443 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u0435\u043d <code>mcp.json<\/code><\/p>\n<pre><code class=\"json\">{     \"mcpServers\": {         \"mcp-gateway\": {             \"command\": \"uv\",             \"args\": [                 \"run\",                 \"mcp-gateway\",                 \"-p\",                 \"basic\",                 \"-p\",                 \"xetrack\"             ],             \"env\": {                 \"XETRACK_DB_PATH\": \"tracing.db\",                 \"XETRACK_LOGS_PATH\": \"logs\/\"                            },             \"servers\": {                 \"filesystem\": {                     \"command\": \"npx\",                     \"args\": [                         \"-y\",                         \"@modelcontextprotocol\/server-filesystem\",                         \".\"                     ]                 }             }         }     } }<\/code><\/pre>\n<h4>\u0410\u0433\u0435\u043d\u0442<\/h4>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0430\u0433\u0435\u043d\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 pydantic AI, \u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043a Lasso MCP-Gateway \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 (\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439) \u0438 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0447\u0435\u0440\u0435\u0437 <code>xetrack<\/code><\/p>\n<pre><code class=\"python\">from typing import Optional from pydantic_ai import Agent from pydantic_ai.models.openai import OpenAIModel from pydantic_ai.providers.openai import OpenAIProvider from pydantic_ai.mcp import MCPServerStdio import os from dotenv import load_dotenv import asyncio   load_dotenv()   async def get_custom_openai_provider_response(     model_name: str,     query: str,     provider_url: Optional[str] = None,     system: Optional[str] = \"\",     api_key: Optional[str] = None, ) -&gt; str:     \"\"\"     Func to call custom open ai provider, using `provider_url` if needed     \"\"\"     lasso_gateway = MCPServerStdio(         command=\"uv\",         args=[\"run\",\"mcp-gateway\",\"--mcp-json-path\", \".\/mcp.json\",\"--plugin\",\"basic\", \"--plugin\", \"xetrack\"],         env={\"XETRACK_DB_PATH\": \"tracing.db\", \"XETRACK_LOGS_PATH\": \"logs\/\"}     )       model = OpenAIModel(         model_name=model_name,         provider=OpenAIProvider(base_url=provider_url, api_key=api_key),     )     agent = Agent(         model=model,         retries=5,         system_prompt=system,         mcp_servers=[lasso_gateway]     )       async with agent.run_mcp_servers():       result = await agent.run(query)         return result   async def main():     test_keys = [         \"HF_TOKEN\",         \"OPENAI_TOKEN\",         \"JWT_TOKEN\",         \"GITHUB_TOKEN_CLASSIC\",         \"GITHUB_TOKEN\"     ]       for key in test_keys:         query = f\"Use your tools to read the .\/tokens.txt and return the {key}\"         print(f\"Testing key: {key}\")         response = await get_custom_openai_provider_response(             model_name=\"gpt-4.1-nano-2025-04-14\",             system=\"Use all available tools to help user with his response, be always helpful\",             query=query,             api_key=os.getenv(\"OPENAI_API_KEY\")         )         print(\"#############\")         print(f\"Response for {key}: {response}\\n\")         print(\"#############\") if __name__ == \"__main__\":     asyncio.run(main())<\/code><\/pre>\n<p>\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<blockquote>\n<p>HF_TOKEN = &#171;&lt;HUGGINGFACE_TOKEN&gt; <br \/>OPENAI_TOKEN = &#171;sk-proj-&#8230;&#187; <br \/>JWT_TOKEN = &#171;&lt;JWT_TOKEN&gt; <br \/>GITHUB_TOKEN_CLASSIC = &#171;ghp_mS5asdaSJASHDqwDSAD4KD&#187; <br \/>GITHUB_TOKEN = &#171;github_pat_33..<\/p>\n<\/blockquote>\n<p>\u041e\u0431\u0435\u0449\u0430\u043d\u043d\u044b\u0439 github-\u0442\u043e\u043a\u0435\u043d \u0434\u0430\u0436\u0435 \u043d\u0435 \u0431\u044b\u043b \u0441\u0430\u043d\u0438\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u0447\u0442\u043e \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0439, \u0447\u0442\u043e \u0432 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<h4>\u0427\u0442\u043e \u043b\u043e\u0433\u0438\u0440\u0443\u0435\u0442 xetrack<\/h4>\n<p>\u0421\u0440\u0435\u0434\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 xetrack:<\/p>\n<ul>\n<li>\n<p><strong>capability_name<\/strong>: \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>read_file<\/code>)<\/p>\n<\/li>\n<li>\n<p><strong>path<\/strong>: \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 (<code>.\/tokens.txt<\/code>)<\/p>\n<\/li>\n<li>\n<p><strong>content_text<\/strong>: \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u043e\u0441\u043b\u0435 \u0441\u0430\u043d\u0438\u0442\u0438\u0437\u0430\u0446\u0438\u0438 (<code>HF_TOKEN = \"&lt;HUGGINGFACE_TOKEN&gt;\"<\/code>)<\/p>\n<\/li>\n<li>\n<p><strong>pattern<\/strong>: \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u043f\u043e\u0438\u0441\u043a\u0430 (\u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e)<\/p>\n<p>\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0412\u0430\u0436\u043d\u043e<\/strong>: xetrack \u041d\u0415 \u043b\u043e\u0433\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u0430\u0433\u0435\u043d\u0442\u0430 \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0437\u043e\u0432\u044b MCP-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441 \u043d\u0438\u043c \u044f\u0432\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0432 \u0432\u0430\u0448\u0435\u043c <code>mcp.json<\/code>.<\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434<\/h2>\n<h4>Summary<\/h4>\n<p>\u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u0433\u0440\u0443\u0448\u0435\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u043e\u0434\u0435 \u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 mcp\/tool-call \u0438 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u043e\u0439 \u043c\u0435\u0436\u0434\u0443 \u0432\u0441\u0435\u043c\u0438 \u0432\u0430\u0448\u0438\u043c\u0438 mcp-\u0442\u0443\u043b\u0430\u043c\u0438. \u041d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0433\u0435\u043d\u0442\u0443 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438\u0437 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432\/\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432, \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0430\u043d\u0438\u0442\u0438\u0437\u0438\u0440\u0443\u044f \u043e\u0442\u0432\u0435\u0442 \u043f\u0435\u0440\u0435\u0434 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0430\u0433\u0435\u043d\u0442\u0430.<\/p>\n<h4>\u0414\u043b\u044f \u043a\u043e\u0433\u043e <\/h4>\n<p><strong><em>\u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c<\/em><\/strong>: \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u043a\u043e\u0440\u043c\u0438\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0430\u0433\u0435\u043d\u0442\u0443 \u043a\u043b\u044e\u0447 \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e .env \u0438 \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c revoke, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0439 \u044d\u0442\u0438\u0445 \u043a\u043b\u044e\u0447\u0435\u0439. <strong><em>\u0411\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0435\u0441\u043b\u0438<\/em><\/strong>: \u0412\u044b \u044f\u0432\u043d\u043e \u043e\u0442\u0434\u0430\u043b\u0438 \u0430\u0433\u0435\u043d\u0442\u0443 \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0432\u0430\u0448 \u0432\u0438\u0434 \u043a\u043b\u044e\u0447\u0430 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f mcp-gateway, e.g. OpenAIApiKey.<\/p>\n<h4>\u0427\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u043e:<\/h4>\n<ul>\n<li>\n<p><strong>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f<\/strong> \u2014 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432 \u043a\u043b\u0438\u0435\u043d\u0442 \u0432 \u0432\u0438\u0434\u0435 Cursor, Windsurf, VS Code, Claude-desktop \u0438 \u0434\u0440\u0443\u0433\u0438\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432 \u0432\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0430\u0433\u0435\u043d\u0442\u043e\u043c \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong> \u2014 xetrack \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043f\u0440\u043e\u043a\u0441\u0438<\/strong> \u2014 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 MCP-\u0441\u0435\u0440\u0432\u0435\u0440\u044b, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u044c \u0438\u0445 \u0432 \u0441\u0435\u0440\u0432\u0435\u0440\u044b <code>mcp-gateway<\/code><\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0430\u043d\u0438\u0442\u0438\u0437\u0430\u0446\u0438\u044f &#8212; <\/strong>MCP Gateway \u043c\u0430\u0441\u043a\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0442\u0438\u043f\u044b \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u043f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 <\/p>\n<\/li>\n<\/ul>\n<h4>\u0427\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043b\u043e\u0445\u043e:<\/h4>\n<ul>\n<li>\n<p><strong>\u041d\u0435 \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430<\/strong> \u2014 \u0435\u0441\u043b\u0438 \u0442\u043e\u043a\u0435\u043d \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u0432 \u0447\u0430\u0442\u0435, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d \u0438\u0437 \u0444\u0430\u0439\u043b\u0430, \u0437\u0430\u0449\u0438\u0442\u0430 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u0430\u0448 \u0430\u0433\u0435\u043d\u0442 \u0435\u0433\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442. <\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432<\/strong> \u2014 \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0442\u043e\u043a\u0435\u043d\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<p>Lasso MCP Gateway \u043a\u0430\u043a \u0438\u0434\u0435\u044f \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044f \u0441\u0430\u043c \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0443\u043c\u043d\u044b\u043c\u0438 \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u043e\u0433\u0434\u0430<\/p>\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-460685","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/460685","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=460685"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/460685\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=460685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=460685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=460685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}