{"_id":"@aklinker1/mcp-server-sdk","_rev":"6-2d691d4d0af57e4792da2f42f7acd518","name":"@aklinker1/mcp-server-sdk","dist-tags":{"latest":"0.1.6"},"versions":{"0.1.0":{"name":"@aklinker1/mcp-server-sdk","version":"0.1.0","_id":"@aklinker1/mcp-server-sdk@0.1.0","maintainers":[{"name":"_aklinker1","email":"aaronklinker1@gmail.com"}],"dist":{"shasum":"f1b2a379c287ff5c11513d41b7396ff66c2a3166","tarball":"https://registry.npmjs.org/@aklinker1/mcp-server-sdk/-/mcp-server-sdk-0.1.0.tgz","fileCount":25,"integrity":"sha512-NFQ53rba6EpHfO15+k77XPDM4RsTTWoXJB+vgWm64FdIsV/Ul3PjVD5bTcCf5Eg6jLgdTe9BHdU/Vl0gk6g+ag==","signatures":[{"sig":"MEYCIQCN9UB/ozyVvNbBZuU10m74t+NOYJOSMN6xO8OXhT0/nQIhAJ/mym+jt7aCT/ds0ZO8mDLIBRsJHA0Zfm2uaC9IG8pd","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37964},"type":"module","module":"index.ts","shasum":"f1b2a379c287ff5c11513d41b7396ff66c2a3166","scripts":{"dev":"bun run --watch dev.ts","build":"tsdown src/index.ts --dts","dev:mcp":"bunx @modelcontextprotocol/inspector@latest --transport http --server-url http://localhost:3000","prepack":"bun run build"},"_npmUser":{"name":"_aklinker1","email":"aaronklinker1@gmail.com"},"_integrity":"sha512-NFQ53rba6EpHfO15+k77XPDM4RsTTWoXJB+vgWm64FdIsV/Ul3PjVD5bTcCf5Eg6jLgdTe9BHdU/Vl0gk6g+ag==","_npmVersion":"10.8.3","description":"Server-side APIs for creating MCP server-side fetch functions","directories":{},"_nodeVersion":"22.6.0","dependencies":{"uri-template-lite":"^23.4.0","@standard-schema/spec":"^1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.5","oxlint":"^1.39.0","tsdown":"^0.20.0-beta.3","prettier":"^3.7.4","@types/bun":"latest","typescript":"^5.9.3","@aklinker1/check":"^2.2.0","@types/uri-template-lite":"^19.12.4","@typescript/native-preview":"^7.0.0-dev.20260114.1"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-sdk_0.1.0_1768432323945_0.4201270572609719","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@aklinker1/mcp-server-sdk","version":"0.1.2","license":"MIT","_id":"@aklinker1/mcp-server-sdk@0.1.2","maintainers":[{"name":"_aklinker1","email":"aaronklinker1@gmail.com"}],"homepage":"https://jsr.io/@aklinker1/mcp-server-sdk","bugs":{"url":"https://github.com/aklinker1/mcp-server-sdk/issues"},"dist":{"shasum":"fbb85e7639548a7078358724923c1a53de819666","tarball":"https://registry.npmjs.org/@aklinker1/mcp-server-sdk/-/mcp-server-sdk-0.1.2.tgz","fileCount":5,"integrity":"sha512-uV4G6AZ24P7W4d9K0HYvXOWXV2SgUzYlwdmUSQkpp4P3U+hRKNCJ2d8IFs78GDCVWcrDY1zXklvXSn/nV4TfrQ==","signatures":[{"sig":"MEQCIHzTrPMowcCTdrQc4TFWaBStLqKtz865kHzndbeWPPTvAiA0GtMF5e0qIem5SkzbNyT+j/GIyv9kaSRZcoeimKPXSA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aklinker1%2fmcp-server-sdk@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":27299},"type":"module","types":"dist/index.d.mts","module":"dist/index.mjs","exports":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"gitHead":"dab23b9173abb208b55ef62172465e5c43244c96","scripts":{"dev":"bun run --watch dev.ts","build":"tsdown src/index.ts --dts","dev:mcp":"bunx @modelcontextprotocol/inspector@latest --transport http --server-url http://localhost:3000","prepack":"bun run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:01ba0c06-76af-4abf-a409-81b6727c1994"}},"repository":{"url":"git+https://github.com/aklinker1/mcp-server-sdk.git"},"_npmVersion":"11.7.0","description":"Server-side APIs for creating MCP server-side fetch functions","directories":{},"_nodeVersion":"20.19.6","dependencies":{"uri-template-lite":"^23.4.0","@standard-schema/spec":"^1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.5","devDependencies":{"zod":"^4.3.5","oxlint":"^1.39.0","tsdown":"^0.20.0-beta.3","publint":"^0.3.16","prettier":"^3.7.4","@types/bun":"latest","typescript":"^5.9.3","@aklinker1/check":"^2.2.0","@types/uri-template-lite":"^19.12.4","@typescript/native-preview":"^7.0.0-dev.20260114.1"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-sdk_0.1.2_1768434050638_0.5200082454561159","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@aklinker1/mcp-server-sdk","version":"0.1.3","license":"MIT","_id":"@aklinker1/mcp-server-sdk@0.1.3","maintainers":[{"name":"_aklinker1","email":"aaronklinker1@gmail.com"}],"homepage":"https://jsr.io/@aklinker1/mcp-server-sdk","bugs":{"url":"https://github.com/aklinker1/mcp-server-sdk/issues"},"dist":{"shasum":"a1549b009282c255682842efec0f65d692f3c700","tarball":"https://registry.npmjs.org/@aklinker1/mcp-server-sdk/-/mcp-server-sdk-0.1.3.tgz","fileCount":5,"integrity":"sha512-fEEVjlqyaactpMifZ4ZkEtR6hw1OhHGnNTLf6pLWJwiZrPesZ9P0zhgca+pZVmyhf5BSWO1tZ54lvtcGpYyZnA==","signatures":[{"sig":"MEYCIQClG6IRtS8S1BvipYrTlu0NjTkuIBpWVmI1TBrccBTfxwIhANLdJjb5icO+TnuE7YRo/Sq5ntZuO1d1YXCEUFv7N/Ud","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aklinker1%2fmcp-server-sdk@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":32290},"type":"module","types":"dist/index.d.mts","module":"dist/index.mjs","exports":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"gitHead":"c10ad9c3e2e4ef9d666c6cfe51c79b773c125c12","scripts":{"dev":"bun run --watch dev.ts","build":"tsdown src/index.ts --dts","dev:mcp":"bunx @modelcontextprotocol/inspector@latest --transport http --server-url http://localhost:3000","prepack":"bun run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:01ba0c06-76af-4abf-a409-81b6727c1994"}},"repository":{"url":"git+https://github.com/aklinker1/mcp-server-sdk.git"},"_npmVersion":"11.7.0","description":"Server-side APIs for creating MCP server-side fetch functions","directories":{},"_nodeVersion":"20.19.6","dependencies":{"uri-template-lite":"^23.4.0","@standard-schema/spec":"^1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.5","devDependencies":{"zod":"^4.3.5","oxlint":"^1.39.0","tsdown":"^0.20.0-beta.3","publint":"^0.3.16","prettier":"^3.7.4","@types/bun":"latest","typescript":"^5.9.3","@aklinker1/check":"^2.2.0","@types/uri-template-lite":"^19.12.4","@typescript/native-preview":"^7.0.0-dev.20260114.1"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-sdk_0.1.3_1768580162726_0.9875178680611003","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@aklinker1/mcp-server-sdk","version":"0.1.4","license":"MIT","_id":"@aklinker1/mcp-server-sdk@0.1.4","maintainers":[{"name":"_aklinker1","email":"aaronklinker1@gmail.com"}],"homepage":"https://jsr.io/@aklinker1/mcp-server-sdk","bugs":{"url":"https://github.com/aklinker1/mcp-server-sdk/issues"},"dist":{"shasum":"e5c62d589af93c48f57cc477dd1e083eea5d420c","tarball":"https://registry.npmjs.org/@aklinker1/mcp-server-sdk/-/mcp-server-sdk-0.1.4.tgz","fileCount":5,"integrity":"sha512-sAWbfGtzOWM8JhHmZfrIneHNcBU7dL6NLP+CFiJGR1zM0/lDexFvmTP7+QepBRBYQL0yzSSjpcwD1j+L+itJMw==","signatures":[{"sig":"MEYCIQDtLtQ06p/cSiFw0EirkzOE/VGrJjZuwVxo39mPt+PAEAIhAPMFnNZl26I4DOT0s/xhGwFnAb0M6svQfwCBiGQSSC0+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aklinker1%2fmcp-server-sdk@0.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":32477},"type":"module","types":"dist/index.d.mts","module":"dist/index.mjs","exports":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"gitHead":"e4d35642a1a96c71ae4acbefe3fc6f64635703af","scripts":{"dev":"bun run --watch dev.ts","build":"tsdown src/index.ts --dts","dev:mcp":"bunx @modelcontextprotocol/inspector@latest --transport http --server-url http://localhost:3000","prepack":"bun run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:01ba0c06-76af-4abf-a409-81b6727c1994"}},"repository":{"url":"git+https://github.com/aklinker1/mcp-server-sdk.git"},"_npmVersion":"11.7.0","description":"Server-side APIs for creating MCP server-side fetch functions","directories":{},"_nodeVersion":"20.19.6","dependencies":{"uri-template-lite":"^23.4.0","@standard-schema/spec":"^1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.5","devDependencies":{"zod":"^4.3.5","oxlint":"^1.39.0","tsdown":"^0.20.0-beta.3","publint":"^0.3.16","prettier":"^3.7.4","@types/bun":"latest","typescript":"^5.9.3","@aklinker1/check":"^2.2.0","@types/uri-template-lite":"^19.12.4","@typescript/native-preview":"^7.0.0-dev.20260114.1"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-sdk_0.1.4_1768580824435_0.591417372770134","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@aklinker1/mcp-server-sdk","version":"0.1.5","license":"MIT","_id":"@aklinker1/mcp-server-sdk@0.1.5","maintainers":[{"name":"_aklinker1","email":"aaronklinker1@gmail.com"}],"homepage":"https://jsr.io/@aklinker1/mcp-server-sdk","bugs":{"url":"https://github.com/aklinker1/mcp-server-sdk/issues"},"dist":{"shasum":"1bd7e6a73b0b8601346180e79efde207be1f1457","tarball":"https://registry.npmjs.org/@aklinker1/mcp-server-sdk/-/mcp-server-sdk-0.1.5.tgz","fileCount":5,"integrity":"sha512-vQmwU03DU8RDoVdSJSABjF2OR2nFzNPyEsnwiv1vR3OWOhwYR9jbOchhOeoVKziNqhCy6ysqZO3GQOevyJQMIw==","signatures":[{"sig":"MEUCIQDQ51fpr89XARAXw2q3HyGjM0TEcjTF5XMDSkwvm5V2VQIgSESSum2aFtGl1+nZccQmiu9+31qhWSYTuZqg7+bveic=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aklinker1%2fmcp-server-sdk@0.1.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":32776},"type":"module","types":"dist/index.d.mts","module":"dist/index.mjs","exports":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"gitHead":"0b0b1a97bac979e3837b590ce3ac87d5ff034837","scripts":{"dev":"bun run --watch dev.ts","build":"tsdown src/index.ts --dts","dev:mcp":"bunx @modelcontextprotocol/inspector@latest --transport http --server-url http://localhost:3000","prepack":"bun run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:01ba0c06-76af-4abf-a409-81b6727c1994"}},"repository":{"url":"git+https://github.com/aklinker1/mcp-server-sdk.git"},"_npmVersion":"11.7.0","description":"Server-side APIs for creating MCP server-side fetch functions","directories":{},"_nodeVersion":"20.19.6","dependencies":{"uri-template-lite":"^23.4.0","@standard-schema/spec":"^1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.5","devDependencies":{"zod":"^4.3.5","oxlint":"^1.39.0","tsdown":"^0.20.0-beta.3","publint":"^0.3.16","prettier":"^3.7.4","@types/bun":"latest","typescript":"^5.9.3","@aklinker1/check":"^2.2.0","@types/uri-template-lite":"^19.12.4","@typescript/native-preview":"^7.0.0-dev.20260114.1"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-sdk_0.1.5_1768581304908_0.30841802089755155","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@aklinker1/mcp-server-sdk","version":"0.1.6","description":"SDK for building simple MCP servers with Bun & Deno","packageManager":"bun@1.3.5","type":"module","scripts":{"dev":"bun run --watch dev.ts","dev:mcp":"bunx @modelcontextprotocol/inspector@latest --transport http --server-url http://localhost:3000","build":"tsdown src/index.ts --dts","prepack":"bun run build"},"devDependencies":{"@aklinker1/check":"^2.2.0","@types/bun":"latest","@types/uri-template-lite":"^19.12.4","@typescript/native-preview":"^7.0.0-dev.20260114.1","oxlint":"^1.39.0","publint":"^0.3.16","prettier":"^3.7.4","tsdown":"^0.20.0-beta.3","typescript":"^5.9.3","zod":"^4.3.5"},"dependencies":{"@standard-schema/spec":"^1.1.0","uri-template-lite":"^23.4.0"},"module":"dist/index.mjs","types":"dist/index.d.mts","exports":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"homepage":"https://jsr.io/@aklinker1/mcp-server-sdk","repository":{"url":"git+https://github.com/aklinker1/mcp-server-sdk.git"},"license":"MIT","publishConfig":{"access":"public"},"gitHead":"c4b7f3a819cd9c6958cef241798e2b82a4e5b0c1","_id":"@aklinker1/mcp-server-sdk@0.1.6","bugs":{"url":"https://github.com/aklinker1/mcp-server-sdk/issues"},"_nodeVersion":"20.20.0","_npmVersion":"11.11.1","dist":{"integrity":"sha512-LMty/q3Rr5rkeK+fEycGzpJkjX4rk9LTuHGYqAmqLApnpxonBjWWyhv85iy0o4OQRJrDG3sYR+hgjj/eXnFPfg==","shasum":"79e8037031df5a482baad00b323b96b6d83d40e9","tarball":"https://registry.npmjs.org/@aklinker1/mcp-server-sdk/-/mcp-server-sdk-0.1.6.tgz","fileCount":5,"unpackedSize":33927,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aklinker1%2fmcp-server-sdk@0.1.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIC4v0bI2H4sQI/abMDUTkrU40gjLwnSoXNKLpj+mul8aAiEA9AMPkmuzgmED5QKF6TUzV6+wa57gBVfuwdsZv2k7Cw4="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:01ba0c06-76af-4abf-a409-81b6727c1994"}},"directories":{},"maintainers":[{"name":"_aklinker1","email":"aaronklinker1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-server-sdk_0.1.6_1773277585470_0.37741794100880344"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-14T23:12:03.891Z","modified":"2026-03-12T01:06:26.052Z","0.1.0":"2026-01-14T23:12:04.139Z","0.1.2":"2026-01-14T23:40:50.789Z","0.1.3":"2026-01-16T16:16:02.861Z","0.1.4":"2026-01-16T16:27:04.586Z","0.1.5":"2026-01-16T16:35:05.063Z","0.1.6":"2026-03-12T01:06:25.634Z"},"bugs":{"url":"https://github.com/aklinker1/mcp-server-sdk/issues"},"license":"MIT","homepage":"https://jsr.io/@aklinker1/mcp-server-sdk","repository":{"url":"git+https://github.com/aklinker1/mcp-server-sdk.git"},"description":"SDK for building simple MCP servers with Bun & Deno","maintainers":[{"name":"_aklinker1","email":"aaronklinker1@gmail.com"}],"readme":"<div align=\"center\">\n\n# `@aklinker1/mcp-server-sdk`\n\n[![JSR](https://jsr.io/badges/@aklinker1/mcp-server-sdk)](https://jsr.io/@aklinker1/mcp-server-sdk) [![NPM Version](https://img.shields.io/npm/v/%40aklinker1%2Fmcp-server-sdk?logo=npm&labelColor=red&color=white)](https://www.npmjs.com/package/@aklinker1/mcp-server-sdk) [![Docs](https://img.shields.io/badge/API%20Reference-blue?logo=readme&logoColor=white)](https://jsr.io/@aklinker1/mcp-server-sdk/doc) [![Install Size](https://pkg-size.dev/badge/install/61804)](https://pkg-size.dev/@aklinker1%2Fmcp-server-sdk)\n\nSDK for building simple MCP servers with Bun & Deno.\n\n</div>\n\nAlternative to the official [`@modelcontextprotocol/sdk@v1`](https://github.com/modelcontextprotocol/typescript-sdk/tree/v1.x) with:\n\n- [Standard Schema compatible validation library](https://standardschema.dev/schema#what-schema-libraries-implement-the-spec) support\n- [WHATWG `fetch` standard](https://fetch.spec.whatwg.org/) support (Bun & Deno servers)\n- Minimal dependencies ([3 packages summing to 62KB](https://pkg-size.dev/@aklinker1%2Fmcp-server-sdk) vs [90 summing to 14MB](https://pkg-size.dev/@modelcontextprotocol%2Fsdk))\n- Result type builders\n\n> [!WARNING]\n>\n> [V2](https://github.com/modelcontextprotocol/typescript-sdk/milestone/6) of the official SDK will likely add support for all my changes. Waiting for that version to be released.\n\n**Supported Protocol Versions**\n\n| Protocol Version                                                       | Supported? |\n| ---------------------------------------------------------------------- | :--------: |\n| [2025-11-25](https://modelcontextprotocol.io/specification/2025-11-25) |     ✅     |\n| [2025-06-18](https://modelcontextprotocol.io/specification/2025-06-18) |     ✅     |\n| [2025-03-26](https://modelcontextprotocol.io/specification/2025-03-26) |     ✅     |\n| [2024-11-05](https://modelcontextprotocol.io/specification/2024-11-05) |     ❌     |\n| [draft](https://modelcontextprotocol.io/specification/draft)           |     ❌     |\n\n**Supported Features**\n\n| MCP Feature                                                                                                               | Supported? |\n| ------------------------------------------------------------------------------------------------------------------------- | :--------: |\n| [Transports > stdio](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#stdio)                     |     ❌     |\n| [Transports > Streamable HTTP](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http) |     ✅     |\n| [Prompts](https://modelcontextprotocol.io/specification/2025-03-26/server/prompts)                                        |     ✅     |\n| [Resources](https://modelcontextprotocol.io/specification/2025-03-26/server/resources)                                    |     ✅     |\n| [Tools](https://modelcontextprotocol.io/specification/2025-03-26/server/tools)                                            |     ✅     |\n| [Authorization](https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization)                             |     ❌     |\n| [Basic Utilities > Cancellation](https://modelcontextprotocol.io/specification/2025-03-26/basic/utilities/cancellation)   |     ❌     |\n| [Basic Utilities > Ping](https://modelcontextprotocol.io/specification/2025-03-26/basic/utilities/ping)                   |     ✅     |\n| [Basic Utilities > Progress](https://modelcontextprotocol.io/specification/2025-03-26/basic/utilities/progress)           |     ❌     |\n| [Server Utilities > Completion](https://modelcontextprotocol.io/specification/2025-03-26/server/utilities/completion)     |     ❌     |\n| [Server Utilities > Logging](https://modelcontextprotocol.io/specification/2025-03-26/server/utilities/logging)           |     ❌     |\n| [Server Utilities > Pagination](https://modelcontextprotocol.io/specification/2025-03-26/server/utilities/pagination)     |     ❌     |\n\n> Goal here is to create a generalized MCP `fetch` function that I can host in my homelab and use in chats that supports [Bun](https://bun.com).\n\n## Installation\n\n```sh\nnpm i @aklinker1/mcp-server-sdk\nbun add @aklinker1/mcp-server-sdk\ndeno add @aklinker1/mcp-server-sdk\n```\n\n## Quick Start\n\n```ts\n// main.ts\n\nimport {\n  createMcpFetchTransport,\n  definePrompt,\n  defineTool,\n  defineResourceTemplate,\n} from \"@aklinker1/mcp-server-sdk\";\nimport z from \"zod\";\n\n// Define your prompts, resources, and tools\n\nconst examplePrompt = definePrompt({\n  argsSchema: z.object({\n    param: z.string(),\n  }),\n  handler: async ({ args }) => {\n    // ...\n  },\n});\n\nconst exampleResource = defineResourceTemplate({\n  uriTemplate: \"example://{id}\",\n  uriSchema: z.object({\n    id: z.string(),\n  }),\n  handler: async ({ uri }) => {\n    // ...\n  },\n});\n\nconst exampleTool = defineTool({\n  inputSchema: z.object({\n    param: z.string(),\n  }),\n  handler: async ({ input }) => {\n    // ...\n  },\n});\n\n// Create a server-side fetch function\n\nconst fetch = createMcpFetchTransport({\n  toJsonSchema: z.toJSONSchema,\n  prompts: {\n    examplePrompt,\n  },\n  resources: {\n    exampleResource,\n  },\n  tools: {\n    exampleTool,\n  },\n});\n\n// Serve the MCP server at http://localhost:3000\n\nBun.serve({ fetch });\n// or\nDeno.serve({ fetch });\n```\n\nThen run your server!\n\n```sh\nbun run main.ts\ndeno run --allow-net main.ts\n```\n\n## MCP Inspector\n\nUse the `@modelcontextprotocol/inspector` package to inspec your server:\n\n```sh\nbunx @modelcontextprotocol/inspector@latest --transport http --server-url http://localhost:3000\n```\n","readmeFilename":"README.md"}