├── inspector ├── .prettierrc ├── client │ ├── src │ │ ├── __mocks__ │ │ │ └── styleMock.js │ │ ├── vite-env.d.ts │ │ ├── lib │ │ │ ├── utils.ts │ │ │ ├── notificationTypes.ts │ │ │ ├── configurationTypes.ts │ │ │ ├── auth-types.ts │ │ │ ├── hooks │ │ │ │ ├── useTheme.ts │ │ │ │ ├── useDraggablePane.ts │ │ │ │ ├── useCompletionState.ts │ │ │ │ └── useToast.ts │ │ │ ├── constants.ts │ │ │ └── auth.ts │ │ ├── components │ │ │ ├── ConsoleTab.tsx │ │ │ ├── PingTab.tsx │ │ │ ├── ui │ │ │ │ ├── label.tsx │ │ │ │ ├── textarea.tsx │ │ │ │ ├── input.tsx │ │ │ │ ├── toaster.tsx │ │ │ │ ├── checkbox.tsx │ │ │ │ ├── tooltip.tsx │ │ │ │ ├── popover.tsx │ │ │ │ ├── alert.tsx │ │ │ │ ├── tabs.tsx │ │ │ │ ├── button.tsx │ │ │ │ ├── combobox.tsx │ │ │ │ ├── dialog.tsx │ │ │ │ ├── toast.tsx │ │ │ │ ├── command.tsx │ │ │ │ └── select.tsx │ │ │ ├── SamplingTab.tsx │ │ │ ├── ListPane.tsx │ │ │ ├── __tests__ │ │ │ │ ├── samplingTab.test.tsx │ │ │ │ ├── samplingRequest.test.tsx │ │ │ │ └── DynamicJsonForm.test.tsx │ │ │ ├── JsonEditor.tsx │ │ │ ├── RootsTab.tsx │ │ │ ├── OAuthCallback.tsx │ │ │ ├── OAuthDebugCallback.tsx │ │ │ ├── SamplingRequest.tsx │ │ │ ├── History.tsx │ │ │ └── PromptsTab.tsx │ │ ├── main.tsx │ │ ├── utils │ │ │ ├── escapeUnicode.ts │ │ │ ├── __tests__ │ │ │ │ ├── escapeUnicode.test.ts │ │ │ │ └── oauthUtils.ts │ │ │ ├── oauthUtils.ts │ │ │ ├── schemaUtils.ts │ │ │ ├── configUtils.ts │ │ │ └── jsonUtils.ts │ │ ├── App.css │ │ └── index.css │ ├── postcss.config.js │ ├── tsconfig.jest.json │ ├── tsconfig.json │ ├── .gitignore │ ├── index.html │ ├── components.json │ ├── vite.config.ts │ ├── tsconfig.node.json │ ├── tsconfig.app.json │ ├── eslint.config.js │ ├── jest.config.cjs │ ├── public │ │ └── mcp.svg │ ├── bin │ │ ├── client.js │ │ └── start.js │ ├── README.md │ ├── tailwind.config.js │ └── package.json ├── .gitattributes ├── cli │ ├── src │ │ ├── client │ │ │ ├── types.ts │ │ │ ├── index.ts │ │ │ ├── prompts.ts │ │ │ ├── resources.ts │ │ │ ├── connection.ts │ │ │ └── tools.ts │ │ ├── error-handler.ts │ │ └── transport.ts │ ├── tsconfig.json │ ├── package.json │ └── scripts │ │ └── make-executable.js ├── .prettierignore ├── mcp-inspector.png ├── .npmrc ├── Dockerfile ├── .gitignore ├── sample-config.json ├── server │ ├── tsconfig.json │ ├── package.json │ └── src │ │ └── mcpProxy.ts ├── SECURITY.md ├── LICENSE ├── CLAUDE.md ├── CONTRIBUTING.md ├── .github │ └── workflows │ │ └── main.yml ├── package.json └── CODE_OF_CONDUCT.md ├── article ├── logo.jpg ├── screen-1c.png ├── screen-config.png └── screen-insomnia.png ├── mcp ├── requirements.txt ├── Dockerfile ├── config.py ├── test_multivector.sh └── MULTIVECTOR_SEARCH.md ├── loader ├── requirements.txt ├── config.py └── Dockerfile ├── embeddings ├── requirements.txt ├── config.json ├── Dockerfile ├── docker-compose.yml └── embedding_service.py ├── ПолучитьТекстСтруктурыКонфигурацииФайлами.epf ├── stop.sh ├── start.sh ├── LICENSE ├── .gitignore ├── docker-compose.yml └── README.md /inspector/.prettierrc: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inspector/client/src/__mocks__/styleMock.js: -------------------------------------------------------------------------------- 1 | module.exports = {}; 2 | -------------------------------------------------------------------------------- /inspector/.gitattributes: -------------------------------------------------------------------------------- 1 | package-lock.json linguist-generated=true 2 | -------------------------------------------------------------------------------- /inspector/client/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /article/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSerg/mcp-1c-v1/HEAD/article/logo.jpg -------------------------------------------------------------------------------- /inspector/cli/src/client/types.ts: -------------------------------------------------------------------------------- 1 | export type McpResponse = Record; 2 | -------------------------------------------------------------------------------- /article/screen-1c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSerg/mcp-1c-v1/HEAD/article/screen-1c.png -------------------------------------------------------------------------------- /mcp/requirements.txt: -------------------------------------------------------------------------------- 1 | fastmcp 2 | starlette 3 | qdrant-client 4 | requests 5 | python-dotenv -------------------------------------------------------------------------------- /inspector/.prettierignore: -------------------------------------------------------------------------------- 1 | packages 2 | server/build 3 | CODE_OF_CONDUCT.md 4 | SECURITY.md 5 | -------------------------------------------------------------------------------- /article/screen-config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSerg/mcp-1c-v1/HEAD/article/screen-config.png -------------------------------------------------------------------------------- /article/screen-insomnia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSerg/mcp-1c-v1/HEAD/article/screen-insomnia.png -------------------------------------------------------------------------------- /inspector/mcp-inspector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSerg/mcp-1c-v1/HEAD/inspector/mcp-inspector.png -------------------------------------------------------------------------------- /loader/requirements.txt: -------------------------------------------------------------------------------- 1 | einops 2 | qdrant-client 3 | pandas 4 | streamlit 5 | requests 6 | python-dotenv 7 | -------------------------------------------------------------------------------- /embeddings/requirements.txt: -------------------------------------------------------------------------------- 1 | sentence-transformers 2 | einops 3 | fastapi 4 | uvicorn[standard] 5 | torch 6 | numpy -------------------------------------------------------------------------------- /inspector/.npmrc: -------------------------------------------------------------------------------- 1 | registry="https://registry.npmjs.org/" 2 | @modelcontextprotocol:registry="https://registry.npmjs.org/" 3 | -------------------------------------------------------------------------------- /inspector/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:18-alpine 2 | WORKDIR /app 3 | COPY . . 4 | RUN npm install && npm run build 5 | CMD ["npm", "start"] 6 | -------------------------------------------------------------------------------- /inspector/client/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /ПолучитьТекстСтруктурыКонфигурацииФайлами.epf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSerg/mcp-1c-v1/HEAD/ПолучитьТекстСтруктурыКонфигурацииФайлами.epf -------------------------------------------------------------------------------- /inspector/client/src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | -------------------------------------------------------------------------------- /stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Скрипт для остановки всех сервисов 4 | 5 | echo "🛑 Остановка всех сервисов..." 6 | 7 | # Остановка всех сервисов 8 | docker-compose down 9 | 10 | echo "✅ Все сервисы остановлены!" 11 | -------------------------------------------------------------------------------- /inspector/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .vscode 3 | .idea 4 | node_modules/ 5 | *-workspace/ 6 | server/build 7 | client/dist 8 | client/tsconfig.app.tsbuildinfo 9 | client/tsconfig.node.tsbuildinfo 10 | cli/build 11 | test-output 12 | -------------------------------------------------------------------------------- /inspector/cli/src/client/index.ts: -------------------------------------------------------------------------------- 1 | // Re-export everything from the client modules 2 | export * from "./connection.js"; 3 | export * from "./prompts.js"; 4 | export * from "./resources.js"; 5 | export * from "./tools.js"; 6 | export * from "./types.js"; 7 | -------------------------------------------------------------------------------- /inspector/client/tsconfig.jest.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.app.json", 3 | "compilerOptions": { 4 | "jsx": "react-jsx", 5 | "esModuleInterop": true, 6 | "module": "ESNext", 7 | "moduleResolution": "node" 8 | }, 9 | "include": ["src"] 10 | } 11 | -------------------------------------------------------------------------------- /inspector/client/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { "path": "./tsconfig.app.json" }, 5 | { "path": "./tsconfig.node.json" } 6 | ], 7 | "compilerOptions": { 8 | "baseUrl": ".", 9 | "paths": { 10 | "@/*": ["./src/*"] 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /inspector/client/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /inspector/client/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | MCP Inspector 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /inspector/sample-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "mcpServers": { 3 | "everything": { 4 | "command": "npx", 5 | "args": ["@modelcontextprotocol/server-everything"], 6 | "env": { 7 | "HELLO": "Hello MCP!" 8 | } 9 | }, 10 | "myserver": { 11 | "command": "node", 12 | "args": ["build/index.js", "arg1", "arg2"], 13 | "env": { 14 | "KEY": "value", 15 | "KEY2": "value2" 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /inspector/client/src/components/ConsoleTab.tsx: -------------------------------------------------------------------------------- 1 | import { TabsContent } from "@/components/ui/tabs"; 2 | 3 | const ConsoleTab = () => ( 4 | 5 |
6 |
Welcome to MCP Client Console
7 | {/* Console output would go here */} 8 |
9 |
10 | ); 11 | 12 | export default ConsoleTab; 13 | -------------------------------------------------------------------------------- /inspector/server/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2022", 4 | "module": "Node16", 5 | "moduleResolution": "Node16", 6 | "outDir": "./build", 7 | "rootDir": "./src", 8 | "strict": true, 9 | "esModuleInterop": true, 10 | "skipLibCheck": true, 11 | "forceConsistentCasingInFileNames": true, 12 | "resolveJsonModule": true 13 | }, 14 | "include": ["src/**/*"], 15 | "exclude": ["node_modules", "packages", "**/*.spec.ts"] 16 | } 17 | -------------------------------------------------------------------------------- /inspector/client/src/main.tsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | import { Toaster } from "@/components/ui/toaster.tsx"; 4 | import App from "./App.tsx"; 5 | import "./index.css"; 6 | import { TooltipProvider } from "./components/ui/tooltip.tsx"; 7 | 8 | createRoot(document.getElementById("root")!).render( 9 | 10 | 11 | 12 | 13 | 14 | , 15 | ); 16 | -------------------------------------------------------------------------------- /inspector/cli/src/error-handler.ts: -------------------------------------------------------------------------------- 1 | function formatError(error: unknown): string { 2 | let message: string; 3 | 4 | if (error instanceof Error) { 5 | message = error.message; 6 | } else if (typeof error === "string") { 7 | message = error; 8 | } else { 9 | message = "Unknown error"; 10 | } 11 | 12 | return message; 13 | } 14 | 15 | export function handleError(error: unknown): never { 16 | const errorMessage = formatError(error); 17 | console.error(errorMessage); 18 | 19 | process.exit(1); 20 | } 21 | -------------------------------------------------------------------------------- /inspector/client/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": false, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "src/index.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /inspector/cli/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2022", 4 | "module": "NodeNext", 5 | "moduleResolution": "NodeNext", 6 | "outDir": "./build", 7 | "rootDir": "./src", 8 | "strict": true, 9 | "esModuleInterop": true, 10 | "skipLibCheck": true, 11 | "forceConsistentCasingInFileNames": true, 12 | "resolveJsonModule": true, 13 | "noUncheckedIndexedAccess": true 14 | }, 15 | "include": ["src/**/*"], 16 | "exclude": ["node_modules", "packages", "**/*.spec.ts", "build"] 17 | } 18 | -------------------------------------------------------------------------------- /inspector/client/vite.config.ts: -------------------------------------------------------------------------------- 1 | import react from "@vitejs/plugin-react"; 2 | import path from "path"; 3 | import { defineConfig } from "vite"; 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [react()], 8 | server: { 9 | host: true, 10 | }, 11 | resolve: { 12 | alias: { 13 | "@": path.resolve(__dirname, "./src"), 14 | }, 15 | }, 16 | build: { 17 | minify: false, 18 | rollupOptions: { 19 | output: { 20 | manualChunks: undefined, 21 | }, 22 | }, 23 | }, 24 | }); 25 | -------------------------------------------------------------------------------- /inspector/client/src/utils/escapeUnicode.ts: -------------------------------------------------------------------------------- 1 | // Utility function to escape Unicode characters 2 | export function escapeUnicode(obj: unknown): string { 3 | return JSON.stringify( 4 | obj, 5 | (_key: string, value) => { 6 | if (typeof value === "string") { 7 | // Replace non-ASCII characters with their Unicode escape sequences 8 | return value.replace(/[^\0-\x7F]/g, (char) => { 9 | return "\\u" + ("0000" + char.charCodeAt(0).toString(16)).slice(-4); 10 | }); 11 | } 12 | return value; 13 | }, 14 | 2, 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /inspector/client/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2022", 4 | "lib": ["ES2023"], 5 | "module": "ESNext", 6 | "skipLibCheck": true, 7 | 8 | /* Bundler mode */ 9 | "moduleResolution": "bundler", 10 | "allowImportingTsExtensions": true, 11 | "isolatedModules": true, 12 | "moduleDetection": "force", 13 | "noEmit": true, 14 | 15 | /* Linting */ 16 | "strict": true, 17 | "noUnusedLocals": true, 18 | "noUnusedParameters": true, 19 | "noFallthroughCasesInSwitch": true 20 | }, 21 | "include": ["vite.config.ts"] 22 | } 23 | -------------------------------------------------------------------------------- /embeddings/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "model": { 3 | "name": "all-MiniLM-L6-v2", 4 | "trust_remote_code": true, 5 | "default_task": "retrieval.passage" 6 | }, 7 | "models_info": { 8 | "all-MiniLM-L6-v2": { 9 | "dimensions": 384, 10 | "supports_task": false 11 | }, 12 | "jinaai/jina-embeddings-v3": { 13 | "dimensions": 1024, 14 | "supports_task": true 15 | }, 16 | "Qwen/Qwen3-Embedding-0.6B": { 17 | "dimensions": 1024, 18 | "supports_task": false 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /loader/config.py: -------------------------------------------------------------------------------- 1 | # Конфигурация для loader 2 | import os 3 | from dotenv import load_dotenv 4 | 5 | load_dotenv() 6 | 7 | EMBEDDING_SERVICE_URL = os.getenv( 8 | "EMBEDDING_SERVICE_URL", "http://localhost:5000") 9 | QDRANT_HOST = os.getenv("QDRANT_HOST", "localhost") 10 | QDRANT_PORT = int(os.getenv("QDRANT_PORT", "6333")) 11 | COLLECTION_NAME = os.getenv("COLLECTION_NAME", "1c_rag") 12 | 13 | # Параметры батчинга 14 | # Обрабатывать строки CSV пачками по 250 15 | ROW_BATCH_SIZE = int(os.getenv("ROW_BATCH_SIZE", "250")) 16 | # Размер батча для эмбеддингов 17 | EMBEDDING_BATCH_SIZE = int(os.getenv("EMBEDDING_BATCH_SIZE", "50")) 18 | -------------------------------------------------------------------------------- /start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Скрипт для запуска всех сервисов 4 | 5 | echo "🚀 Запуск всех сервисов..." 6 | 7 | # Создание Docker сети если она не существует 8 | docker network create mcp-network 2>/dev/null || true 9 | 10 | # Запуск всех сервисов 11 | docker-compose up --build -d 12 | 13 | echo "✅ Все сервисы запущены!" 14 | echo "" 15 | echo "📊 Доступные сервисы:" 16 | echo "- Loader (Streamlit): http://localhost:8501" 17 | echo "- Embedding Service: http://localhost:5000" 18 | echo "- Qdrant: http://localhost:6333/dashboard" 19 | echo "- MCP Server: http://localhost:8000/mcp" 20 | echo "- MCP Inspector: http://localhost:6274" 21 | -------------------------------------------------------------------------------- /loader/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.11-slim 2 | 3 | # Установка системных зависимостей 4 | RUN apt-get update && apt-get install -y \ 5 | build-essential \ 6 | curl \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | # Создание рабочей директории 10 | WORKDIR /app 11 | 12 | # Копирование requirements.txt и установка зависимостей 13 | COPY requirements.txt . 14 | RUN pip install --no-cache-dir -r requirements.txt 15 | 16 | # Копирование исходного кода 17 | COPY . . 18 | 19 | # Экспонирование порта Streamlit 20 | EXPOSE 8501 21 | 22 | # Команда запуска 23 | CMD ["streamlit", "run", "loader.py", "--server.port=8501", "--server.address=0.0.0.0"] 24 | -------------------------------------------------------------------------------- /mcp/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.11-slim 2 | 3 | WORKDIR /app 4 | 5 | # Install system dependencies 6 | RUN apt-get update && apt-get install -y \ 7 | curl \ 8 | gcc \ 9 | && rm -rf /var/lib/apt/lists/* 10 | 11 | # Copy requirements first for better caching 12 | COPY requirements.txt . 13 | RUN pip install --no-cache-dir -r requirements.txt 14 | 15 | # Copy application code 16 | COPY . . 17 | 18 | # Expose port 19 | EXPOSE 8000 20 | 21 | # Health check 22 | # HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ 23 | # CMD curl -f http://localhost:8000/health || exit 1 24 | 25 | # Run the application 26 | CMD ["python", "mcp_server.py"] 27 | -------------------------------------------------------------------------------- /inspector/client/src/components/PingTab.tsx: -------------------------------------------------------------------------------- 1 | import { TabsContent } from "@/components/ui/tabs"; 2 | import { Button } from "@/components/ui/button"; 3 | 4 | const PingTab = ({ onPingClick }: { onPingClick: () => void }) => { 5 | return ( 6 | 7 |
8 |
9 | 15 |
16 |
17 |
18 | ); 19 | }; 20 | 21 | export default PingTab; 22 | -------------------------------------------------------------------------------- /inspector/client/src/App.css: -------------------------------------------------------------------------------- 1 | #root { 2 | margin: 0 auto; 3 | } 4 | 5 | .logo { 6 | height: 6em; 7 | padding: 1.5em; 8 | will-change: filter; 9 | transition: filter 300ms; 10 | } 11 | .logo:hover { 12 | filter: drop-shadow(0 0 2em #646cffaa); 13 | } 14 | .logo.react:hover { 15 | filter: drop-shadow(0 0 2em #61dafbaa); 16 | } 17 | 18 | @keyframes logo-spin { 19 | from { 20 | transform: rotate(0deg); 21 | } 22 | to { 23 | transform: rotate(360deg); 24 | } 25 | } 26 | 27 | @media (prefers-reduced-motion: no-preference) { 28 | a:nth-of-type(2) .logo { 29 | animation: logo-spin infinite 20s linear; 30 | } 31 | } 32 | 33 | .card { 34 | padding: 2em; 35 | } 36 | 37 | .read-the-docs { 38 | color: #888; 39 | } 40 | -------------------------------------------------------------------------------- /embeddings/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.11-slim 2 | 3 | WORKDIR /app 4 | 5 | # Install system dependencies 6 | RUN apt-get update && apt-get install -y \ 7 | curl \ 8 | gcc \ 9 | g++ \ 10 | && rm -rf /var/lib/apt/lists/* 11 | 12 | # Copy requirements first for better caching 13 | COPY requirements.txt . 14 | RUN pip install --no-cache-dir -r requirements.txt 15 | 16 | # Copy configuration and application code 17 | COPY config.json . 18 | COPY embedding_service.py . 19 | 20 | # Expose port 21 | EXPOSE 5000 22 | 23 | # Health check 24 | HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ 25 | CMD curl -f http://localhost:5000/health || exit 1 26 | 27 | # Run the application 28 | CMD ["python", "embedding_service.py"] 29 | -------------------------------------------------------------------------------- /inspector/client/src/lib/notificationTypes.ts: -------------------------------------------------------------------------------- 1 | import { 2 | NotificationSchema as BaseNotificationSchema, 3 | ClientNotificationSchema, 4 | ServerNotificationSchema, 5 | } from "@modelcontextprotocol/sdk/types.js"; 6 | import { z } from "zod"; 7 | 8 | export const StdErrNotificationSchema = BaseNotificationSchema.extend({ 9 | method: z.literal("notifications/stderr"), 10 | params: z.object({ 11 | content: z.string(), 12 | }), 13 | }); 14 | 15 | export const NotificationSchema = ClientNotificationSchema.or( 16 | StdErrNotificationSchema, 17 | ) 18 | .or(ServerNotificationSchema) 19 | .or(BaseNotificationSchema); 20 | 21 | export type StdErrNotification = z.infer; 22 | export type Notification = z.infer; 23 | -------------------------------------------------------------------------------- /inspector/client/src/components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import * as LabelPrimitive from "@radix-ui/react-label"; 3 | import { cva, type VariantProps } from "class-variance-authority"; 4 | 5 | import { cn } from "@/lib/utils"; 6 | 7 | const labelVariants = cva( 8 | "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", 9 | ); 10 | 11 | const Label = React.forwardRef< 12 | React.ElementRef, 13 | React.ComponentPropsWithoutRef & 14 | VariantProps 15 | >(({ className, ...props }, ref) => ( 16 | 21 | )); 22 | Label.displayName = LabelPrimitive.Root.displayName; 23 | 24 | export { Label }; 25 | -------------------------------------------------------------------------------- /inspector/client/src/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | 3 | import { cn } from "@/lib/utils"; 4 | 5 | export type TextareaProps = React.TextareaHTMLAttributes; 6 | 7 | const Textarea = React.forwardRef( 8 | ({ className, ...props }, ref) => { 9 | return ( 10 |