@guru-ai-product/ai-product-kit 0.2.251112183752 → 0.2.251113155253

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (874) hide show
  1. package/README.md +116 -25
  2. package/bin/mcp-server.js +48 -0
  3. package/mcp/.doc_cache/04980c3595edbf2d_SKILL.md +218 -0
  4. package/mcp/.doc_cache/04e80f12d73851a2_/346/214/207/345/215/227/346/226/207/346/241/243/346/240/207/345/207/206/346/250/241/346/235/277.md +59 -0
  5. package/mcp/.doc_cache/07cc092c31fd7015_/345/267/245/345/205/267/344/275/277/347/224/250/346/214/207/345/215/227/346/250/241/346/235/277.md +106 -0
  6. package/mcp/.doc_cache/09ac9834a831e8b5_/346/212/200/346/234/257/346/226/271/346/241/210/350/257/204/344/274/260/344/270/216/345/217/257/350/241/214/346/200/247/345/210/206/346/236/220/346/250/241/346/235/277.md +72 -0
  7. package/mcp/.doc_cache/0c0570b87cf4a98a_/351/234/200/346/261/202/350/277/255/344/273/243/346/250/241/346/235/277.md +821 -0
  8. package/mcp/.doc_cache/0c284fc4be48dbd3_/346/267/261/345/272/246/347/224/250/346/210/267/350/241/214/344/270/272/344/270/216/351/234/200/346/261/202/346/264/236/345/257/237/346/250/241/346/235/277.md +59 -0
  9. package/mcp/.doc_cache/0da74fe7b9aad548_K12/346/225/260/345/255/246/345/255/246/344/271/240/345/272/224/347/224/250/346/241/210/344/276/213.md +371 -0
  10. package/mcp/.doc_cache/1546780035ed893b_Draft_/344/272/247/345/223/201/351/234/200/346/261/202/350/215/211/347/250/277.md +60 -0
  11. package/mcp/.doc_cache/16d5f6b79f02c65e_/351/234/200/346/261/202/350/277/255/344/273/243/347/264/242/345/274/225.md +30 -0
  12. package/mcp/.doc_cache/1c631acd2940588e_index.md +83 -0
  13. package/mcp/.doc_cache/1e4a829f0abddb00_/344/272/247/345/223/201/350/247/204/345/210/222/346/250/241/346/235/277.md +322 -0
  14. package/mcp/.doc_cache/24f00280e7b9b2c7_index.md +83 -0
  15. package/mcp/.doc_cache/2767e2d4cd6afd5c_/345/225/206/344/270/232/345/214/226/350/247/204/345/210/222/346/250/241/346/235/277.md +201 -0
  16. package/mcp/.doc_cache/276d12074fd7af7d_SKILL.md +243 -0
  17. package/mcp/.doc_cache/2b6b35389546c3b9_SKILL.md +407 -0
  18. package/mcp/.doc_cache/2f45cddfb05ac32c_/351/234/200/346/261/202/350/277/255/344/273/243/347/264/242/345/274/225.md +30 -0
  19. package/mcp/.doc_cache/3086c6d32a0393da_Draft_/347/224/250/346/210/267/346/227/205/347/250/213/350/215/211/347/250/277.md +84 -0
  20. package/mcp/.doc_cache/33cd96cf79c86eaa_K12/346/225/260/345/255/246/345/255/246/344/271/240/345/272/224/347/224/250/346/241/210/344/276/213.md +371 -0
  21. package/mcp/.doc_cache/341909c063335dd2_/351/234/200/346/261/202/345/217/230/345/212/250/350/257/264/346/230/216/347/224/237/346/210/220Prompt.md +349 -0
  22. package/mcp/.doc_cache/3e0dfd0a1b9f6ce7_/344/272/247/345/223/201/351/234/200/346/261/202/345/217/221/347/216/260/344/270/216/351/252/214/350/257/201/346/250/241/346/235/277.md +53 -0
  23. package/mcp/.doc_cache/3eab19b804522d23_SKILL.md +407 -0
  24. package/mcp/.doc_cache/4b671afde6bb1fa8_/351/234/200/346/261/202/345/217/230/345/212/250/350/257/264/346/230/216/347/224/237/346/210/220/346/214/207/345/215/227.md +292 -0
  25. package/mcp/.doc_cache/4c780724e27f6f94_/351/234/200/346/261/202/350/277/255/344/273/243/346/250/241/346/235/277.md +821 -0
  26. package/mcp/.doc_cache/563de023ffa4a630_/345/237/213/347/202/271/350/247/204/350/214/203/346/226/207/346/241/243.md +372 -0
  27. package/mcp/.doc_cache/56975fb92532ee87_2_/345/212/237/350/203/275/351/234/200/346/261/202.md +67 -0
  28. package/mcp/.doc_cache/5a67e1c18353cfca_/345/270/202/345/234/272/346/234/272/344/274/232/350/257/204/344/274/260/344/270/216/347/253/236/344/272/211/345/210/206/346/236/220/346/250/241/346/235/277.md +53 -0
  29. package/mcp/.doc_cache/5b8ba3d67e39371a_SKILL.md +930 -0
  30. package/mcp/.doc_cache/5b91334295d6ad31_SKILL.md +588 -0
  31. package/mcp/.doc_cache/609688b8b4332a01_/351/234/200/346/261/202/345/217/230/345/212/250/350/257/264/346/230/216/346/226/207/346/241/243/346/250/241/346/235/277.md +576 -0
  32. package/mcp/.doc_cache/61a0859a11a562ca_3_/345/225/206/344/270/232/345/214/226/347/255/226/347/225/245.md +131 -0
  33. package/mcp/.doc_cache/6643f4d546c6a03c_/346/267/261/345/272/246/347/224/250/346/210/267/350/241/214/344/270/272/344/270/216/351/234/200/346/261/202/346/264/236/345/257/237/346/250/241/346/235/277.md +59 -0
  34. package/mcp/.doc_cache/674c69479a90ad15_4_/347/224/250/346/210/267/347/225/214/351/235/242/344/270/216/344/275/223/351/252/214.md +665 -0
  35. package/mcp/.doc_cache/674f8b285658055d_/345/270/202/345/234/272/344/270/216/345/225/206/344/270/232/345/210/206/346/236/220/346/250/241/346/235/277.md +176 -0
  36. package/mcp/.doc_cache/6cfccfda6b0e7641_SWOT/345/210/206/346/236/220/346/250/241/346/235/277.md +381 -0
  37. package/mcp/.doc_cache/6fbc13740044659b_1_/344/272/247/345/223/201/345/256/232/344/275/215/344/270/216/345/210/206/346/236/220.md +86 -0
  38. package/mcp/.doc_cache/7842a4e7fe7a3b91_/346/212/200/346/234/257/350/247/204/345/210/222/346/250/241/346/235/277.md +314 -0
  39. package/mcp/.doc_cache/7db63a8354bf8037_2_/345/212/237/350/203/275/351/234/200/346/261/202.md +67 -0
  40. package/mcp/.doc_cache/81528b4e0b12a881_SKILL.md +196 -0
  41. package/mcp/.doc_cache/83d17bdb48d30903_4_/347/224/250/346/210/267/347/225/214/351/235/242/344/270/216/344/275/223/351/252/214.md +665 -0
  42. package/mcp/.doc_cache/88e1d483f18abd02_/345/237/213/347/202/271/350/247/204/350/214/203/346/226/207/346/241/243.md +372 -0
  43. package/mcp/.doc_cache/8f420425062dcb93_SWOT/345/210/206/346/236/220/346/250/241/346/235/277.md +381 -0
  44. package/mcp/.doc_cache/8f981c56b3d4b17d_/345/225/206/344/270/232/345/214/226/350/247/204/345/210/222/346/250/241/346/235/277.md +201 -0
  45. package/mcp/.doc_cache/a3328dcce1521943_/345/270/202/345/234/272/344/270/216/345/225/206/344/270/232/345/210/206/346/236/220/346/250/241/346/235/277.md +176 -0
  46. package/mcp/.doc_cache/a4ef757633f13133_/346/212/200/346/234/257/346/226/271/346/241/210/350/257/204/344/274/260/344/270/216/345/217/257/350/241/214/346/200/247/345/210/206/346/236/220/346/250/241/346/235/277.md +72 -0
  47. package/mcp/.doc_cache/a90401fc94ca29a3_SKILL.md +260 -0
  48. package/mcp/.doc_cache/bad4b7992748a7a0_/344/272/247/345/223/201/351/234/200/346/261/202/345/217/221/347/216/260/344/270/216/351/252/214/350/257/201/346/250/241/346/235/277.md +53 -0
  49. package/mcp/.doc_cache/baeac26fdbcd25de_/344/272/247/345/223/201/350/247/204/345/210/222/346/250/241/346/235/277.md +322 -0
  50. package/mcp/.doc_cache/c58bcfc199ada118_SKILL.md +196 -0
  51. package/mcp/.doc_cache/c8305789db809e48_SKILL.md +588 -0
  52. package/mcp/.doc_cache/cache_mapping.json +69 -0
  53. package/mcp/.doc_cache/d09142514e6a9de0_/347/224/265/345/225/206/345/271/263/345/217/260/344/274/230/345/214/226/346/241/210/344/276/213.md +426 -0
  54. package/mcp/.doc_cache/d165d35fea568d64_/351/234/200/346/261/202/345/217/230/345/212/250/350/257/264/346/230/216/346/226/207/346/241/243/346/250/241/346/235/277.md +576 -0
  55. package/mcp/.doc_cache/d17b04c82d2497b2_/347/224/265/345/225/206/345/271/263/345/217/260/344/274/230/345/214/226/346/241/210/344/276/213.md +426 -0
  56. package/mcp/.doc_cache/d1cfa2f8882fcdf9_/346/214/207/345/215/227/346/226/207/346/241/243/346/240/207/345/207/206/346/250/241/346/235/277.md +59 -0
  57. package/mcp/.doc_cache/d2585b5df3d21fc9_3_/345/225/206/344/270/232/345/214/226/347/255/226/347/225/245.md +131 -0
  58. package/mcp/.doc_cache/d604a1290099121c_/351/234/200/346/261/202/345/217/230/345/212/250/350/257/264/346/230/216/347/224/237/346/210/220/346/214/207/345/215/227.md +292 -0
  59. package/mcp/.doc_cache/d66edce025de6b82_Draft_/344/272/247/345/223/201/351/234/200/346/261/202/350/215/211/347/250/277.md +60 -0
  60. package/mcp/.doc_cache/d6c3ff791e7da726_SKILL.md +33 -0
  61. package/mcp/.doc_cache/da2c3d4d7b8957af_SKILL.md +218 -0
  62. package/mcp/.doc_cache/da8f4d40a1e8f36a_/346/212/200/346/234/257/350/247/204/345/210/222/346/250/241/346/235/277.md +314 -0
  63. package/mcp/.doc_cache/db70562fc59f1658_SKILL.md +260 -0
  64. package/mcp/.doc_cache/dd61f22b0ec13e10_Draft_/347/224/250/346/210/267/346/227/205/347/250/213/350/215/211/347/250/277.md +84 -0
  65. package/mcp/.doc_cache/e1451d5b65894789_SKILL.md +930 -0
  66. package/mcp/.doc_cache/e4f23de1b5313796_1_/344/272/247/345/223/201/345/256/232/344/275/215/344/270/216/345/210/206/346/236/220.md +86 -0
  67. package/mcp/.doc_cache/e668cf08c5f905ca_/345/267/245/345/205/267/344/275/277/347/224/250/346/214/207/345/215/227/346/250/241/346/235/277.md +106 -0
  68. package/mcp/.doc_cache/e69eeaaf88a175df_/345/270/202/345/234/272/346/234/272/344/274/232/350/257/204/344/274/260/344/270/216/347/253/236/344/272/211/345/210/206/346/236/220/346/250/241/346/235/277.md +53 -0
  69. package/mcp/.doc_cache/ea4c5e5a6254f616_SKILL.md +243 -0
  70. package/mcp/.doc_cache/ec9ad6ce24808f0a_/351/234/200/346/261/202/345/217/230/345/212/250/350/257/264/346/230/216/347/224/237/346/210/220Prompt.md +349 -0
  71. package/mcp/README.md +90 -0
  72. package/mcp/docs/AI_Product_Kit_MCP_/351/234/200/346/261/202/350/257/264/346/230/216.md +93 -0
  73. package/mcp/knowledge/Building MCP with LLMs.md +13795 -0
  74. package/mcp/knowledge/MCP Python SDK Readme.md +1788 -0
  75. package/mcp/knowledge/Specification.md +138 -0
  76. package/mcp/knowledge/guide.md +54 -0
  77. package/mcp/knowledge/introduction of mcp.md +140 -0
  78. package/mcp/node_modules/.package-lock.json +147 -0
  79. package/mcp/node_modules/@modelcontextprotocol/sdk/LICENSE +7 -0
  80. package/mcp/node_modules/@modelcontextprotocol/sdk/README.md +110 -0
  81. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/cli.d.ts +2 -0
  82. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/cli.d.ts.map +1 -0
  83. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/cli.js +129 -0
  84. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/cli.js.map +1 -0
  85. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/index.d.ts +773 -0
  86. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/index.d.ts.map +1 -0
  87. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/index.js +206 -0
  88. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/index.js.map +1 -0
  89. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/index.test.d.ts +2 -0
  90. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/index.test.d.ts.map +1 -0
  91. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/index.test.js +357 -0
  92. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/index.test.js.map +1 -0
  93. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/sse.d.ts +22 -0
  94. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/sse.d.ts.map +1 -0
  95. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/sse.js +91 -0
  96. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/sse.js.map +1 -0
  97. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.d.ts +56 -0
  98. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.d.ts.map +1 -0
  99. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.js +135 -0
  100. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.js.map +1 -0
  101. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.test.d.ts +2 -0
  102. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.test.d.ts.map +1 -0
  103. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.test.js +51 -0
  104. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.test.js.map +1 -0
  105. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/websocket.d.ts +17 -0
  106. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/websocket.d.ts.map +1 -0
  107. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/websocket.js +61 -0
  108. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/websocket.js.map +1 -0
  109. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/inMemory.d.ts +20 -0
  110. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/inMemory.d.ts.map +1 -0
  111. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/inMemory.js +47 -0
  112. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/inMemory.js.map +1 -0
  113. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/inMemory.test.d.ts +2 -0
  114. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/inMemory.test.d.ts.map +1 -0
  115. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/inMemory.test.js +74 -0
  116. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/inMemory.test.js.map +1 -0
  117. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/index.d.ts +112 -0
  118. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/index.d.ts.map +1 -0
  119. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/index.js +182 -0
  120. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/index.js.map +1 -0
  121. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/index.test.d.ts +2 -0
  122. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/index.test.d.ts.map +1 -0
  123. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/index.test.js +360 -0
  124. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/index.test.js.map +1 -0
  125. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/sse.d.ts +46 -0
  126. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/sse.d.ts.map +1 -0
  127. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/sse.js +116 -0
  128. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/sse.js.map +1 -0
  129. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.d.ts +28 -0
  130. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.d.ts.map +1 -0
  131. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.js +69 -0
  132. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.js.map +1 -0
  133. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.test.d.ts +2 -0
  134. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.test.d.ts.map +1 -0
  135. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.test.js +87 -0
  136. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.test.js.map +1 -0
  137. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/protocol.d.ts +149 -0
  138. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/protocol.d.ts.map +1 -0
  139. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/protocol.js +274 -0
  140. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/protocol.js.map +1 -0
  141. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.d.ts +13 -0
  142. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.d.ts.map +1 -0
  143. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.js +31 -0
  144. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.js.map +1 -0
  145. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.test.d.ts +2 -0
  146. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.test.d.ts.map +1 -0
  147. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.test.js +27 -0
  148. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.test.js.map +1 -0
  149. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/transport.d.ts +39 -0
  150. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/transport.d.ts.map +1 -0
  151. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/transport.js +2 -0
  152. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/transport.js.map +1 -0
  153. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/types.d.ts +26424 -0
  154. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/types.d.ts.map +1 -0
  155. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/types.js +996 -0
  156. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/types.js.map +1 -0
  157. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/utils.d.ts +5 -0
  158. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/utils.d.ts.map +1 -0
  159. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/utils.js +11 -0
  160. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/utils.js.map +1 -0
  161. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/utils.test.d.ts +2 -0
  162. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/utils.test.d.ts.map +1 -0
  163. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/utils.test.js +14 -0
  164. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/utils.test.js.map +1 -0
  165. package/mcp/node_modules/@modelcontextprotocol/sdk/package.json +61 -0
  166. package/mcp/node_modules/bytes/History.md +97 -0
  167. package/mcp/node_modules/bytes/LICENSE +23 -0
  168. package/mcp/node_modules/bytes/Readme.md +152 -0
  169. package/mcp/node_modules/bytes/index.js +170 -0
  170. package/mcp/node_modules/bytes/package.json +42 -0
  171. package/mcp/node_modules/content-type/HISTORY.md +29 -0
  172. package/mcp/node_modules/content-type/LICENSE +22 -0
  173. package/mcp/node_modules/content-type/README.md +94 -0
  174. package/mcp/node_modules/content-type/index.js +225 -0
  175. package/mcp/node_modules/content-type/package.json +42 -0
  176. package/mcp/node_modules/depd/History.md +103 -0
  177. package/mcp/node_modules/depd/LICENSE +22 -0
  178. package/mcp/node_modules/depd/Readme.md +280 -0
  179. package/mcp/node_modules/depd/index.js +538 -0
  180. package/mcp/node_modules/depd/lib/browser/index.js +77 -0
  181. package/mcp/node_modules/depd/package.json +45 -0
  182. package/mcp/node_modules/http-errors/HISTORY.md +180 -0
  183. package/mcp/node_modules/http-errors/LICENSE +23 -0
  184. package/mcp/node_modules/http-errors/README.md +169 -0
  185. package/mcp/node_modules/http-errors/index.js +289 -0
  186. package/mcp/node_modules/http-errors/package.json +50 -0
  187. package/mcp/node_modules/iconv-lite/Changelog.md +236 -0
  188. package/mcp/node_modules/iconv-lite/LICENSE +21 -0
  189. package/mcp/node_modules/iconv-lite/README.md +138 -0
  190. package/mcp/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
  191. package/mcp/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
  192. package/mcp/node_modules/iconv-lite/encodings/index.js +23 -0
  193. package/mcp/node_modules/iconv-lite/encodings/internal.js +218 -0
  194. package/mcp/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
  195. package/mcp/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
  196. package/mcp/node_modules/iconv-lite/encodings/sbcs-data.js +178 -0
  197. package/mcp/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
  198. package/mcp/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
  199. package/mcp/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
  200. package/mcp/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
  201. package/mcp/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
  202. package/mcp/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
  203. package/mcp/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
  204. package/mcp/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
  205. package/mcp/node_modules/iconv-lite/encodings/utf16.js +187 -0
  206. package/mcp/node_modules/iconv-lite/encodings/utf32.js +307 -0
  207. package/mcp/node_modules/iconv-lite/encodings/utf7.js +283 -0
  208. package/mcp/node_modules/iconv-lite/lib/bom-handling.js +48 -0
  209. package/mcp/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
  210. package/mcp/node_modules/iconv-lite/lib/index.d.ts +41 -0
  211. package/mcp/node_modules/iconv-lite/lib/index.js +183 -0
  212. package/mcp/node_modules/iconv-lite/lib/streams.js +105 -0
  213. package/mcp/node_modules/iconv-lite/package.json +59 -0
  214. package/mcp/node_modules/inherits/LICENSE +16 -0
  215. package/mcp/node_modules/inherits/README.md +42 -0
  216. package/mcp/node_modules/inherits/inherits.js +9 -0
  217. package/mcp/node_modules/inherits/inherits_browser.js +27 -0
  218. package/mcp/node_modules/inherits/package.json +29 -0
  219. package/mcp/node_modules/raw-body/HISTORY.md +333 -0
  220. package/mcp/node_modules/raw-body/LICENSE +22 -0
  221. package/mcp/node_modules/raw-body/README.md +223 -0
  222. package/mcp/node_modules/raw-body/SECURITY.md +24 -0
  223. package/mcp/node_modules/raw-body/index.d.ts +85 -0
  224. package/mcp/node_modules/raw-body/index.js +336 -0
  225. package/mcp/node_modules/raw-body/package.json +50 -0
  226. package/mcp/node_modules/safer-buffer/LICENSE +21 -0
  227. package/mcp/node_modules/safer-buffer/Porting-Buffer.md +268 -0
  228. package/mcp/node_modules/safer-buffer/Readme.md +156 -0
  229. package/mcp/node_modules/safer-buffer/dangerous.js +58 -0
  230. package/mcp/node_modules/safer-buffer/package.json +34 -0
  231. package/mcp/node_modules/safer-buffer/safer.js +77 -0
  232. package/mcp/node_modules/safer-buffer/tests.js +406 -0
  233. package/mcp/node_modules/setprototypeof/LICENSE +13 -0
  234. package/mcp/node_modules/setprototypeof/README.md +31 -0
  235. package/mcp/node_modules/setprototypeof/index.d.ts +2 -0
  236. package/mcp/node_modules/setprototypeof/index.js +17 -0
  237. package/mcp/node_modules/setprototypeof/package.json +38 -0
  238. package/mcp/node_modules/setprototypeof/test/index.js +24 -0
  239. package/mcp/node_modules/statuses/HISTORY.md +82 -0
  240. package/mcp/node_modules/statuses/LICENSE +23 -0
  241. package/mcp/node_modules/statuses/README.md +136 -0
  242. package/mcp/node_modules/statuses/codes.json +65 -0
  243. package/mcp/node_modules/statuses/index.js +146 -0
  244. package/mcp/node_modules/statuses/package.json +49 -0
  245. package/mcp/node_modules/toidentifier/HISTORY.md +9 -0
  246. package/mcp/node_modules/toidentifier/LICENSE +21 -0
  247. package/mcp/node_modules/toidentifier/README.md +61 -0
  248. package/mcp/node_modules/toidentifier/index.js +32 -0
  249. package/mcp/node_modules/toidentifier/package.json +38 -0
  250. package/mcp/node_modules/unpipe/HISTORY.md +4 -0
  251. package/mcp/node_modules/unpipe/LICENSE +22 -0
  252. package/mcp/node_modules/unpipe/README.md +43 -0
  253. package/mcp/node_modules/unpipe/index.js +69 -0
  254. package/mcp/node_modules/unpipe/package.json +27 -0
  255. package/mcp/node_modules/zod/LICENSE +21 -0
  256. package/mcp/node_modules/zod/README.md +208 -0
  257. package/mcp/node_modules/zod/index.cjs +33 -0
  258. package/mcp/node_modules/zod/index.d.cts +4 -0
  259. package/mcp/node_modules/zod/index.d.ts +4 -0
  260. package/mcp/node_modules/zod/index.js +4 -0
  261. package/mcp/node_modules/zod/package.json +118 -0
  262. package/mcp/node_modules/zod/src/index.ts +4 -0
  263. package/mcp/node_modules/zod/src/v3/ZodError.ts +330 -0
  264. package/mcp/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  265. package/mcp/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  266. package/mcp/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  267. package/mcp/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  268. package/mcp/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  269. package/mcp/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  270. package/mcp/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  271. package/mcp/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  272. package/mcp/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  273. package/mcp/node_modules/zod/src/v3/errors.ts +13 -0
  274. package/mcp/node_modules/zod/src/v3/external.ts +6 -0
  275. package/mcp/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  276. package/mcp/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  277. package/mcp/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  278. package/mcp/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  279. package/mcp/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  280. package/mcp/node_modules/zod/src/v3/helpers/util.ts +224 -0
  281. package/mcp/node_modules/zod/src/v3/index.ts +4 -0
  282. package/mcp/node_modules/zod/src/v3/locales/en.ts +124 -0
  283. package/mcp/node_modules/zod/src/v3/standard-schema.ts +113 -0
  284. package/mcp/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  285. package/mcp/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  286. package/mcp/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  287. package/mcp/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  288. package/mcp/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  289. package/mcp/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  290. package/mcp/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  291. package/mcp/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  292. package/mcp/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  293. package/mcp/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  294. package/mcp/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  295. package/mcp/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
  296. package/mcp/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  297. package/mcp/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  298. package/mcp/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  299. package/mcp/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  300. package/mcp/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  301. package/mcp/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  302. package/mcp/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  303. package/mcp/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  304. package/mcp/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  305. package/mcp/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  306. package/mcp/node_modules/zod/src/v3/tests/function.test.ts +257 -0
  307. package/mcp/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  308. package/mcp/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  309. package/mcp/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  310. package/mcp/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  311. package/mcp/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  312. package/mcp/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  313. package/mcp/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  314. package/mcp/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  315. package/mcp/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  316. package/mcp/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
  317. package/mcp/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  318. package/mcp/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  319. package/mcp/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  320. package/mcp/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  321. package/mcp/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  322. package/mcp/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  323. package/mcp/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  324. package/mcp/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  325. package/mcp/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  326. package/mcp/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  327. package/mcp/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  328. package/mcp/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  329. package/mcp/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  330. package/mcp/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  331. package/mcp/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  332. package/mcp/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  333. package/mcp/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  334. package/mcp/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  335. package/mcp/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  336. package/mcp/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  337. package/mcp/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  338. package/mcp/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  339. package/mcp/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  340. package/mcp/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  341. package/mcp/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  342. package/mcp/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  343. package/mcp/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  344. package/mcp/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  345. package/mcp/node_modules/zod/src/v3/types.ts +5136 -0
  346. package/mcp/node_modules/zod/src/v4/classic/checks.ts +30 -0
  347. package/mcp/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  348. package/mcp/node_modules/zod/src/v4/classic/compat.ts +66 -0
  349. package/mcp/node_modules/zod/src/v4/classic/errors.ts +75 -0
  350. package/mcp/node_modules/zod/src/v4/classic/external.ts +50 -0
  351. package/mcp/node_modules/zod/src/v4/classic/index.ts +5 -0
  352. package/mcp/node_modules/zod/src/v4/classic/iso.ts +90 -0
  353. package/mcp/node_modules/zod/src/v4/classic/parse.ts +33 -0
  354. package/mcp/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
  355. package/mcp/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  356. package/mcp/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  357. package/mcp/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
  358. package/mcp/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  359. package/mcp/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  360. package/mcp/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  361. package/mcp/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  362. package/mcp/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
  363. package/mcp/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
  364. package/mcp/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  365. package/mcp/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  366. package/mcp/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
  367. package/mcp/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  368. package/mcp/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
  369. package/mcp/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
  370. package/mcp/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
  371. package/mcp/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  372. package/mcp/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
  373. package/mcp/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  374. package/mcp/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
  375. package/mcp/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  376. package/mcp/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
  377. package/mcp/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
  378. package/mcp/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
  379. package/mcp/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  380. package/mcp/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
  381. package/mcp/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
  382. package/mcp/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
  383. package/mcp/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
  384. package/mcp/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  385. package/mcp/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
  386. package/mcp/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
  387. package/mcp/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  388. package/mcp/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  389. package/mcp/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
  390. package/mcp/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  391. package/mcp/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
  392. package/mcp/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
  393. package/mcp/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
  394. package/mcp/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
  395. package/mcp/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
  396. package/mcp/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
  397. package/mcp/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
  398. package/mcp/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
  399. package/mcp/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  400. package/mcp/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  401. package/mcp/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  402. package/mcp/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  403. package/mcp/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
  404. package/mcp/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
  405. package/mcp/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
  406. package/mcp/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
  407. package/mcp/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
  408. package/mcp/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
  409. package/mcp/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
  410. package/mcp/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
  411. package/mcp/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
  412. package/mcp/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
  413. package/mcp/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
  414. package/mcp/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
  415. package/mcp/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
  416. package/mcp/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
  417. package/mcp/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  418. package/mcp/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  419. package/mcp/node_modules/zod/src/v4/core/api.ts +1594 -0
  420. package/mcp/node_modules/zod/src/v4/core/checks.ts +1283 -0
  421. package/mcp/node_modules/zod/src/v4/core/config.ts +15 -0
  422. package/mcp/node_modules/zod/src/v4/core/core.ts +134 -0
  423. package/mcp/node_modules/zod/src/v4/core/doc.ts +44 -0
  424. package/mcp/node_modules/zod/src/v4/core/errors.ts +424 -0
  425. package/mcp/node_modules/zod/src/v4/core/function.ts +176 -0
  426. package/mcp/node_modules/zod/src/v4/core/index.ts +15 -0
  427. package/mcp/node_modules/zod/src/v4/core/json-schema.ts +143 -0
  428. package/mcp/node_modules/zod/src/v4/core/parse.ts +94 -0
  429. package/mcp/node_modules/zod/src/v4/core/regexes.ts +135 -0
  430. package/mcp/node_modules/zod/src/v4/core/registries.ts +96 -0
  431. package/mcp/node_modules/zod/src/v4/core/schemas.ts +3842 -0
  432. package/mcp/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
  433. package/mcp/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  434. package/mcp/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  435. package/mcp/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  436. package/mcp/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  437. package/mcp/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  438. package/mcp/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
  439. package/mcp/node_modules/zod/src/v4/core/util.ts +775 -0
  440. package/mcp/node_modules/zod/src/v4/core/versions.ts +5 -0
  441. package/mcp/node_modules/zod/src/v4/core/zsf.ts +323 -0
  442. package/mcp/node_modules/zod/src/v4/index.ts +4 -0
  443. package/mcp/node_modules/zod/src/v4/locales/ar.ts +125 -0
  444. package/mcp/node_modules/zod/src/v4/locales/az.ts +121 -0
  445. package/mcp/node_modules/zod/src/v4/locales/be.ts +184 -0
  446. package/mcp/node_modules/zod/src/v4/locales/ca.ts +127 -0
  447. package/mcp/node_modules/zod/src/v4/locales/cs.ts +142 -0
  448. package/mcp/node_modules/zod/src/v4/locales/de.ts +124 -0
  449. package/mcp/node_modules/zod/src/v4/locales/en.ts +127 -0
  450. package/mcp/node_modules/zod/src/v4/locales/eo.ts +125 -0
  451. package/mcp/node_modules/zod/src/v4/locales/es.ts +125 -0
  452. package/mcp/node_modules/zod/src/v4/locales/fa.ts +134 -0
  453. package/mcp/node_modules/zod/src/v4/locales/fi.ts +131 -0
  454. package/mcp/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
  455. package/mcp/node_modules/zod/src/v4/locales/fr.ts +124 -0
  456. package/mcp/node_modules/zod/src/v4/locales/he.ts +125 -0
  457. package/mcp/node_modules/zod/src/v4/locales/hu.ts +126 -0
  458. package/mcp/node_modules/zod/src/v4/locales/id.ts +125 -0
  459. package/mcp/node_modules/zod/src/v4/locales/index.ts +39 -0
  460. package/mcp/node_modules/zod/src/v4/locales/it.ts +125 -0
  461. package/mcp/node_modules/zod/src/v4/locales/ja.ts +122 -0
  462. package/mcp/node_modules/zod/src/v4/locales/kh.ts +126 -0
  463. package/mcp/node_modules/zod/src/v4/locales/ko.ts +131 -0
  464. package/mcp/node_modules/zod/src/v4/locales/mk.ts +127 -0
  465. package/mcp/node_modules/zod/src/v4/locales/ms.ts +124 -0
  466. package/mcp/node_modules/zod/src/v4/locales/nl.ts +126 -0
  467. package/mcp/node_modules/zod/src/v4/locales/no.ts +124 -0
  468. package/mcp/node_modules/zod/src/v4/locales/ota.ts +125 -0
  469. package/mcp/node_modules/zod/src/v4/locales/pl.ts +126 -0
  470. package/mcp/node_modules/zod/src/v4/locales/ps.ts +133 -0
  471. package/mcp/node_modules/zod/src/v4/locales/pt.ts +123 -0
  472. package/mcp/node_modules/zod/src/v4/locales/ru.ts +184 -0
  473. package/mcp/node_modules/zod/src/v4/locales/sl.ts +126 -0
  474. package/mcp/node_modules/zod/src/v4/locales/sv.ts +127 -0
  475. package/mcp/node_modules/zod/src/v4/locales/ta.ts +125 -0
  476. package/mcp/node_modules/zod/src/v4/locales/th.ts +126 -0
  477. package/mcp/node_modules/zod/src/v4/locales/tr.ts +121 -0
  478. package/mcp/node_modules/zod/src/v4/locales/ua.ts +126 -0
  479. package/mcp/node_modules/zod/src/v4/locales/ur.ts +126 -0
  480. package/mcp/node_modules/zod/src/v4/locales/vi.ts +125 -0
  481. package/mcp/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
  482. package/mcp/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
  483. package/mcp/node_modules/zod/src/v4/mini/checks.ts +32 -0
  484. package/mcp/node_modules/zod/src/v4/mini/coerce.ts +22 -0
  485. package/mcp/node_modules/zod/src/v4/mini/external.ts +40 -0
  486. package/mcp/node_modules/zod/src/v4/mini/index.ts +3 -0
  487. package/mcp/node_modules/zod/src/v4/mini/iso.ts +62 -0
  488. package/mcp/node_modules/zod/src/v4/mini/parse.ts +1 -0
  489. package/mcp/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
  490. package/mcp/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  491. package/mcp/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
  492. package/mcp/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  493. package/mcp/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  494. package/mcp/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  495. package/mcp/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
  496. package/mcp/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
  497. package/mcp/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  498. package/mcp/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
  499. package/mcp/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  500. package/mcp/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
  501. package/mcp/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
  502. package/mcp/node_modules/zod/src/v4-mini/index.ts +1 -0
  503. package/mcp/node_modules/zod/v3/ZodError.cjs +138 -0
  504. package/mcp/node_modules/zod/v3/ZodError.d.cts +164 -0
  505. package/mcp/node_modules/zod/v3/ZodError.d.ts +164 -0
  506. package/mcp/node_modules/zod/v3/ZodError.js +133 -0
  507. package/mcp/node_modules/zod/v3/errors.cjs +17 -0
  508. package/mcp/node_modules/zod/v3/errors.d.cts +5 -0
  509. package/mcp/node_modules/zod/v3/errors.d.ts +5 -0
  510. package/mcp/node_modules/zod/v3/errors.js +9 -0
  511. package/mcp/node_modules/zod/v3/external.cjs +22 -0
  512. package/mcp/node_modules/zod/v3/external.d.cts +6 -0
  513. package/mcp/node_modules/zod/v3/external.d.ts +6 -0
  514. package/mcp/node_modules/zod/v3/external.js +6 -0
  515. package/mcp/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  516. package/mcp/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  517. package/mcp/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  518. package/mcp/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  519. package/mcp/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  520. package/mcp/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  521. package/mcp/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  522. package/mcp/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  523. package/mcp/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  524. package/mcp/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  525. package/mcp/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  526. package/mcp/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  527. package/mcp/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  528. package/mcp/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  529. package/mcp/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  530. package/mcp/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  531. package/mcp/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  532. package/mcp/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  533. package/mcp/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  534. package/mcp/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  535. package/mcp/node_modules/zod/v3/helpers/util.cjs +137 -0
  536. package/mcp/node_modules/zod/v3/helpers/util.d.cts +85 -0
  537. package/mcp/node_modules/zod/v3/helpers/util.d.ts +85 -0
  538. package/mcp/node_modules/zod/v3/helpers/util.js +133 -0
  539. package/mcp/node_modules/zod/v3/index.cjs +33 -0
  540. package/mcp/node_modules/zod/v3/index.d.cts +4 -0
  541. package/mcp/node_modules/zod/v3/index.d.ts +4 -0
  542. package/mcp/node_modules/zod/v3/index.js +4 -0
  543. package/mcp/node_modules/zod/v3/locales/en.cjs +111 -0
  544. package/mcp/node_modules/zod/v3/locales/en.d.cts +3 -0
  545. package/mcp/node_modules/zod/v3/locales/en.d.ts +3 -0
  546. package/mcp/node_modules/zod/v3/locales/en.js +109 -0
  547. package/mcp/node_modules/zod/v3/standard-schema.cjs +2 -0
  548. package/mcp/node_modules/zod/v3/standard-schema.d.cts +102 -0
  549. package/mcp/node_modules/zod/v3/standard-schema.d.ts +102 -0
  550. package/mcp/node_modules/zod/v3/standard-schema.js +1 -0
  551. package/mcp/node_modules/zod/v3/types.cjs +3775 -0
  552. package/mcp/node_modules/zod/v3/types.d.cts +1031 -0
  553. package/mcp/node_modules/zod/v3/types.d.ts +1031 -0
  554. package/mcp/node_modules/zod/v3/types.js +3693 -0
  555. package/mcp/node_modules/zod/v4/classic/checks.cjs +32 -0
  556. package/mcp/node_modules/zod/v4/classic/checks.d.cts +1 -0
  557. package/mcp/node_modules/zod/v4/classic/checks.d.ts +1 -0
  558. package/mcp/node_modules/zod/v4/classic/checks.js +1 -0
  559. package/mcp/node_modules/zod/v4/classic/coerce.cjs +47 -0
  560. package/mcp/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  561. package/mcp/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  562. package/mcp/node_modules/zod/v4/classic/coerce.js +17 -0
  563. package/mcp/node_modules/zod/v4/classic/compat.cjs +57 -0
  564. package/mcp/node_modules/zod/v4/classic/compat.d.cts +46 -0
  565. package/mcp/node_modules/zod/v4/classic/compat.d.ts +46 -0
  566. package/mcp/node_modules/zod/v4/classic/compat.js +27 -0
  567. package/mcp/node_modules/zod/v4/classic/errors.cjs +67 -0
  568. package/mcp/node_modules/zod/v4/classic/errors.d.cts +30 -0
  569. package/mcp/node_modules/zod/v4/classic/errors.d.ts +30 -0
  570. package/mcp/node_modules/zod/v4/classic/errors.js +41 -0
  571. package/mcp/node_modules/zod/v4/classic/external.cjs +70 -0
  572. package/mcp/node_modules/zod/v4/classic/external.d.cts +13 -0
  573. package/mcp/node_modules/zod/v4/classic/external.d.ts +13 -0
  574. package/mcp/node_modules/zod/v4/classic/external.js +18 -0
  575. package/mcp/node_modules/zod/v4/classic/index.cjs +33 -0
  576. package/mcp/node_modules/zod/v4/classic/index.d.cts +4 -0
  577. package/mcp/node_modules/zod/v4/classic/index.d.ts +4 -0
  578. package/mcp/node_modules/zod/v4/classic/index.js +4 -0
  579. package/mcp/node_modules/zod/v4/classic/iso.cjs +60 -0
  580. package/mcp/node_modules/zod/v4/classic/iso.d.cts +22 -0
  581. package/mcp/node_modules/zod/v4/classic/iso.d.ts +22 -0
  582. package/mcp/node_modules/zod/v4/classic/iso.js +30 -0
  583. package/mcp/node_modules/zod/v4/classic/parse.cjs +32 -0
  584. package/mcp/node_modules/zod/v4/classic/parse.d.cts +23 -0
  585. package/mcp/node_modules/zod/v4/classic/parse.d.ts +23 -0
  586. package/mcp/node_modules/zod/v4/classic/parse.js +6 -0
  587. package/mcp/node_modules/zod/v4/classic/schemas.cjs +1109 -0
  588. package/mcp/node_modules/zod/v4/classic/schemas.d.cts +630 -0
  589. package/mcp/node_modules/zod/v4/classic/schemas.d.ts +630 -0
  590. package/mcp/node_modules/zod/v4/classic/schemas.js +1006 -0
  591. package/mcp/node_modules/zod/v4/core/api.cjs +1039 -0
  592. package/mcp/node_modules/zod/v4/core/api.d.cts +284 -0
  593. package/mcp/node_modules/zod/v4/core/api.d.ts +284 -0
  594. package/mcp/node_modules/zod/v4/core/api.js +906 -0
  595. package/mcp/node_modules/zod/v4/core/checks.cjs +591 -0
  596. package/mcp/node_modules/zod/v4/core/checks.d.cts +278 -0
  597. package/mcp/node_modules/zod/v4/core/checks.d.ts +278 -0
  598. package/mcp/node_modules/zod/v4/core/checks.js +565 -0
  599. package/mcp/node_modules/zod/v4/core/core.cjs +67 -0
  600. package/mcp/node_modules/zod/v4/core/core.d.cts +49 -0
  601. package/mcp/node_modules/zod/v4/core/core.d.ts +49 -0
  602. package/mcp/node_modules/zod/v4/core/core.js +61 -0
  603. package/mcp/node_modules/zod/v4/core/doc.cjs +39 -0
  604. package/mcp/node_modules/zod/v4/core/doc.d.cts +14 -0
  605. package/mcp/node_modules/zod/v4/core/doc.d.ts +14 -0
  606. package/mcp/node_modules/zod/v4/core/doc.js +35 -0
  607. package/mcp/node_modules/zod/v4/core/errors.cjs +226 -0
  608. package/mcp/node_modules/zod/v4/core/errors.d.cts +208 -0
  609. package/mcp/node_modules/zod/v4/core/errors.d.ts +208 -0
  610. package/mcp/node_modules/zod/v4/core/errors.js +195 -0
  611. package/mcp/node_modules/zod/v4/core/function.cjs +102 -0
  612. package/mcp/node_modules/zod/v4/core/function.d.cts +52 -0
  613. package/mcp/node_modules/zod/v4/core/function.d.ts +52 -0
  614. package/mcp/node_modules/zod/v4/core/function.js +75 -0
  615. package/mcp/node_modules/zod/v4/core/index.cjs +44 -0
  616. package/mcp/node_modules/zod/v4/core/index.d.cts +15 -0
  617. package/mcp/node_modules/zod/v4/core/index.d.ts +15 -0
  618. package/mcp/node_modules/zod/v4/core/index.js +15 -0
  619. package/mcp/node_modules/zod/v4/core/json-schema.cjs +2 -0
  620. package/mcp/node_modules/zod/v4/core/json-schema.d.cts +87 -0
  621. package/mcp/node_modules/zod/v4/core/json-schema.d.ts +87 -0
  622. package/mcp/node_modules/zod/v4/core/json-schema.js +1 -0
  623. package/mcp/node_modules/zod/v4/core/parse.cjs +87 -0
  624. package/mcp/node_modules/zod/v4/core/parse.d.cts +25 -0
  625. package/mcp/node_modules/zod/v4/core/parse.d.ts +25 -0
  626. package/mcp/node_modules/zod/v4/core/parse.js +57 -0
  627. package/mcp/node_modules/zod/v4/core/regexes.cjs +103 -0
  628. package/mcp/node_modules/zod/v4/core/regexes.d.cts +62 -0
  629. package/mcp/node_modules/zod/v4/core/regexes.d.ts +62 -0
  630. package/mcp/node_modules/zod/v4/core/regexes.js +95 -0
  631. package/mcp/node_modules/zod/v4/core/registries.cjs +56 -0
  632. package/mcp/node_modules/zod/v4/core/registries.d.cts +35 -0
  633. package/mcp/node_modules/zod/v4/core/registries.d.ts +35 -0
  634. package/mcp/node_modules/zod/v4/core/registries.js +51 -0
  635. package/mcp/node_modules/zod/v4/core/schemas.cjs +1748 -0
  636. package/mcp/node_modules/zod/v4/core/schemas.d.cts +1041 -0
  637. package/mcp/node_modules/zod/v4/core/schemas.d.ts +1041 -0
  638. package/mcp/node_modules/zod/v4/core/schemas.js +1717 -0
  639. package/mcp/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  640. package/mcp/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
  641. package/mcp/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
  642. package/mcp/node_modules/zod/v4/core/standard-schema.js +1 -0
  643. package/mcp/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
  644. package/mcp/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
  645. package/mcp/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
  646. package/mcp/node_modules/zod/v4/core/to-json-schema.js +849 -0
  647. package/mcp/node_modules/zod/v4/core/util.cjs +539 -0
  648. package/mcp/node_modules/zod/v4/core/util.d.cts +183 -0
  649. package/mcp/node_modules/zod/v4/core/util.d.ts +183 -0
  650. package/mcp/node_modules/zod/v4/core/util.js +493 -0
  651. package/mcp/node_modules/zod/v4/core/versions.cjs +8 -0
  652. package/mcp/node_modules/zod/v4/core/versions.d.cts +5 -0
  653. package/mcp/node_modules/zod/v4/core/versions.d.ts +5 -0
  654. package/mcp/node_modules/zod/v4/core/versions.js +5 -0
  655. package/mcp/node_modules/zod/v4/index.cjs +22 -0
  656. package/mcp/node_modules/zod/v4/index.d.cts +3 -0
  657. package/mcp/node_modules/zod/v4/index.d.ts +3 -0
  658. package/mcp/node_modules/zod/v4/index.js +3 -0
  659. package/mcp/node_modules/zod/v4/locales/ar.cjs +142 -0
  660. package/mcp/node_modules/zod/v4/locales/ar.d.cts +4 -0
  661. package/mcp/node_modules/zod/v4/locales/ar.d.ts +4 -0
  662. package/mcp/node_modules/zod/v4/locales/ar.js +116 -0
  663. package/mcp/node_modules/zod/v4/locales/az.cjs +141 -0
  664. package/mcp/node_modules/zod/v4/locales/az.d.cts +4 -0
  665. package/mcp/node_modules/zod/v4/locales/az.d.ts +4 -0
  666. package/mcp/node_modules/zod/v4/locales/az.js +115 -0
  667. package/mcp/node_modules/zod/v4/locales/be.cjs +190 -0
  668. package/mcp/node_modules/zod/v4/locales/be.d.cts +4 -0
  669. package/mcp/node_modules/zod/v4/locales/be.d.ts +4 -0
  670. package/mcp/node_modules/zod/v4/locales/be.js +164 -0
  671. package/mcp/node_modules/zod/v4/locales/ca.cjs +144 -0
  672. package/mcp/node_modules/zod/v4/locales/ca.d.cts +4 -0
  673. package/mcp/node_modules/zod/v4/locales/ca.d.ts +4 -0
  674. package/mcp/node_modules/zod/v4/locales/ca.js +118 -0
  675. package/mcp/node_modules/zod/v4/locales/cs.cjs +161 -0
  676. package/mcp/node_modules/zod/v4/locales/cs.d.cts +4 -0
  677. package/mcp/node_modules/zod/v4/locales/cs.d.ts +4 -0
  678. package/mcp/node_modules/zod/v4/locales/cs.js +135 -0
  679. package/mcp/node_modules/zod/v4/locales/de.cjs +142 -0
  680. package/mcp/node_modules/zod/v4/locales/de.d.cts +4 -0
  681. package/mcp/node_modules/zod/v4/locales/de.d.ts +4 -0
  682. package/mcp/node_modules/zod/v4/locales/de.js +116 -0
  683. package/mcp/node_modules/zod/v4/locales/en.cjs +145 -0
  684. package/mcp/node_modules/zod/v4/locales/en.d.cts +5 -0
  685. package/mcp/node_modules/zod/v4/locales/en.d.ts +5 -0
  686. package/mcp/node_modules/zod/v4/locales/en.js +117 -0
  687. package/mcp/node_modules/zod/v4/locales/eo.cjs +144 -0
  688. package/mcp/node_modules/zod/v4/locales/eo.d.cts +5 -0
  689. package/mcp/node_modules/zod/v4/locales/eo.d.ts +5 -0
  690. package/mcp/node_modules/zod/v4/locales/eo.js +116 -0
  691. package/mcp/node_modules/zod/v4/locales/es.cjs +143 -0
  692. package/mcp/node_modules/zod/v4/locales/es.d.cts +4 -0
  693. package/mcp/node_modules/zod/v4/locales/es.d.ts +4 -0
  694. package/mcp/node_modules/zod/v4/locales/es.js +117 -0
  695. package/mcp/node_modules/zod/v4/locales/fa.cjs +148 -0
  696. package/mcp/node_modules/zod/v4/locales/fa.d.cts +4 -0
  697. package/mcp/node_modules/zod/v4/locales/fa.d.ts +4 -0
  698. package/mcp/node_modules/zod/v4/locales/fa.js +122 -0
  699. package/mcp/node_modules/zod/v4/locales/fi.cjs +148 -0
  700. package/mcp/node_modules/zod/v4/locales/fi.d.cts +4 -0
  701. package/mcp/node_modules/zod/v4/locales/fi.d.ts +4 -0
  702. package/mcp/node_modules/zod/v4/locales/fi.js +122 -0
  703. package/mcp/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
  704. package/mcp/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
  705. package/mcp/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  706. package/mcp/node_modules/zod/v4/locales/fr-CA.js +117 -0
  707. package/mcp/node_modules/zod/v4/locales/fr.cjs +142 -0
  708. package/mcp/node_modules/zod/v4/locales/fr.d.cts +4 -0
  709. package/mcp/node_modules/zod/v4/locales/fr.d.ts +4 -0
  710. package/mcp/node_modules/zod/v4/locales/fr.js +116 -0
  711. package/mcp/node_modules/zod/v4/locales/he.cjs +143 -0
  712. package/mcp/node_modules/zod/v4/locales/he.d.cts +4 -0
  713. package/mcp/node_modules/zod/v4/locales/he.d.ts +4 -0
  714. package/mcp/node_modules/zod/v4/locales/he.js +117 -0
  715. package/mcp/node_modules/zod/v4/locales/hu.cjs +143 -0
  716. package/mcp/node_modules/zod/v4/locales/hu.d.cts +4 -0
  717. package/mcp/node_modules/zod/v4/locales/hu.d.ts +4 -0
  718. package/mcp/node_modules/zod/v4/locales/hu.js +117 -0
  719. package/mcp/node_modules/zod/v4/locales/id.cjs +142 -0
  720. package/mcp/node_modules/zod/v4/locales/id.d.cts +4 -0
  721. package/mcp/node_modules/zod/v4/locales/id.d.ts +4 -0
  722. package/mcp/node_modules/zod/v4/locales/id.js +116 -0
  723. package/mcp/node_modules/zod/v4/locales/index.cjs +84 -0
  724. package/mcp/node_modules/zod/v4/locales/index.d.cts +39 -0
  725. package/mcp/node_modules/zod/v4/locales/index.d.ts +39 -0
  726. package/mcp/node_modules/zod/v4/locales/index.js +39 -0
  727. package/mcp/node_modules/zod/v4/locales/it.cjs +143 -0
  728. package/mcp/node_modules/zod/v4/locales/it.d.cts +4 -0
  729. package/mcp/node_modules/zod/v4/locales/it.d.ts +4 -0
  730. package/mcp/node_modules/zod/v4/locales/it.js +117 -0
  731. package/mcp/node_modules/zod/v4/locales/ja.cjs +141 -0
  732. package/mcp/node_modules/zod/v4/locales/ja.d.cts +4 -0
  733. package/mcp/node_modules/zod/v4/locales/ja.d.ts +4 -0
  734. package/mcp/node_modules/zod/v4/locales/ja.js +115 -0
  735. package/mcp/node_modules/zod/v4/locales/kh.cjs +143 -0
  736. package/mcp/node_modules/zod/v4/locales/kh.d.cts +4 -0
  737. package/mcp/node_modules/zod/v4/locales/kh.d.ts +4 -0
  738. package/mcp/node_modules/zod/v4/locales/kh.js +117 -0
  739. package/mcp/node_modules/zod/v4/locales/ko.cjs +147 -0
  740. package/mcp/node_modules/zod/v4/locales/ko.d.cts +4 -0
  741. package/mcp/node_modules/zod/v4/locales/ko.d.ts +4 -0
  742. package/mcp/node_modules/zod/v4/locales/ko.js +121 -0
  743. package/mcp/node_modules/zod/v4/locales/mk.cjs +144 -0
  744. package/mcp/node_modules/zod/v4/locales/mk.d.cts +4 -0
  745. package/mcp/node_modules/zod/v4/locales/mk.d.ts +4 -0
  746. package/mcp/node_modules/zod/v4/locales/mk.js +118 -0
  747. package/mcp/node_modules/zod/v4/locales/ms.cjs +142 -0
  748. package/mcp/node_modules/zod/v4/locales/ms.d.cts +4 -0
  749. package/mcp/node_modules/zod/v4/locales/ms.d.ts +4 -0
  750. package/mcp/node_modules/zod/v4/locales/ms.js +116 -0
  751. package/mcp/node_modules/zod/v4/locales/nl.cjs +143 -0
  752. package/mcp/node_modules/zod/v4/locales/nl.d.cts +4 -0
  753. package/mcp/node_modules/zod/v4/locales/nl.d.ts +4 -0
  754. package/mcp/node_modules/zod/v4/locales/nl.js +117 -0
  755. package/mcp/node_modules/zod/v4/locales/no.cjs +142 -0
  756. package/mcp/node_modules/zod/v4/locales/no.d.cts +4 -0
  757. package/mcp/node_modules/zod/v4/locales/no.d.ts +4 -0
  758. package/mcp/node_modules/zod/v4/locales/no.js +116 -0
  759. package/mcp/node_modules/zod/v4/locales/ota.cjs +143 -0
  760. package/mcp/node_modules/zod/v4/locales/ota.d.cts +4 -0
  761. package/mcp/node_modules/zod/v4/locales/ota.d.ts +4 -0
  762. package/mcp/node_modules/zod/v4/locales/ota.js +117 -0
  763. package/mcp/node_modules/zod/v4/locales/pl.cjs +143 -0
  764. package/mcp/node_modules/zod/v4/locales/pl.d.cts +4 -0
  765. package/mcp/node_modules/zod/v4/locales/pl.d.ts +4 -0
  766. package/mcp/node_modules/zod/v4/locales/pl.js +117 -0
  767. package/mcp/node_modules/zod/v4/locales/ps.cjs +148 -0
  768. package/mcp/node_modules/zod/v4/locales/ps.d.cts +4 -0
  769. package/mcp/node_modules/zod/v4/locales/ps.d.ts +4 -0
  770. package/mcp/node_modules/zod/v4/locales/ps.js +122 -0
  771. package/mcp/node_modules/zod/v4/locales/pt.cjs +142 -0
  772. package/mcp/node_modules/zod/v4/locales/pt.d.cts +4 -0
  773. package/mcp/node_modules/zod/v4/locales/pt.d.ts +4 -0
  774. package/mcp/node_modules/zod/v4/locales/pt.js +116 -0
  775. package/mcp/node_modules/zod/v4/locales/ru.cjs +190 -0
  776. package/mcp/node_modules/zod/v4/locales/ru.d.cts +4 -0
  777. package/mcp/node_modules/zod/v4/locales/ru.d.ts +4 -0
  778. package/mcp/node_modules/zod/v4/locales/ru.js +164 -0
  779. package/mcp/node_modules/zod/v4/locales/sl.cjs +143 -0
  780. package/mcp/node_modules/zod/v4/locales/sl.d.cts +4 -0
  781. package/mcp/node_modules/zod/v4/locales/sl.d.ts +4 -0
  782. package/mcp/node_modules/zod/v4/locales/sl.js +117 -0
  783. package/mcp/node_modules/zod/v4/locales/sv.cjs +144 -0
  784. package/mcp/node_modules/zod/v4/locales/sv.d.cts +4 -0
  785. package/mcp/node_modules/zod/v4/locales/sv.d.ts +4 -0
  786. package/mcp/node_modules/zod/v4/locales/sv.js +118 -0
  787. package/mcp/node_modules/zod/v4/locales/ta.cjs +143 -0
  788. package/mcp/node_modules/zod/v4/locales/ta.d.cts +4 -0
  789. package/mcp/node_modules/zod/v4/locales/ta.d.ts +4 -0
  790. package/mcp/node_modules/zod/v4/locales/ta.js +117 -0
  791. package/mcp/node_modules/zod/v4/locales/th.cjs +143 -0
  792. package/mcp/node_modules/zod/v4/locales/th.d.cts +4 -0
  793. package/mcp/node_modules/zod/v4/locales/th.d.ts +4 -0
  794. package/mcp/node_modules/zod/v4/locales/th.js +117 -0
  795. package/mcp/node_modules/zod/v4/locales/tr.cjs +143 -0
  796. package/mcp/node_modules/zod/v4/locales/tr.d.cts +5 -0
  797. package/mcp/node_modules/zod/v4/locales/tr.d.ts +5 -0
  798. package/mcp/node_modules/zod/v4/locales/tr.js +115 -0
  799. package/mcp/node_modules/zod/v4/locales/ua.cjs +143 -0
  800. package/mcp/node_modules/zod/v4/locales/ua.d.cts +4 -0
  801. package/mcp/node_modules/zod/v4/locales/ua.d.ts +4 -0
  802. package/mcp/node_modules/zod/v4/locales/ua.js +117 -0
  803. package/mcp/node_modules/zod/v4/locales/ur.cjs +143 -0
  804. package/mcp/node_modules/zod/v4/locales/ur.d.cts +4 -0
  805. package/mcp/node_modules/zod/v4/locales/ur.d.ts +4 -0
  806. package/mcp/node_modules/zod/v4/locales/ur.js +117 -0
  807. package/mcp/node_modules/zod/v4/locales/vi.cjs +142 -0
  808. package/mcp/node_modules/zod/v4/locales/vi.d.cts +4 -0
  809. package/mcp/node_modules/zod/v4/locales/vi.d.ts +4 -0
  810. package/mcp/node_modules/zod/v4/locales/vi.js +116 -0
  811. package/mcp/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
  812. package/mcp/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
  813. package/mcp/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  814. package/mcp/node_modules/zod/v4/locales/zh-CN.js +116 -0
  815. package/mcp/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
  816. package/mcp/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
  817. package/mcp/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  818. package/mcp/node_modules/zod/v4/locales/zh-TW.js +117 -0
  819. package/mcp/node_modules/zod/v4/mini/checks.cjs +34 -0
  820. package/mcp/node_modules/zod/v4/mini/checks.d.cts +1 -0
  821. package/mcp/node_modules/zod/v4/mini/checks.d.ts +1 -0
  822. package/mcp/node_modules/zod/v4/mini/checks.js +1 -0
  823. package/mcp/node_modules/zod/v4/mini/coerce.cjs +47 -0
  824. package/mcp/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  825. package/mcp/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  826. package/mcp/node_modules/zod/v4/mini/coerce.js +17 -0
  827. package/mcp/node_modules/zod/v4/mini/external.cjs +62 -0
  828. package/mcp/node_modules/zod/v4/mini/external.d.cts +11 -0
  829. package/mcp/node_modules/zod/v4/mini/external.d.ts +11 -0
  830. package/mcp/node_modules/zod/v4/mini/external.js +13 -0
  831. package/mcp/node_modules/zod/v4/mini/index.cjs +32 -0
  832. package/mcp/node_modules/zod/v4/mini/index.d.cts +3 -0
  833. package/mcp/node_modules/zod/v4/mini/index.d.ts +3 -0
  834. package/mcp/node_modules/zod/v4/mini/index.js +3 -0
  835. package/mcp/node_modules/zod/v4/mini/iso.cjs +60 -0
  836. package/mcp/node_modules/zod/v4/mini/iso.d.cts +22 -0
  837. package/mcp/node_modules/zod/v4/mini/iso.d.ts +22 -0
  838. package/mcp/node_modules/zod/v4/mini/iso.js +30 -0
  839. package/mcp/node_modules/zod/v4/mini/parse.cjs +8 -0
  840. package/mcp/node_modules/zod/v4/mini/parse.d.cts +1 -0
  841. package/mcp/node_modules/zod/v4/mini/parse.d.ts +1 -0
  842. package/mcp/node_modules/zod/v4/mini/parse.js +1 -0
  843. package/mcp/node_modules/zod/v4/mini/schemas.cjs +839 -0
  844. package/mcp/node_modules/zod/v4/mini/schemas.d.cts +356 -0
  845. package/mcp/node_modules/zod/v4/mini/schemas.d.ts +356 -0
  846. package/mcp/node_modules/zod/v4/mini/schemas.js +732 -0
  847. package/mcp/node_modules/zod/v4-mini/index.cjs +17 -0
  848. package/mcp/node_modules/zod/v4-mini/index.d.cts +1 -0
  849. package/mcp/node_modules/zod/v4-mini/index.d.ts +1 -0
  850. package/mcp/node_modules/zod/v4-mini/index.js +1 -0
  851. package/mcp/package-lock.json +155 -0
  852. package/mcp/package.json +17 -0
  853. package/mcp/requirements.txt +1 -0
  854. package/mcp/src/__pycache__/server.cpython-312.pyc +0 -0
  855. package/mcp/src/__pycache__/server_core.cpython-312.pyc +0 -0
  856. package/mcp/src/server.js +208 -0
  857. package/mcp/src/server_core.js +244 -0
  858. package/mcp/src/server_core.js.jinja2 +202 -0
  859. package/mcp/src/test_server.js +33 -0
  860. package/mcp/test/__pycache__/test_server.cpython-312-pytest-8.4.1.pyc +0 -0
  861. package/mcp/test/__pycache__/test_server.cpython-312.pyc +0 -0
  862. package/mcp/test/test_server.py +398 -0
  863. package/package.json +5 -3
  864. package/skills/aipk_design/GURU_AI.md +5 -5
  865. package/skills/aipk_development/GURU_AI.md +3 -3
  866. package/skills/aipk_init_project/GURU_AI.md +10 -0
  867. package/skills/aipk_init_project/SKILL.md +69 -43
  868. package/skills/aipk_init_project/scripts/check_agents.sh +2 -3
  869. package/skills/aipk_init_project/template/AGENTS_TEMPLATE.md +19 -76
  870. package/skills/aipk_init_project/template/AGENTS_TEMPLATE_MCP.md +73 -0
  871. package/skills/aipk_operations/GURU_AI.md +5 -5
  872. package/skills/aipk_requirements/GURU_AI.md +34 -34
  873. package/skills/aipk_skill_generate/GURU_AI.md +3 -3
  874. package/skills/aipk_tool_prompts/GURU_AI.md +8 -8
@@ -0,0 +1,1788 @@
1
+ # MCP Python SDK
2
+
3
+ <div align="center">
4
+
5
+ <strong>Python implementation of the Model Context Protocol (MCP)</strong>
6
+
7
+ [![PyPI][pypi-badge]][pypi-url]
8
+ [![MIT licensed][mit-badge]][mit-url]
9
+ [![Python Version][python-badge]][python-url]
10
+ [![Documentation][docs-badge]][docs-url]
11
+ [![Specification][spec-badge]][spec-url]
12
+ [![GitHub Discussions][discussions-badge]][discussions-url]
13
+
14
+ </div>
15
+
16
+ <!-- omit in toc -->
17
+ ## Table of Contents
18
+
19
+ - [MCP Python SDK](#mcp-python-sdk)
20
+ - [Overview](#overview)
21
+ - [Installation](#installation)
22
+ - [Adding MCP to your python project](#adding-mcp-to-your-python-project)
23
+ - [Running the standalone MCP development tools](#running-the-standalone-mcp-development-tools)
24
+ - [Quickstart](#quickstart)
25
+ - [What is MCP?](#what-is-mcp)
26
+ - [Core Concepts](#core-concepts)
27
+ - [Server](#server)
28
+ - [Resources](#resources)
29
+ - [Tools](#tools)
30
+ - [Structured Output](#structured-output)
31
+ - [Prompts](#prompts)
32
+ - [Images](#images)
33
+ - [Context](#context)
34
+ - [Completions](#completions)
35
+ - [Elicitation](#elicitation)
36
+ - [Sampling](#sampling)
37
+ - [Logging and Notifications](#logging-and-notifications)
38
+ - [Authentication](#authentication)
39
+ - [Running Your Server](#running-your-server)
40
+ - [Development Mode](#development-mode)
41
+ - [Claude Desktop Integration](#claude-desktop-integration)
42
+ - [Direct Execution](#direct-execution)
43
+ - [Mounting to an Existing ASGI Server](#mounting-to-an-existing-asgi-server)
44
+ - [Advanced Usage](#advanced-usage)
45
+ - [Low-Level Server](#low-level-server)
46
+ - [Writing MCP Clients](#writing-mcp-clients)
47
+ - [Parsing Tool Results](#parsing-tool-results)
48
+ - [MCP Primitives](#mcp-primitives)
49
+ - [Server Capabilities](#server-capabilities)
50
+ - [Documentation](#documentation)
51
+ - [Contributing](#contributing)
52
+ - [License](#license)
53
+
54
+ [pypi-badge]: https://img.shields.io/pypi/v/mcp.svg
55
+ [pypi-url]: https://pypi.org/project/mcp/
56
+ [mit-badge]: https://img.shields.io/pypi/l/mcp.svg
57
+ [mit-url]: https://github.com/modelcontextprotocol/python-sdk/blob/main/LICENSE
58
+ [python-badge]: https://img.shields.io/pypi/pyversions/mcp.svg
59
+ [python-url]: https://www.python.org/downloads/
60
+ [docs-badge]: https://img.shields.io/badge/docs-modelcontextprotocol.io-blue.svg
61
+ [docs-url]: https://modelcontextprotocol.io
62
+ [spec-badge]: https://img.shields.io/badge/spec-spec.modelcontextprotocol.io-blue.svg
63
+ [spec-url]: https://spec.modelcontextprotocol.io
64
+ [discussions-badge]: https://img.shields.io/github/discussions/modelcontextprotocol/python-sdk
65
+ [discussions-url]: https://github.com/modelcontextprotocol/python-sdk/discussions
66
+
67
+ ## Overview
68
+
69
+ The Model Context Protocol allows applications to provide context for LLMs in a standardized way, separating the concerns of providing context from the actual LLM interaction. This Python SDK implements the full MCP specification, making it easy to:
70
+
71
+ - Build MCP clients that can connect to any MCP server
72
+ - Create MCP servers that expose resources, prompts and tools
73
+ - Use standard transports like stdio, SSE, and Streamable HTTP
74
+ - Handle all MCP protocol messages and lifecycle events
75
+
76
+ ## Installation
77
+
78
+ ### Adding MCP to your python project
79
+
80
+ We recommend using [uv](https://docs.astral.sh/uv/) to manage your Python projects.
81
+
82
+ If you haven't created a uv-managed project yet, create one:
83
+
84
+ ```bash
85
+ uv init mcp-server-demo
86
+ cd mcp-server-demo
87
+ ```
88
+
89
+ Then add MCP to your project dependencies:
90
+
91
+ ```bash
92
+ uv add "mcp[cli]"
93
+ ```
94
+
95
+ Alternatively, for projects using pip for dependencies:
96
+
97
+ ```bash
98
+ pip install "mcp[cli]"
99
+ ```
100
+
101
+ ### Running the standalone MCP development tools
102
+
103
+ To run the mcp command with uv:
104
+
105
+ ```bash
106
+ uv run mcp
107
+ ```
108
+
109
+ ## Quickstart
110
+
111
+ Let's create a simple MCP server that exposes a calculator tool and some data:
112
+
113
+ <!-- snippet-source examples/snippets/servers/fastmcp_quickstart.py -->
114
+ ```python
115
+ """
116
+ FastMCP quickstart example.
117
+
118
+ cd to the `examples/snippets/clients` directory and run:
119
+ uv run server fastmcp_quickstart stdio
120
+ """
121
+
122
+ from mcp.server.fastmcp import FastMCP
123
+
124
+ # Create an MCP server
125
+ mcp = FastMCP("Demo")
126
+
127
+
128
+ # Add an addition tool
129
+ @mcp.tool()
130
+ def add(a: int, b: int) -> int:
131
+ """Add two numbers"""
132
+ return a + b
133
+
134
+
135
+ # Add a dynamic greeting resource
136
+ @mcp.resource("greeting://{name}")
137
+ def get_greeting(name: str) -> str:
138
+ """Get a personalized greeting"""
139
+ return f"Hello, {name}!"
140
+
141
+
142
+ # Add a prompt
143
+ @mcp.prompt()
144
+ def greet_user(name: str, style: str = "friendly") -> str:
145
+ """Generate a greeting prompt"""
146
+ styles = {
147
+ "friendly": "Please write a warm, friendly greeting",
148
+ "formal": "Please write a formal, professional greeting",
149
+ "casual": "Please write a casual, relaxed greeting",
150
+ }
151
+
152
+ return f"{styles.get(style, styles['friendly'])} for someone named {name}."
153
+ ```
154
+
155
+ _Full example: [examples/snippets/servers/fastmcp_quickstart.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/fastmcp_quickstart.py)_
156
+ <!-- /snippet-source -->
157
+
158
+ You can install this server in [Claude Desktop](https://claude.ai/download) and interact with it right away by running:
159
+
160
+ ```bash
161
+ uv run mcp install server.py
162
+ ```
163
+
164
+ Alternatively, you can test it with the MCP Inspector:
165
+
166
+ ```bash
167
+ uv run mcp dev server.py
168
+ ```
169
+
170
+ ## What is MCP?
171
+
172
+ The [Model Context Protocol (MCP)](https://modelcontextprotocol.io) lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. Think of it like a web API, but specifically designed for LLM interactions. MCP servers can:
173
+
174
+ - Expose data through **Resources** (think of these sort of like GET endpoints; they are used to load information into the LLM's context)
175
+ - Provide functionality through **Tools** (sort of like POST endpoints; they are used to execute code or otherwise produce a side effect)
176
+ - Define interaction patterns through **Prompts** (reusable templates for LLM interactions)
177
+ - And more!
178
+
179
+ ## Core Concepts
180
+
181
+ ### Server
182
+
183
+ The FastMCP server is your core interface to the MCP protocol. It handles connection management, protocol compliance, and message routing:
184
+
185
+ <!-- snippet-source examples/snippets/servers/lifespan_example.py -->
186
+ ```python
187
+ """Example showing lifespan support for startup/shutdown with strong typing."""
188
+
189
+ from collections.abc import AsyncIterator
190
+ from contextlib import asynccontextmanager
191
+ from dataclasses import dataclass
192
+
193
+ from mcp.server.fastmcp import Context, FastMCP
194
+
195
+
196
+ # Mock database class for example
197
+ class Database:
198
+ """Mock database class for example."""
199
+
200
+ @classmethod
201
+ async def connect(cls) -> "Database":
202
+ """Connect to database."""
203
+ return cls()
204
+
205
+ async def disconnect(self) -> None:
206
+ """Disconnect from database."""
207
+ pass
208
+
209
+ def query(self) -> str:
210
+ """Execute a query."""
211
+ return "Query result"
212
+
213
+
214
+ @dataclass
215
+ class AppContext:
216
+ """Application context with typed dependencies."""
217
+
218
+ db: Database
219
+
220
+
221
+ @asynccontextmanager
222
+ async def app_lifespan(server: FastMCP) -> AsyncIterator[AppContext]:
223
+ """Manage application lifecycle with type-safe context."""
224
+ # Initialize on startup
225
+ db = await Database.connect()
226
+ try:
227
+ yield AppContext(db=db)
228
+ finally:
229
+ # Cleanup on shutdown
230
+ await db.disconnect()
231
+
232
+
233
+ # Pass lifespan to server
234
+ mcp = FastMCP("My App", lifespan=app_lifespan)
235
+
236
+
237
+ # Access type-safe lifespan context in tools
238
+ @mcp.tool()
239
+ def query_db(ctx: Context) -> str:
240
+ """Tool that uses initialized resources."""
241
+ db = ctx.request_context.lifespan_context.db
242
+ return db.query()
243
+ ```
244
+
245
+ _Full example: [examples/snippets/servers/lifespan_example.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/lifespan_example.py)_
246
+ <!-- /snippet-source -->
247
+
248
+ ### Resources
249
+
250
+ Resources are how you expose data to LLMs. They're similar to GET endpoints in a REST API - they provide data but shouldn't perform significant computation or have side effects:
251
+
252
+ <!-- snippet-source examples/snippets/servers/basic_resource.py -->
253
+ ```python
254
+ from mcp.server.fastmcp import FastMCP
255
+
256
+ mcp = FastMCP(name="Resource Example")
257
+
258
+
259
+ @mcp.resource("file://documents/{name}")
260
+ def read_document(name: str) -> str:
261
+ """Read a document by name."""
262
+ # This would normally read from disk
263
+ return f"Content of {name}"
264
+
265
+
266
+ @mcp.resource("config://settings")
267
+ def get_settings() -> str:
268
+ """Get application settings."""
269
+ return """{
270
+ "theme": "dark",
271
+ "language": "en",
272
+ "debug": false
273
+ }"""
274
+ ```
275
+
276
+ _Full example: [examples/snippets/servers/basic_resource.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/basic_resource.py)_
277
+ <!-- /snippet-source -->
278
+
279
+ ### Tools
280
+
281
+ Tools let LLMs take actions through your server. Unlike resources, tools are expected to perform computation and have side effects:
282
+
283
+ <!-- snippet-source examples/snippets/servers/basic_tool.py -->
284
+ ```python
285
+ from mcp.server.fastmcp import FastMCP
286
+
287
+ mcp = FastMCP(name="Tool Example")
288
+
289
+
290
+ @mcp.tool()
291
+ def sum(a: int, b: int) -> int:
292
+ """Add two numbers together."""
293
+ return a + b
294
+
295
+
296
+ @mcp.tool()
297
+ def get_weather(city: str, unit: str = "celsius") -> str:
298
+ """Get weather for a city."""
299
+ # This would normally call a weather API
300
+ return f"Weather in {city}: 22degrees{unit[0].upper()}"
301
+ ```
302
+
303
+ _Full example: [examples/snippets/servers/basic_tool.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/basic_tool.py)_
304
+ <!-- /snippet-source -->
305
+
306
+ #### Structured Output
307
+
308
+ Tools will return structured results by default, if their return type
309
+ annotation is compatible. Otherwise, they will return unstructured results.
310
+
311
+ Structured output supports these return types:
312
+
313
+ - Pydantic models (BaseModel subclasses)
314
+ - TypedDicts
315
+ - Dataclasses and other classes with type hints
316
+ - `dict[str, T]` (where T is any JSON-serializable type)
317
+ - Primitive types (str, int, float, bool, bytes, None) - wrapped in `{"result": value}`
318
+ - Generic types (list, tuple, Union, Optional, etc.) - wrapped in `{"result": value}`
319
+
320
+ Classes without type hints cannot be serialized for structured output. Only
321
+ classes with properly annotated attributes will be converted to Pydantic models
322
+ for schema generation and validation.
323
+
324
+ Structured results are automatically validated against the output schema
325
+ generated from the annotation. This ensures the tool returns well-typed,
326
+ validated data that clients can easily process.
327
+
328
+ **Note:** For backward compatibility, unstructured results are also
329
+ returned. Unstructured results are provided for backward compatibility
330
+ with previous versions of the MCP specification, and are quirks-compatible
331
+ with previous versions of FastMCP in the current version of the SDK.
332
+
333
+ **Note:** In cases where a tool function's return type annotation
334
+ causes the tool to be classified as structured _and this is undesirable_,
335
+ the classification can be suppressed by passing `structured_output=False`
336
+ to the `@tool` decorator.
337
+
338
+ <!-- snippet-source examples/snippets/servers/structured_output.py -->
339
+ ```python
340
+ """Example showing structured output with tools."""
341
+
342
+ from typing import TypedDict
343
+
344
+ from pydantic import BaseModel, Field
345
+
346
+ from mcp.server.fastmcp import FastMCP
347
+
348
+ mcp = FastMCP("Structured Output Example")
349
+
350
+
351
+ # Using Pydantic models for rich structured data
352
+ class WeatherData(BaseModel):
353
+ """Weather information structure."""
354
+
355
+ temperature: float = Field(description="Temperature in Celsius")
356
+ humidity: float = Field(description="Humidity percentage")
357
+ condition: str
358
+ wind_speed: float
359
+
360
+
361
+ @mcp.tool()
362
+ def get_weather(city: str) -> WeatherData:
363
+ """Get weather for a city - returns structured data."""
364
+ # Simulated weather data
365
+ return WeatherData(
366
+ temperature=72.5,
367
+ humidity=45.0,
368
+ condition="sunny",
369
+ wind_speed=5.2,
370
+ )
371
+
372
+
373
+ # Using TypedDict for simpler structures
374
+ class LocationInfo(TypedDict):
375
+ latitude: float
376
+ longitude: float
377
+ name: str
378
+
379
+
380
+ @mcp.tool()
381
+ def get_location(address: str) -> LocationInfo:
382
+ """Get location coordinates"""
383
+ return LocationInfo(latitude=51.5074, longitude=-0.1278, name="London, UK")
384
+
385
+
386
+ # Using dict[str, Any] for flexible schemas
387
+ @mcp.tool()
388
+ def get_statistics(data_type: str) -> dict[str, float]:
389
+ """Get various statistics"""
390
+ return {"mean": 42.5, "median": 40.0, "std_dev": 5.2}
391
+
392
+
393
+ # Ordinary classes with type hints work for structured output
394
+ class UserProfile:
395
+ name: str
396
+ age: int
397
+ email: str | None = None
398
+
399
+ def __init__(self, name: str, age: int, email: str | None = None):
400
+ self.name = name
401
+ self.age = age
402
+ self.email = email
403
+
404
+
405
+ @mcp.tool()
406
+ def get_user(user_id: str) -> UserProfile:
407
+ """Get user profile - returns structured data"""
408
+ return UserProfile(name="Alice", age=30, email="alice@example.com")
409
+
410
+
411
+ # Classes WITHOUT type hints cannot be used for structured output
412
+ class UntypedConfig:
413
+ def __init__(self, setting1, setting2):
414
+ self.setting1 = setting1
415
+ self.setting2 = setting2
416
+
417
+
418
+ @mcp.tool()
419
+ def get_config() -> UntypedConfig:
420
+ """This returns unstructured output - no schema generated"""
421
+ return UntypedConfig("value1", "value2")
422
+
423
+
424
+ # Lists and other types are wrapped automatically
425
+ @mcp.tool()
426
+ def list_cities() -> list[str]:
427
+ """Get a list of cities"""
428
+ return ["London", "Paris", "Tokyo"]
429
+ # Returns: {"result": ["London", "Paris", "Tokyo"]}
430
+
431
+
432
+ @mcp.tool()
433
+ def get_temperature(city: str) -> float:
434
+ """Get temperature as a simple float"""
435
+ return 22.5
436
+ # Returns: {"result": 22.5}
437
+ ```
438
+
439
+ _Full example: [examples/snippets/servers/structured_output.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/structured_output.py)_
440
+ <!-- /snippet-source -->
441
+
442
+ ### Prompts
443
+
444
+ Prompts are reusable templates that help LLMs interact with your server effectively:
445
+
446
+ <!-- snippet-source examples/snippets/servers/basic_prompt.py -->
447
+ ```python
448
+ from mcp.server.fastmcp import FastMCP
449
+ from mcp.server.fastmcp.prompts import base
450
+
451
+ mcp = FastMCP(name="Prompt Example")
452
+
453
+
454
+ @mcp.prompt(title="Code Review")
455
+ def review_code(code: str) -> str:
456
+ return f"Please review this code:\n\n{code}"
457
+
458
+
459
+ @mcp.prompt(title="Debug Assistant")
460
+ def debug_error(error: str) -> list[base.Message]:
461
+ return [
462
+ base.UserMessage("I'm seeing this error:"),
463
+ base.UserMessage(error),
464
+ base.AssistantMessage("I'll help debug that. What have you tried so far?"),
465
+ ]
466
+ ```
467
+
468
+ _Full example: [examples/snippets/servers/basic_prompt.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/basic_prompt.py)_
469
+ <!-- /snippet-source -->
470
+
471
+ ### Images
472
+
473
+ FastMCP provides an `Image` class that automatically handles image data:
474
+
475
+ <!-- snippet-source examples/snippets/servers/images.py -->
476
+ ```python
477
+ """Example showing image handling with FastMCP."""
478
+
479
+ from PIL import Image as PILImage
480
+
481
+ from mcp.server.fastmcp import FastMCP, Image
482
+
483
+ mcp = FastMCP("Image Example")
484
+
485
+
486
+ @mcp.tool()
487
+ def create_thumbnail(image_path: str) -> Image:
488
+ """Create a thumbnail from an image"""
489
+ img = PILImage.open(image_path)
490
+ img.thumbnail((100, 100))
491
+ return Image(data=img.tobytes(), format="png")
492
+ ```
493
+
494
+ _Full example: [examples/snippets/servers/images.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/images.py)_
495
+ <!-- /snippet-source -->
496
+
497
+ ### Context
498
+
499
+ The Context object gives your tools and resources access to MCP capabilities:
500
+
501
+ <!-- snippet-source examples/snippets/servers/tool_progress.py -->
502
+ ```python
503
+ from mcp.server.fastmcp import Context, FastMCP
504
+
505
+ mcp = FastMCP(name="Progress Example")
506
+
507
+
508
+ @mcp.tool()
509
+ async def long_running_task(task_name: str, ctx: Context, steps: int = 5) -> str:
510
+ """Execute a task with progress updates."""
511
+ await ctx.info(f"Starting: {task_name}")
512
+
513
+ for i in range(steps):
514
+ progress = (i + 1) / steps
515
+ await ctx.report_progress(
516
+ progress=progress,
517
+ total=1.0,
518
+ message=f"Step {i + 1}/{steps}",
519
+ )
520
+ await ctx.debug(f"Completed step {i + 1}")
521
+
522
+ return f"Task '{task_name}' completed"
523
+ ```
524
+
525
+ _Full example: [examples/snippets/servers/tool_progress.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/tool_progress.py)_
526
+ <!-- /snippet-source -->
527
+
528
+ ### Completions
529
+
530
+ MCP supports providing completion suggestions for prompt arguments and resource template parameters. With the context parameter, servers can provide completions based on previously resolved values:
531
+
532
+ Client usage:
533
+
534
+ <!-- snippet-source examples/snippets/clients/completion_client.py -->
535
+ ```python
536
+ """
537
+ cd to the `examples/snippets` directory and run:
538
+ uv run completion-client
539
+ """
540
+
541
+ import asyncio
542
+ import os
543
+
544
+ from mcp import ClientSession, StdioServerParameters
545
+ from mcp.client.stdio import stdio_client
546
+ from mcp.types import PromptReference, ResourceTemplateReference
547
+
548
+ # Create server parameters for stdio connection
549
+ server_params = StdioServerParameters(
550
+ command="uv", # Using uv to run the server
551
+ args=["run", "server", "completion", "stdio"], # Server with completion support
552
+ env={"UV_INDEX": os.environ.get("UV_INDEX", "")},
553
+ )
554
+
555
+
556
+ async def run():
557
+ """Run the completion client example."""
558
+ async with stdio_client(server_params) as (read, write):
559
+ async with ClientSession(read, write) as session:
560
+ # Initialize the connection
561
+ await session.initialize()
562
+
563
+ # List available resource templates
564
+ templates = await session.list_resource_templates()
565
+ print("Available resource templates:")
566
+ for template in templates.resourceTemplates:
567
+ print(f" - {template.uriTemplate}")
568
+
569
+ # List available prompts
570
+ prompts = await session.list_prompts()
571
+ print("\nAvailable prompts:")
572
+ for prompt in prompts.prompts:
573
+ print(f" - {prompt.name}")
574
+
575
+ # Complete resource template arguments
576
+ if templates.resourceTemplates:
577
+ template = templates.resourceTemplates[0]
578
+ print(f"\nCompleting arguments for resource template: {template.uriTemplate}")
579
+
580
+ # Complete without context
581
+ result = await session.complete(
582
+ ref=ResourceTemplateReference(type="ref/resource", uri=template.uriTemplate),
583
+ argument={"name": "owner", "value": "model"},
584
+ )
585
+ print(f"Completions for 'owner' starting with 'model': {result.completion.values}")
586
+
587
+ # Complete with context - repo suggestions based on owner
588
+ result = await session.complete(
589
+ ref=ResourceTemplateReference(type="ref/resource", uri=template.uriTemplate),
590
+ argument={"name": "repo", "value": ""},
591
+ context_arguments={"owner": "modelcontextprotocol"},
592
+ )
593
+ print(f"Completions for 'repo' with owner='modelcontextprotocol': {result.completion.values}")
594
+
595
+ # Complete prompt arguments
596
+ if prompts.prompts:
597
+ prompt_name = prompts.prompts[0].name
598
+ print(f"\nCompleting arguments for prompt: {prompt_name}")
599
+
600
+ result = await session.complete(
601
+ ref=PromptReference(type="ref/prompt", name=prompt_name),
602
+ argument={"name": "style", "value": ""},
603
+ )
604
+ print(f"Completions for 'style' argument: {result.completion.values}")
605
+
606
+
607
+ def main():
608
+ """Entry point for the completion client."""
609
+ asyncio.run(run())
610
+
611
+
612
+ if __name__ == "__main__":
613
+ main()
614
+ ```
615
+
616
+ _Full example: [examples/snippets/clients/completion_client.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/clients/completion_client.py)_
617
+ <!-- /snippet-source -->
618
+ ### Elicitation
619
+
620
+ Request additional information from users. This example shows an Elicitation during a Tool Call:
621
+
622
+ <!-- snippet-source examples/snippets/servers/elicitation.py -->
623
+ ```python
624
+ from pydantic import BaseModel, Field
625
+
626
+ from mcp.server.fastmcp import Context, FastMCP
627
+
628
+ mcp = FastMCP(name="Elicitation Example")
629
+
630
+
631
+ class BookingPreferences(BaseModel):
632
+ """Schema for collecting user preferences."""
633
+
634
+ checkAlternative: bool = Field(description="Would you like to check another date?")
635
+ alternativeDate: str = Field(
636
+ default="2024-12-26",
637
+ description="Alternative date (YYYY-MM-DD)",
638
+ )
639
+
640
+
641
+ @mcp.tool()
642
+ async def book_table(
643
+ date: str,
644
+ time: str,
645
+ party_size: int,
646
+ ctx: Context,
647
+ ) -> str:
648
+ """Book a table with date availability check."""
649
+ # Check if date is available
650
+ if date == "2024-12-25":
651
+ # Date unavailable - ask user for alternative
652
+ result = await ctx.elicit(
653
+ message=(f"No tables available for {party_size} on {date}. Would you like to try another date?"),
654
+ schema=BookingPreferences,
655
+ )
656
+
657
+ if result.action == "accept" and result.data:
658
+ if result.data.checkAlternative:
659
+ return f"[SUCCESS] Booked for {result.data.alternativeDate}"
660
+ return "[CANCELLED] No booking made"
661
+ return "[CANCELLED] Booking cancelled"
662
+
663
+ # Date available
664
+ return f"[SUCCESS] Booked for {date} at {time}"
665
+ ```
666
+
667
+ _Full example: [examples/snippets/servers/elicitation.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/elicitation.py)_
668
+ <!-- /snippet-source -->
669
+
670
+ The `elicit()` method returns an `ElicitationResult` with:
671
+
672
+ - `action`: "accept", "decline", or "cancel"
673
+ - `data`: The validated response (only when accepted)
674
+ - `validation_error`: Any validation error message
675
+
676
+ ### Sampling
677
+
678
+ Tools can interact with LLMs through sampling (generating text):
679
+
680
+ <!-- snippet-source examples/snippets/servers/sampling.py -->
681
+ ```python
682
+ from mcp.server.fastmcp import Context, FastMCP
683
+ from mcp.types import SamplingMessage, TextContent
684
+
685
+ mcp = FastMCP(name="Sampling Example")
686
+
687
+
688
+ @mcp.tool()
689
+ async def generate_poem(topic: str, ctx: Context) -> str:
690
+ """Generate a poem using LLM sampling."""
691
+ prompt = f"Write a short poem about {topic}"
692
+
693
+ result = await ctx.session.create_message(
694
+ messages=[
695
+ SamplingMessage(
696
+ role="user",
697
+ content=TextContent(type="text", text=prompt),
698
+ )
699
+ ],
700
+ max_tokens=100,
701
+ )
702
+
703
+ if result.content.type == "text":
704
+ return result.content.text
705
+ return str(result.content)
706
+ ```
707
+
708
+ _Full example: [examples/snippets/servers/sampling.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/sampling.py)_
709
+ <!-- /snippet-source -->
710
+
711
+ ### Logging and Notifications
712
+
713
+ Tools can send logs and notifications through the context:
714
+
715
+ <!-- snippet-source examples/snippets/servers/notifications.py -->
716
+ ```python
717
+ from mcp.server.fastmcp import Context, FastMCP
718
+
719
+ mcp = FastMCP(name="Notifications Example")
720
+
721
+
722
+ @mcp.tool()
723
+ async def process_data(data: str, ctx: Context) -> str:
724
+ """Process data with logging."""
725
+ # Different log levels
726
+ await ctx.debug(f"Debug: Processing '{data}'")
727
+ await ctx.info("Info: Starting processing")
728
+ await ctx.warning("Warning: This is experimental")
729
+ await ctx.error("Error: (This is just a demo)")
730
+
731
+ # Notify about resource changes
732
+ await ctx.session.send_resource_list_changed()
733
+
734
+ return f"Processed: {data}"
735
+ ```
736
+
737
+ _Full example: [examples/snippets/servers/notifications.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/notifications.py)_
738
+ <!-- /snippet-source -->
739
+
740
+ ### Authentication
741
+
742
+ Authentication can be used by servers that want to expose tools accessing protected resources.
743
+
744
+ `mcp.server.auth` implements OAuth 2.1 resource server functionality, where MCP servers act as Resource Servers (RS) that validate tokens issued by separate Authorization Servers (AS). This follows the [MCP authorization specification](https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization) and implements RFC 9728 (Protected Resource Metadata) for AS discovery.
745
+
746
+ MCP servers can use authentication by providing an implementation of the `TokenVerifier` protocol:
747
+
748
+ <!-- snippet-source examples/snippets/servers/oauth_server.py -->
749
+ ```python
750
+ """
751
+ Run from the repository root:
752
+ uv run examples/snippets/servers/oauth_server.py
753
+ """
754
+
755
+ from pydantic import AnyHttpUrl
756
+
757
+ from mcp.server.auth.provider import AccessToken, TokenVerifier
758
+ from mcp.server.auth.settings import AuthSettings
759
+ from mcp.server.fastmcp import FastMCP
760
+
761
+
762
+ class SimpleTokenVerifier(TokenVerifier):
763
+ """Simple token verifier for demonstration."""
764
+
765
+ async def verify_token(self, token: str) -> AccessToken | None:
766
+ pass # This is where you would implement actual token validation
767
+
768
+
769
+ # Create FastMCP instance as a Resource Server
770
+ mcp = FastMCP(
771
+ "Weather Service",
772
+ # Token verifier for authentication
773
+ token_verifier=SimpleTokenVerifier(),
774
+ # Auth settings for RFC 9728 Protected Resource Metadata
775
+ auth=AuthSettings(
776
+ issuer_url=AnyHttpUrl("https://auth.example.com"), # Authorization Server URL
777
+ resource_server_url=AnyHttpUrl("http://localhost:3001"), # This server's URL
778
+ required_scopes=["user"],
779
+ ),
780
+ )
781
+
782
+
783
+ @mcp.tool()
784
+ async def get_weather(city: str = "London") -> dict[str, str]:
785
+ """Get weather data for a city"""
786
+ return {
787
+ "city": city,
788
+ "temperature": "22",
789
+ "condition": "Partly cloudy",
790
+ "humidity": "65%",
791
+ }
792
+
793
+
794
+ if __name__ == "__main__":
795
+ mcp.run(transport="streamable-http")
796
+ ```
797
+
798
+ _Full example: [examples/snippets/servers/oauth_server.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/oauth_server.py)_
799
+ <!-- /snippet-source -->
800
+
801
+ For a complete example with separate Authorization Server and Resource Server implementations, see [`examples/servers/simple-auth/`](examples/servers/simple-auth/).
802
+
803
+ **Architecture:**
804
+
805
+ - **Authorization Server (AS)**: Handles OAuth flows, user authentication, and token issuance
806
+ - **Resource Server (RS)**: Your MCP server that validates tokens and serves protected resources
807
+ - **Client**: Discovers AS through RFC 9728, obtains tokens, and uses them with the MCP server
808
+
809
+ See [TokenVerifier](src/mcp/server/auth/provider.py) for more details on implementing token validation.
810
+
811
+ ## Running Your Server
812
+
813
+ ### Development Mode
814
+
815
+ The fastest way to test and debug your server is with the MCP Inspector:
816
+
817
+ ```bash
818
+ uv run mcp dev server.py
819
+
820
+ # Add dependencies
821
+ uv run mcp dev server.py --with pandas --with numpy
822
+
823
+ # Mount local code
824
+ uv run mcp dev server.py --with-editable .
825
+ ```
826
+
827
+ ### Claude Desktop Integration
828
+
829
+ Once your server is ready, install it in Claude Desktop:
830
+
831
+ ```bash
832
+ uv run mcp install server.py
833
+
834
+ # Custom name
835
+ uv run mcp install server.py --name "My Analytics Server"
836
+
837
+ # Environment variables
838
+ uv run mcp install server.py -v API_KEY=abc123 -v DB_URL=postgres://...
839
+ uv run mcp install server.py -f .env
840
+ ```
841
+
842
+ ### Direct Execution
843
+
844
+ For advanced scenarios like custom deployments:
845
+
846
+ <!-- snippet-source examples/snippets/servers/direct_execution.py -->
847
+ ```python
848
+ """Example showing direct execution of an MCP server.
849
+
850
+ This is the simplest way to run an MCP server directly.
851
+ cd to the `examples/snippets` directory and run:
852
+ uv run direct-execution-server
853
+ or
854
+ python servers/direct_execution.py
855
+ """
856
+
857
+ from mcp.server.fastmcp import FastMCP
858
+
859
+ mcp = FastMCP("My App")
860
+
861
+
862
+ @mcp.tool()
863
+ def hello(name: str = "World") -> str:
864
+ """Say hello to someone."""
865
+ return f"Hello, {name}!"
866
+
867
+
868
+ def main():
869
+ """Entry point for the direct execution server."""
870
+ mcp.run()
871
+
872
+
873
+ if __name__ == "__main__":
874
+ main()
875
+ ```
876
+
877
+ _Full example: [examples/snippets/servers/direct_execution.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/direct_execution.py)_
878
+ <!-- /snippet-source -->
879
+
880
+ Run it with:
881
+
882
+ ```bash
883
+ python servers/direct_execution.py
884
+ # or
885
+ uv run mcp run servers/direct_execution.py
886
+ ```
887
+
888
+ Note that `uv run mcp run` or `uv run mcp dev` only supports server using FastMCP and not the low-level server variant.
889
+
890
+ ### Streamable HTTP Transport
891
+
892
+ > **Note**: Streamable HTTP transport is superseding SSE transport for production deployments.
893
+
894
+ <!-- snippet-source examples/snippets/servers/streamable_config.py -->
895
+ ```python
896
+ """
897
+ Run from the repository root:
898
+ uv run examples/snippets/servers/streamable_config.py
899
+ """
900
+
901
+ from mcp.server.fastmcp import FastMCP
902
+
903
+ # Stateful server (maintains session state)
904
+ mcp = FastMCP("StatefulServer")
905
+
906
+ # Other configuration options:
907
+ # Stateless server (no session persistence)
908
+ # mcp = FastMCP("StatelessServer", stateless_http=True)
909
+
910
+ # Stateless server (no session persistence, no sse stream with supported client)
911
+ # mcp = FastMCP("StatelessServer", stateless_http=True, json_response=True)
912
+
913
+
914
+ # Add a simple tool to demonstrate the server
915
+ @mcp.tool()
916
+ def greet(name: str = "World") -> str:
917
+ """Greet someone by name."""
918
+ return f"Hello, {name}!"
919
+
920
+
921
+ # Run server with streamable_http transport
922
+ if __name__ == "__main__":
923
+ mcp.run(transport="streamable-http")
924
+ ```
925
+
926
+ _Full example: [examples/snippets/servers/streamable_config.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/streamable_config.py)_
927
+ <!-- /snippet-source -->
928
+
929
+ You can mount multiple FastMCP servers in a Starlette application:
930
+
931
+ <!-- snippet-source examples/snippets/servers/streamable_starlette_mount.py -->
932
+ ```python
933
+ """
934
+ Run from the repository root:
935
+ uvicorn examples.snippets.servers.streamable_starlette_mount:app --reload
936
+ """
937
+
938
+ import contextlib
939
+
940
+ from starlette.applications import Starlette
941
+ from starlette.routing import Mount
942
+
943
+ from mcp.server.fastmcp import FastMCP
944
+
945
+ # Create the Echo server
946
+ echo_mcp = FastMCP(name="EchoServer", stateless_http=True)
947
+
948
+
949
+ @echo_mcp.tool()
950
+ def echo(message: str) -> str:
951
+ """A simple echo tool"""
952
+ return f"Echo: {message}"
953
+
954
+
955
+ # Create the Math server
956
+ math_mcp = FastMCP(name="MathServer", stateless_http=True)
957
+
958
+
959
+ @math_mcp.tool()
960
+ def add_two(n: int) -> int:
961
+ """Tool to add two to the input"""
962
+ return n + 2
963
+
964
+
965
+ # Create a combined lifespan to manage both session managers
966
+ @contextlib.asynccontextmanager
967
+ async def lifespan(app: Starlette):
968
+ async with contextlib.AsyncExitStack() as stack:
969
+ await stack.enter_async_context(echo_mcp.session_manager.run())
970
+ await stack.enter_async_context(math_mcp.session_manager.run())
971
+ yield
972
+
973
+
974
+ # Create the Starlette app and mount the MCP servers
975
+ app = Starlette(
976
+ routes=[
977
+ Mount("/echo", echo_mcp.streamable_http_app()),
978
+ Mount("/math", math_mcp.streamable_http_app()),
979
+ ],
980
+ lifespan=lifespan,
981
+ )
982
+ ```
983
+
984
+ _Full example: [examples/snippets/servers/streamable_starlette_mount.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/streamable_starlette_mount.py)_
985
+ <!-- /snippet-source -->
986
+
987
+ For low level server with Streamable HTTP implementations, see:
988
+
989
+ - Stateful server: [`examples/servers/simple-streamablehttp/`](examples/servers/simple-streamablehttp/)
990
+ - Stateless server: [`examples/servers/simple-streamablehttp-stateless/`](examples/servers/simple-streamablehttp-stateless/)
991
+
992
+ The streamable HTTP transport supports:
993
+
994
+ - Stateful and stateless operation modes
995
+ - Resumability with event stores
996
+ - JSON or SSE response formats
997
+ - Better scalability for multi-node deployments
998
+
999
+ ### Mounting to an Existing ASGI Server
1000
+
1001
+ By default, SSE servers are mounted at `/sse` and Streamable HTTP servers are mounted at `/mcp`. You can customize these paths using the methods described below.
1002
+
1003
+ For more information on mounting applications in Starlette, see the [Starlette documentation](https://www.starlette.io/routing/#submounting-routes).
1004
+
1005
+ #### SSE servers
1006
+
1007
+ > **Note**: SSE transport is being superseded by [Streamable HTTP transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http).
1008
+
1009
+ You can mount the SSE server to an existing ASGI server using the `sse_app` method. This allows you to integrate the SSE server with other ASGI applications.
1010
+
1011
+ ```python
1012
+ from starlette.applications import Starlette
1013
+ from starlette.routing import Mount, Host
1014
+ from mcp.server.fastmcp import FastMCP
1015
+
1016
+
1017
+ mcp = FastMCP("My App")
1018
+
1019
+ # Mount the SSE server to the existing ASGI server
1020
+ app = Starlette(
1021
+ routes=[
1022
+ Mount('/', app=mcp.sse_app()),
1023
+ ]
1024
+ )
1025
+
1026
+ # or dynamically mount as host
1027
+ app.router.routes.append(Host('mcp.acme.corp', app=mcp.sse_app()))
1028
+ ```
1029
+
1030
+ When mounting multiple MCP servers under different paths, you can configure the mount path in several ways:
1031
+
1032
+ ```python
1033
+ from starlette.applications import Starlette
1034
+ from starlette.routing import Mount
1035
+ from mcp.server.fastmcp import FastMCP
1036
+
1037
+ # Create multiple MCP servers
1038
+ github_mcp = FastMCP("GitHub API")
1039
+ browser_mcp = FastMCP("Browser")
1040
+ curl_mcp = FastMCP("Curl")
1041
+ search_mcp = FastMCP("Search")
1042
+
1043
+ # Method 1: Configure mount paths via settings (recommended for persistent configuration)
1044
+ github_mcp.settings.mount_path = "/github"
1045
+ browser_mcp.settings.mount_path = "/browser"
1046
+
1047
+ # Method 2: Pass mount path directly to sse_app (preferred for ad-hoc mounting)
1048
+ # This approach doesn't modify the server's settings permanently
1049
+
1050
+ # Create Starlette app with multiple mounted servers
1051
+ app = Starlette(
1052
+ routes=[
1053
+ # Using settings-based configuration
1054
+ Mount("/github", app=github_mcp.sse_app()),
1055
+ Mount("/browser", app=browser_mcp.sse_app()),
1056
+ # Using direct mount path parameter
1057
+ Mount("/curl", app=curl_mcp.sse_app("/curl")),
1058
+ Mount("/search", app=search_mcp.sse_app("/search")),
1059
+ ]
1060
+ )
1061
+
1062
+ # Method 3: For direct execution, you can also pass the mount path to run()
1063
+ if __name__ == "__main__":
1064
+ search_mcp.run(transport="sse", mount_path="/search")
1065
+ ```
1066
+
1067
+ For more information on mounting applications in Starlette, see the [Starlette documentation](https://www.starlette.io/routing/#submounting-routes).
1068
+
1069
+ ## Advanced Usage
1070
+
1071
+ ### Low-Level Server
1072
+
1073
+ For more control, you can use the low-level server implementation directly. This gives you full access to the protocol and allows you to customize every aspect of your server, including lifecycle management through the lifespan API:
1074
+
1075
+ <!-- snippet-source examples/snippets/servers/lowlevel/lifespan.py -->
1076
+ ```python
1077
+ """
1078
+ Run from the repository root:
1079
+ uv run examples/snippets/servers/lowlevel/lifespan.py
1080
+ """
1081
+
1082
+ from collections.abc import AsyncIterator
1083
+ from contextlib import asynccontextmanager
1084
+
1085
+ import mcp.server.stdio
1086
+ import mcp.types as types
1087
+ from mcp.server.lowlevel import NotificationOptions, Server
1088
+ from mcp.server.models import InitializationOptions
1089
+
1090
+
1091
+ # Mock database class for example
1092
+ class Database:
1093
+ """Mock database class for example."""
1094
+
1095
+ @classmethod
1096
+ async def connect(cls) -> "Database":
1097
+ """Connect to database."""
1098
+ print("Database connected")
1099
+ return cls()
1100
+
1101
+ async def disconnect(self) -> None:
1102
+ """Disconnect from database."""
1103
+ print("Database disconnected")
1104
+
1105
+ async def query(self, query_str: str) -> list[dict[str, str]]:
1106
+ """Execute a query."""
1107
+ # Simulate database query
1108
+ return [{"id": "1", "name": "Example", "query": query_str}]
1109
+
1110
+
1111
+ @asynccontextmanager
1112
+ async def server_lifespan(_server: Server) -> AsyncIterator[dict]:
1113
+ """Manage server startup and shutdown lifecycle."""
1114
+ # Initialize resources on startup
1115
+ db = await Database.connect()
1116
+ try:
1117
+ yield {"db": db}
1118
+ finally:
1119
+ # Clean up on shutdown
1120
+ await db.disconnect()
1121
+
1122
+
1123
+ # Pass lifespan to server
1124
+ server = Server("example-server", lifespan=server_lifespan)
1125
+
1126
+
1127
+ @server.list_tools()
1128
+ async def handle_list_tools() -> list[types.Tool]:
1129
+ """List available tools."""
1130
+ return [
1131
+ types.Tool(
1132
+ name="query_db",
1133
+ description="Query the database",
1134
+ inputSchema={
1135
+ "type": "object",
1136
+ "properties": {"query": {"type": "string", "description": "SQL query to execute"}},
1137
+ "required": ["query"],
1138
+ },
1139
+ )
1140
+ ]
1141
+
1142
+
1143
+ @server.call_tool()
1144
+ async def query_db(name: str, arguments: dict) -> list[types.TextContent]:
1145
+ """Handle database query tool call."""
1146
+ if name != "query_db":
1147
+ raise ValueError(f"Unknown tool: {name}")
1148
+
1149
+ # Access lifespan context
1150
+ ctx = server.request_context
1151
+ db = ctx.lifespan_context["db"]
1152
+
1153
+ # Execute query
1154
+ results = await db.query(arguments["query"])
1155
+
1156
+ return [types.TextContent(type="text", text=f"Query results: {results}")]
1157
+
1158
+
1159
+ async def run():
1160
+ """Run the server with lifespan management."""
1161
+ async with mcp.server.stdio.stdio_server() as (read_stream, write_stream):
1162
+ await server.run(
1163
+ read_stream,
1164
+ write_stream,
1165
+ InitializationOptions(
1166
+ server_name="example-server",
1167
+ server_version="0.1.0",
1168
+ capabilities=server.get_capabilities(
1169
+ notification_options=NotificationOptions(),
1170
+ experimental_capabilities={},
1171
+ ),
1172
+ ),
1173
+ )
1174
+
1175
+
1176
+ if __name__ == "__main__":
1177
+ import asyncio
1178
+
1179
+ asyncio.run(run())
1180
+ ```
1181
+
1182
+ _Full example: [examples/snippets/servers/lowlevel/lifespan.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/lowlevel/lifespan.py)_
1183
+ <!-- /snippet-source -->
1184
+
1185
+ The lifespan API provides:
1186
+
1187
+ - A way to initialize resources when the server starts and clean them up when it stops
1188
+ - Access to initialized resources through the request context in handlers
1189
+ - Type-safe context passing between lifespan and request handlers
1190
+
1191
+ <!-- snippet-source examples/snippets/servers/lowlevel/basic.py -->
1192
+ ```python
1193
+ """
1194
+ Run from the repository root:
1195
+ uv run examples/snippets/servers/lowlevel/basic.py
1196
+ """
1197
+
1198
+ import asyncio
1199
+
1200
+ import mcp.server.stdio
1201
+ import mcp.types as types
1202
+ from mcp.server.lowlevel import NotificationOptions, Server
1203
+ from mcp.server.models import InitializationOptions
1204
+
1205
+ # Create a server instance
1206
+ server = Server("example-server")
1207
+
1208
+
1209
+ @server.list_prompts()
1210
+ async def handle_list_prompts() -> list[types.Prompt]:
1211
+ """List available prompts."""
1212
+ return [
1213
+ types.Prompt(
1214
+ name="example-prompt",
1215
+ description="An example prompt template",
1216
+ arguments=[types.PromptArgument(name="arg1", description="Example argument", required=True)],
1217
+ )
1218
+ ]
1219
+
1220
+
1221
+ @server.get_prompt()
1222
+ async def handle_get_prompt(name: str, arguments: dict[str, str] | None) -> types.GetPromptResult:
1223
+ """Get a specific prompt by name."""
1224
+ if name != "example-prompt":
1225
+ raise ValueError(f"Unknown prompt: {name}")
1226
+
1227
+ arg1_value = (arguments or {}).get("arg1", "default")
1228
+
1229
+ return types.GetPromptResult(
1230
+ description="Example prompt",
1231
+ messages=[
1232
+ types.PromptMessage(
1233
+ role="user",
1234
+ content=types.TextContent(type="text", text=f"Example prompt text with argument: {arg1_value}"),
1235
+ )
1236
+ ],
1237
+ )
1238
+
1239
+
1240
+ async def run():
1241
+ """Run the basic low-level server."""
1242
+ async with mcp.server.stdio.stdio_server() as (read_stream, write_stream):
1243
+ await server.run(
1244
+ read_stream,
1245
+ write_stream,
1246
+ InitializationOptions(
1247
+ server_name="example",
1248
+ server_version="0.1.0",
1249
+ capabilities=server.get_capabilities(
1250
+ notification_options=NotificationOptions(),
1251
+ experimental_capabilities={},
1252
+ ),
1253
+ ),
1254
+ )
1255
+
1256
+
1257
+ if __name__ == "__main__":
1258
+ asyncio.run(run())
1259
+ ```
1260
+
1261
+ _Full example: [examples/snippets/servers/lowlevel/basic.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/lowlevel/basic.py)_
1262
+ <!-- /snippet-source -->
1263
+
1264
+ Caution: The `uv run mcp run` and `uv run mcp dev` tool doesn't support low-level server.
1265
+
1266
+ #### Structured Output Support
1267
+
1268
+ The low-level server supports structured output for tools, allowing you to return both human-readable content and machine-readable structured data. Tools can define an `outputSchema` to validate their structured output:
1269
+
1270
+ <!-- snippet-source examples/snippets/servers/lowlevel/structured_output.py -->
1271
+ ```python
1272
+ """
1273
+ Run from the repository root:
1274
+ uv run examples/snippets/servers/lowlevel/structured_output.py
1275
+ """
1276
+
1277
+ import asyncio
1278
+ from typing import Any
1279
+
1280
+ import mcp.server.stdio
1281
+ import mcp.types as types
1282
+ from mcp.server.lowlevel import NotificationOptions, Server
1283
+ from mcp.server.models import InitializationOptions
1284
+
1285
+ server = Server("example-server")
1286
+
1287
+
1288
+ @server.list_tools()
1289
+ async def list_tools() -> list[types.Tool]:
1290
+ """List available tools with structured output schemas."""
1291
+ return [
1292
+ types.Tool(
1293
+ name="get_weather",
1294
+ description="Get current weather for a city",
1295
+ inputSchema={
1296
+ "type": "object",
1297
+ "properties": {"city": {"type": "string", "description": "City name"}},
1298
+ "required": ["city"],
1299
+ },
1300
+ outputSchema={
1301
+ "type": "object",
1302
+ "properties": {
1303
+ "temperature": {"type": "number", "description": "Temperature in Celsius"},
1304
+ "condition": {"type": "string", "description": "Weather condition"},
1305
+ "humidity": {"type": "number", "description": "Humidity percentage"},
1306
+ "city": {"type": "string", "description": "City name"},
1307
+ },
1308
+ "required": ["temperature", "condition", "humidity", "city"],
1309
+ },
1310
+ )
1311
+ ]
1312
+
1313
+
1314
+ @server.call_tool()
1315
+ async def call_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
1316
+ """Handle tool calls with structured output."""
1317
+ if name == "get_weather":
1318
+ city = arguments["city"]
1319
+
1320
+ # Simulated weather data - in production, call a weather API
1321
+ weather_data = {
1322
+ "temperature": 22.5,
1323
+ "condition": "partly cloudy",
1324
+ "humidity": 65,
1325
+ "city": city, # Include the requested city
1326
+ }
1327
+
1328
+ # low-level server will validate structured output against the tool's
1329
+ # output schema, and additionally serialize it into a TextContent block
1330
+ # for backwards compatibility with pre-2025-06-18 clients.
1331
+ return weather_data
1332
+ else:
1333
+ raise ValueError(f"Unknown tool: {name}")
1334
+
1335
+
1336
+ async def run():
1337
+ """Run the structured output server."""
1338
+ async with mcp.server.stdio.stdio_server() as (read_stream, write_stream):
1339
+ await server.run(
1340
+ read_stream,
1341
+ write_stream,
1342
+ InitializationOptions(
1343
+ server_name="structured-output-example",
1344
+ server_version="0.1.0",
1345
+ capabilities=server.get_capabilities(
1346
+ notification_options=NotificationOptions(),
1347
+ experimental_capabilities={},
1348
+ ),
1349
+ ),
1350
+ )
1351
+
1352
+
1353
+ if __name__ == "__main__":
1354
+ asyncio.run(run())
1355
+ ```
1356
+
1357
+ _Full example: [examples/snippets/servers/lowlevel/structured_output.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/lowlevel/structured_output.py)_
1358
+ <!-- /snippet-source -->
1359
+
1360
+ Tools can return data in three ways:
1361
+
1362
+ 1. **Content only**: Return a list of content blocks (default behavior before spec revision 2025-06-18)
1363
+ 2. **Structured data only**: Return a dictionary that will be serialized to JSON (Introduced in spec revision 2025-06-18)
1364
+ 3. **Both**: Return a tuple of (content, structured_data) preferred option to use for backwards compatibility
1365
+
1366
+ When an `outputSchema` is defined, the server automatically validates the structured output against the schema. This ensures type safety and helps catch errors early.
1367
+
1368
+ ### Writing MCP Clients
1369
+
1370
+ The SDK provides a high-level client interface for connecting to MCP servers using various [transports](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports):
1371
+
1372
+ <!-- snippet-source examples/snippets/clients/stdio_client.py -->
1373
+ ```python
1374
+ """
1375
+ cd to the `examples/snippets/clients` directory and run:
1376
+ uv run client
1377
+ """
1378
+
1379
+ import asyncio
1380
+ import os
1381
+
1382
+ from pydantic import AnyUrl
1383
+
1384
+ from mcp import ClientSession, StdioServerParameters, types
1385
+ from mcp.client.stdio import stdio_client
1386
+ from mcp.shared.context import RequestContext
1387
+
1388
+ # Create server parameters for stdio connection
1389
+ server_params = StdioServerParameters(
1390
+ command="uv", # Using uv to run the server
1391
+ args=["run", "server", "fastmcp_quickstart", "stdio"], # We're already in snippets dir
1392
+ env={"UV_INDEX": os.environ.get("UV_INDEX", "")},
1393
+ )
1394
+
1395
+
1396
+ # Optional: create a sampling callback
1397
+ async def handle_sampling_message(
1398
+ context: RequestContext, params: types.CreateMessageRequestParams
1399
+ ) -> types.CreateMessageResult:
1400
+ print(f"Sampling request: {params.messages}")
1401
+ return types.CreateMessageResult(
1402
+ role="assistant",
1403
+ content=types.TextContent(
1404
+ type="text",
1405
+ text="Hello, world! from model",
1406
+ ),
1407
+ model="gpt-3.5-turbo",
1408
+ stopReason="endTurn",
1409
+ )
1410
+
1411
+
1412
+ async def run():
1413
+ async with stdio_client(server_params) as (read, write):
1414
+ async with ClientSession(read, write, sampling_callback=handle_sampling_message) as session:
1415
+ # Initialize the connection
1416
+ await session.initialize()
1417
+
1418
+ # List available prompts
1419
+ prompts = await session.list_prompts()
1420
+ print(f"Available prompts: {[p.name for p in prompts.prompts]}")
1421
+
1422
+ # Get a prompt (greet_user prompt from fastmcp_quickstart)
1423
+ if prompts.prompts:
1424
+ prompt = await session.get_prompt("greet_user", arguments={"name": "Alice", "style": "friendly"})
1425
+ print(f"Prompt result: {prompt.messages[0].content}")
1426
+
1427
+ # List available resources
1428
+ resources = await session.list_resources()
1429
+ print(f"Available resources: {[r.uri for r in resources.resources]}")
1430
+
1431
+ # List available tools
1432
+ tools = await session.list_tools()
1433
+ print(f"Available tools: {[t.name for t in tools.tools]}")
1434
+
1435
+ # Read a resource (greeting resource from fastmcp_quickstart)
1436
+ resource_content = await session.read_resource(AnyUrl("greeting://World"))
1437
+ content_block = resource_content.contents[0]
1438
+ if isinstance(content_block, types.TextContent):
1439
+ print(f"Resource content: {content_block.text}")
1440
+
1441
+ # Call a tool (add tool from fastmcp_quickstart)
1442
+ result = await session.call_tool("add", arguments={"a": 5, "b": 3})
1443
+ result_unstructured = result.content[0]
1444
+ if isinstance(result_unstructured, types.TextContent):
1445
+ print(f"Tool result: {result_unstructured.text}")
1446
+ result_structured = result.structuredContent
1447
+ print(f"Structured tool result: {result_structured}")
1448
+
1449
+
1450
+ def main():
1451
+ """Entry point for the client script."""
1452
+ asyncio.run(run())
1453
+
1454
+
1455
+ if __name__ == "__main__":
1456
+ main()
1457
+ ```
1458
+
1459
+ _Full example: [examples/snippets/clients/stdio_client.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/clients/stdio_client.py)_
1460
+ <!-- /snippet-source -->
1461
+
1462
+ Clients can also connect using [Streamable HTTP transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http):
1463
+
1464
+ <!-- snippet-source examples/snippets/clients/streamable_basic.py -->
1465
+ ```python
1466
+ """
1467
+ Run from the repository root:
1468
+ uv run examples/snippets/clients/streamable_basic.py
1469
+ """
1470
+
1471
+ import asyncio
1472
+
1473
+ from mcp import ClientSession
1474
+ from mcp.client.streamable_http import streamablehttp_client
1475
+
1476
+
1477
+ async def main():
1478
+ # Connect to a streamable HTTP server
1479
+ async with streamablehttp_client("http://localhost:8000/mcp") as (
1480
+ read_stream,
1481
+ write_stream,
1482
+ _,
1483
+ ):
1484
+ # Create a session using the client streams
1485
+ async with ClientSession(read_stream, write_stream) as session:
1486
+ # Initialize the connection
1487
+ await session.initialize()
1488
+ # List available tools
1489
+ tools = await session.list_tools()
1490
+ print(f"Available tools: {[tool.name for tool in tools.tools]}")
1491
+
1492
+
1493
+ if __name__ == "__main__":
1494
+ asyncio.run(main())
1495
+ ```
1496
+
1497
+ _Full example: [examples/snippets/clients/streamable_basic.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/clients/streamable_basic.py)_
1498
+ <!-- /snippet-source -->
1499
+
1500
+ ### Client Display Utilities
1501
+
1502
+ When building MCP clients, the SDK provides utilities to help display human-readable names for tools, resources, and prompts:
1503
+
1504
+ <!-- snippet-source examples/snippets/clients/display_utilities.py -->
1505
+ ```python
1506
+ """
1507
+ cd to the `examples/snippets` directory and run:
1508
+ uv run display-utilities-client
1509
+ """
1510
+
1511
+ import asyncio
1512
+ import os
1513
+
1514
+ from mcp import ClientSession, StdioServerParameters
1515
+ from mcp.client.stdio import stdio_client
1516
+ from mcp.shared.metadata_utils import get_display_name
1517
+
1518
+ # Create server parameters for stdio connection
1519
+ server_params = StdioServerParameters(
1520
+ command="uv", # Using uv to run the server
1521
+ args=["run", "server", "fastmcp_quickstart", "stdio"],
1522
+ env={"UV_INDEX": os.environ.get("UV_INDEX", "")},
1523
+ )
1524
+
1525
+
1526
+ async def display_tools(session: ClientSession):
1527
+ """Display available tools with human-readable names"""
1528
+ tools_response = await session.list_tools()
1529
+
1530
+ for tool in tools_response.tools:
1531
+ # get_display_name() returns the title if available, otherwise the name
1532
+ display_name = get_display_name(tool)
1533
+ print(f"Tool: {display_name}")
1534
+ if tool.description:
1535
+ print(f" {tool.description}")
1536
+
1537
+
1538
+ async def display_resources(session: ClientSession):
1539
+ """Display available resources with human-readable names"""
1540
+ resources_response = await session.list_resources()
1541
+
1542
+ for resource in resources_response.resources:
1543
+ display_name = get_display_name(resource)
1544
+ print(f"Resource: {display_name} ({resource.uri})")
1545
+
1546
+ templates_response = await session.list_resource_templates()
1547
+ for template in templates_response.resourceTemplates:
1548
+ display_name = get_display_name(template)
1549
+ print(f"Resource Template: {display_name}")
1550
+
1551
+
1552
+ async def run():
1553
+ """Run the display utilities example."""
1554
+ async with stdio_client(server_params) as (read, write):
1555
+ async with ClientSession(read, write) as session:
1556
+ # Initialize the connection
1557
+ await session.initialize()
1558
+
1559
+ print("=== Available Tools ===")
1560
+ await display_tools(session)
1561
+
1562
+ print("\n=== Available Resources ===")
1563
+ await display_resources(session)
1564
+
1565
+
1566
+ def main():
1567
+ """Entry point for the display utilities client."""
1568
+ asyncio.run(run())
1569
+
1570
+
1571
+ if __name__ == "__main__":
1572
+ main()
1573
+ ```
1574
+
1575
+ _Full example: [examples/snippets/clients/display_utilities.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/clients/display_utilities.py)_
1576
+ <!-- /snippet-source -->
1577
+
1578
+ The `get_display_name()` function implements the proper precedence rules for displaying names:
1579
+
1580
+ - For tools: `title` > `annotations.title` > `name`
1581
+ - For other objects: `title` > `name`
1582
+
1583
+ This ensures your client UI shows the most user-friendly names that servers provide.
1584
+
1585
+ ### OAuth Authentication for Clients
1586
+
1587
+ The SDK includes [authorization support](https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization) for connecting to protected MCP servers:
1588
+
1589
+ <!-- snippet-source examples/snippets/clients/oauth_client.py -->
1590
+ ```python
1591
+ """
1592
+ Before running, specify running MCP RS server URL.
1593
+ To spin up RS server locally, see
1594
+ examples/servers/simple-auth/README.md
1595
+
1596
+ cd to the `examples/snippets` directory and run:
1597
+ uv run oauth-client
1598
+ """
1599
+
1600
+ import asyncio
1601
+ from urllib.parse import parse_qs, urlparse
1602
+
1603
+ from pydantic import AnyUrl
1604
+
1605
+ from mcp import ClientSession
1606
+ from mcp.client.auth import OAuthClientProvider, TokenStorage
1607
+ from mcp.client.streamable_http import streamablehttp_client
1608
+ from mcp.shared.auth import OAuthClientInformationFull, OAuthClientMetadata, OAuthToken
1609
+
1610
+
1611
+ class InMemoryTokenStorage(TokenStorage):
1612
+ """Demo In-memory token storage implementation."""
1613
+
1614
+ def __init__(self):
1615
+ self.tokens: OAuthToken | None = None
1616
+ self.client_info: OAuthClientInformationFull | None = None
1617
+
1618
+ async def get_tokens(self) -> OAuthToken | None:
1619
+ """Get stored tokens."""
1620
+ return self.tokens
1621
+
1622
+ async def set_tokens(self, tokens: OAuthToken) -> None:
1623
+ """Store tokens."""
1624
+ self.tokens = tokens
1625
+
1626
+ async def get_client_info(self) -> OAuthClientInformationFull | None:
1627
+ """Get stored client information."""
1628
+ return self.client_info
1629
+
1630
+ async def set_client_info(self, client_info: OAuthClientInformationFull) -> None:
1631
+ """Store client information."""
1632
+ self.client_info = client_info
1633
+
1634
+
1635
+ async def handle_redirect(auth_url: str) -> None:
1636
+ print(f"Visit: {auth_url}")
1637
+
1638
+
1639
+ async def handle_callback() -> tuple[str, str | None]:
1640
+ callback_url = input("Paste callback URL: ")
1641
+ params = parse_qs(urlparse(callback_url).query)
1642
+ return params["code"][0], params.get("state", [None])[0]
1643
+
1644
+
1645
+ async def main():
1646
+ """Run the OAuth client example."""
1647
+ oauth_auth = OAuthClientProvider(
1648
+ server_url="http://localhost:8001",
1649
+ client_metadata=OAuthClientMetadata(
1650
+ client_name="Example MCP Client",
1651
+ redirect_uris=[AnyUrl("http://localhost:3000/callback")],
1652
+ grant_types=["authorization_code", "refresh_token"],
1653
+ response_types=["code"],
1654
+ scope="user",
1655
+ ),
1656
+ storage=InMemoryTokenStorage(),
1657
+ redirect_handler=handle_redirect,
1658
+ callback_handler=handle_callback,
1659
+ )
1660
+
1661
+ async with streamablehttp_client("http://localhost:8001/mcp", auth=oauth_auth) as (read, write, _):
1662
+ async with ClientSession(read, write) as session:
1663
+ await session.initialize()
1664
+
1665
+ tools = await session.list_tools()
1666
+ print(f"Available tools: {[tool.name for tool in tools.tools]}")
1667
+
1668
+ resources = await session.list_resources()
1669
+ print(f"Available resources: {[r.uri for r in resources.resources]}")
1670
+
1671
+
1672
+ def run():
1673
+ asyncio.run(main())
1674
+
1675
+
1676
+ if __name__ == "__main__":
1677
+ run()
1678
+ ```
1679
+
1680
+ _Full example: [examples/snippets/clients/oauth_client.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/clients/oauth_client.py)_
1681
+ <!-- /snippet-source -->
1682
+
1683
+ For a complete working example, see [`examples/clients/simple-auth-client/`](examples/clients/simple-auth-client/).
1684
+
1685
+ ### Parsing Tool Results
1686
+
1687
+ When calling tools through MCP, the `CallToolResult` object contains the tool's response in a structured format. Understanding how to parse this result is essential for properly handling tool outputs.
1688
+
1689
+ ```python
1690
+ """examples/snippets/clients/parsing_tool_results.py"""
1691
+
1692
+ import asyncio
1693
+
1694
+ from mcp import ClientSession, StdioServerParameters, types
1695
+ from mcp.client.stdio import stdio_client
1696
+
1697
+
1698
+ async def parse_tool_results():
1699
+ """Demonstrates how to parse different types of content in CallToolResult."""
1700
+ server_params = StdioServerParameters(
1701
+ command="python", args=["path/to/mcp_server.py"]
1702
+ )
1703
+
1704
+ async with stdio_client(server_params) as (read, write):
1705
+ async with ClientSession(read, write) as session:
1706
+ await session.initialize()
1707
+
1708
+ # Example 1: Parsing text content
1709
+ result = await session.call_tool("get_data", {"format": "text"})
1710
+ for content in result.content:
1711
+ if isinstance(content, types.TextContent):
1712
+ print(f"Text: {content.text}")
1713
+
1714
+ # Example 2: Parsing structured content from JSON tools
1715
+ result = await session.call_tool("get_user", {"id": "123"})
1716
+ if hasattr(result, "structuredContent") and result.structuredContent:
1717
+ # Access structured data directly
1718
+ user_data = result.structuredContent
1719
+ print(f"User: {user_data.get('name')}, Age: {user_data.get('age')}")
1720
+
1721
+ # Example 3: Parsing embedded resources
1722
+ result = await session.call_tool("read_config", {})
1723
+ for content in result.content:
1724
+ if isinstance(content, types.EmbeddedResource):
1725
+ resource = content.resource
1726
+ if isinstance(resource, types.TextResourceContents):
1727
+ print(f"Config from {resource.uri}: {resource.text}")
1728
+ elif isinstance(resource, types.BlobResourceContents):
1729
+ print(f"Binary data from {resource.uri}")
1730
+
1731
+ # Example 4: Parsing image content
1732
+ result = await session.call_tool("generate_chart", {"data": [1, 2, 3]})
1733
+ for content in result.content:
1734
+ if isinstance(content, types.ImageContent):
1735
+ print(f"Image ({content.mimeType}): {len(content.data)} bytes")
1736
+
1737
+ # Example 5: Handling errors
1738
+ result = await session.call_tool("failing_tool", {})
1739
+ if result.isError:
1740
+ print("Tool execution failed!")
1741
+ for content in result.content:
1742
+ if isinstance(content, types.TextContent):
1743
+ print(f"Error: {content.text}")
1744
+
1745
+
1746
+ async def main():
1747
+ await parse_tool_results()
1748
+
1749
+
1750
+ if __name__ == "__main__":
1751
+ asyncio.run(main())
1752
+ ```
1753
+
1754
+ ### MCP Primitives
1755
+
1756
+ The MCP protocol defines three core primitives that servers can implement:
1757
+
1758
+ | Primitive | Control | Description | Example Use |
1759
+ |-----------|-----------------------|-----------------------------------------------------|------------------------------|
1760
+ | Prompts | User-controlled | Interactive templates invoked by user choice | Slash commands, menu options |
1761
+ | Resources | Application-controlled| Contextual data managed by the client application | File contents, API responses |
1762
+ | Tools | Model-controlled | Functions exposed to the LLM to take actions | API calls, data updates |
1763
+
1764
+ ### Server Capabilities
1765
+
1766
+ MCP servers declare capabilities during initialization:
1767
+
1768
+ | Capability | Feature Flag | Description |
1769
+ |--------------|------------------------------|------------------------------------|
1770
+ | `prompts` | `listChanged` | Prompt template management |
1771
+ | `resources` | `subscribe`<br/>`listChanged`| Resource exposure and updates |
1772
+ | `tools` | `listChanged` | Tool discovery and execution |
1773
+ | `logging` | - | Server logging configuration |
1774
+ | `completions`| - | Argument completion suggestions |
1775
+
1776
+ ## Documentation
1777
+
1778
+ - [Model Context Protocol documentation](https://modelcontextprotocol.io)
1779
+ - [Model Context Protocol specification](https://spec.modelcontextprotocol.io)
1780
+ - [Officially supported servers](https://github.com/modelcontextprotocol/servers)
1781
+
1782
+ ## Contributing
1783
+
1784
+ We are passionate about supporting contributors of all levels of experience and would love to see you get involved in the project. See the [contributing guide](CONTRIBUTING.md) to get started.
1785
+
1786
+ ## License
1787
+
1788
+ This project is licensed under the MIT License - see the LICENSE file for details.