How to build MCP Server and use MCP Inspector in Node
Run the below 3 command to create a new node project Run the below command to add required dependencies npm install @modelcontextprotocol/sdk axios dotenv Run the below command to add dev dependencies npm install --save-dev typescript @types/node Create tsconfig.json file in the root of the repository and paste the below code { "compilerOptions": { "target": "ES2022", "module": "Node16", "moduleResolution": "Node16", "outDir": "./build", "rootDir": "./src", "strict": true, "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true }, "include": ["src/**/*"], "exclude": ["node_modules"] } Create a new folder named src in project root repository and create a file named index.ts and paste the below code #!/usr/bin/env node ...
Comments
Post a Comment