There are not clear examples on how to create your own MCP server using the npm package. I attempted to recreate an isolated version using the following package.json but wasn't able to figure out a version that didn't rely on copying the /dist/ folder from this repo into our MCP server repo. Here is our package.json.
{
"name": "@zuplo/mcp",
"version": "0.0.12",
"description": "A fetch API based, remote server first, TypeScript SDK for MCP.",
"type": "module",
"scripts": {
"build": "tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\"",
"watch": "tsc --watch",
"inspector": "npx @modelcontextprotocol/inspector build/index.js",
"start": "node build/index.js",
"test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" npx jest",
"test:full": "TEST_FULL=1 npm test",
"lint": "npx @biomejs/biome@1.9.4 check src/",
"lint:fix": "npx @biomejs/biome@1.9.4 check src/ --fix",
"lint:fix-unsafe": "npx @biomejs/biome@1.9.4 check src/ --fix --unsafe",
"format": "npx @biomejs/biome@1.9.4 format src/ --write"
},
"files": [
"dist/**/**",
"docs/**/**",
"!**/*.spec.*",
"!**/*.test.*",
"!**/*.json",
"!**/*.tsbuildinfo",
"LICENSE",
"README.md"
],
"exports": {
"./jsonrpc2/validation": {
"types": "./dist/jsonrpc2/validation.d.ts",
"import": "./dist/jsonrpc2/validation.js"
},
"./logger": {
"types": "./dist/logger/index.d.ts",
"import": "./dist/logger/index.js"
},
"./server": {
"types": "./dist/server/index.d.ts",
"import": "./dist/server/index.js"
},
"./transport/httpstreamable": {
"types": "./dist/transport/httpstreamable.d.ts",
"import": "./dist/transport/httpstreamable.js"
},
"./tools/zod": {
"types": "./dist/tools/zod.d.ts",
"import": "./dist/tools/zod.js"
},
"./tools/custom": {
"types": "./dist/tools/custom.d.ts",
"import": "./dist/tools/custom.js"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/zuplo/mcp-sdk.git"
},
"author": "Zuplo, Inc.",
"license": "MIT",
"bugs": {
"url": "https://github.com/zuplo/mcp/issues"
},
"homepage": "https://github.com/zuplo/mcp#readme",
"devDependencies": {
"@anthropic-ai/sdk": "^0.54.0",
"@types/jest": "^29.5.14",
"@types/node": "^22.15.32",
"jest": "^29.7.0",
"ts-jest": "^29.3.2",
"ts-node": "^10.9.2",
"typescript": "^5.8.3"
},
"dependencies": {
"@hono/node-server": "^1.14.1",
"@zuplo/mcp": "^0.0.13",
"axios": "^1.9.0",
"dotenv": "^16.5.0",
"hono": "^4.7.9",
"zod": "^3.24.4",
"zod-to-json-schema": "^3.24.5"
},
"jest": {
"testPathIgnorePatterns": [
"/node_modules/",
"/dist/",
"/src/"
]
},
"engines": {
"node": "22.x"
}
}
this clearly relies on /dist/ I am just not sure of how to "correctly" consume it without relying on this. Ideally the examples would include standalone example package files you could copy over without relying on other components of the project.
There are not clear examples on how to create your own MCP server using the npm package. I attempted to recreate an isolated version using the following package.json but wasn't able to figure out a version that didn't rely on copying the /dist/ folder from this repo into our MCP server repo. Here is our package.json.
this clearly relies on /dist/ I am just not sure of how to "correctly" consume it without relying on this. Ideally the examples would include standalone example package files you could copy over without relying on other components of the project.