{"_id":"@apexmcp/sdk","_rev":"5-a0f68c75fb777615ae1f9c6413467d16","name":"@apexmcp/sdk","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@apexmcp/sdk","version":"1.0.0","keywords":["apexmcp","mcp","model-context-protocol","sdk","typescript","server","tools","resources"],"author":{"name":"@keyrxng"},"license":"MIT","_id":"@apexmcp/sdk@1.0.0","maintainers":[{"name":"official_apexmcp","email":"kieranpatton@proton.me"}],"dist":{"shasum":"10c83ad74c14ec0735abb2558c0136084fe1b38c","tarball":"https://registry.npmjs.org/@apexmcp/sdk/-/sdk-1.0.0.tgz","fileCount":6,"integrity":"sha512-JczNiZaG9cfIE4BLvlCYTEMGFn1spxW2jmJniHUW86NLZurqRSIR5e70/+OVlpaqXr1mwjh3U9XC/5ejydSwmA==","signatures":[{"sig":"MEQCIAppUNrhfxUb7xocL+9A05/Z6qjePFg18PSfr94xw8uoAiBNsVsGAbPdRszy3BCtMb41cqRB0Wwg8E3yn59oZQo6Lg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27121},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.18.0"},"exports":{".":"./dist/index.js","./package.json":"./package.json"},"gitHead":"4085662a566f508530fc2976a4fb054ab31b9d45","private":false,"scripts":{"dev":"tsup --watch","knip":"knip","test":"jest --coverage","build":"tsup","clean":"rm -rf dist coverage .swc","format":"run-s format:lint format:prettier format:cspell","prepare":"husky install || true","test:ci":"jest --coverage --ci --reporters=default --reporters=jest-junit","typecheck":"tsc --noEmit","test:watch":"jest --watch","format:lint":"eslint --fix .","format:cspell":"cspell **/*","prepublishOnly":"bun run clean && bun run build && bun run test","format:prettier":"prettier --write ."},"_npmUser":{"name":"official_apexmcp","email":"kieranpatton@proton.me"},"_npmVersion":"11.4.2","description":"Developer-first SDK for building MCP (Model Context Protocol) servers in the ApexMCP ecosystem.","directories":{},"lint-staged":{"*.ts":["prettier --write","eslint --fix"],"src/**.{ts,json}":["cspell"]},"_nodeVersion":"22.17.0","dependencies":{"@sinclair/typebox":"^0.34.41","@modelcontextprotocol/sdk":"^1.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.12.4","jest":"^30.2.0","knip":"^5.73.4","tsup":"^8.5.0","husky":"^9.1.7","cspell":"^9.4.0","dotenv":"^17.2.3","eslint":"^9.39.2","prettier":"^3.1.0","@swc/core":"^1.15.4","@swc/jest":"^0.2.39","@types/bun":"^1.3.4","jest-junit":"^16.0.0","typescript":"^5.9.3","@mswjs/data":"^0.16.2","@types/deno":"^2.5.0","@types/jest":"^30.0.0","@types/node":"^25.0.2","lint-staged":"^16.2.7","npm-run-all":"^4.1.5","@jest/globals":"^30.2.0","typescript-eslint":"^8.49.0","eslint-plugin-import":"^2.32.0","@semantic-release/git":"^10.0.1","eslint-plugin-sonarjs":"^3.0.5","eslint-config-prettier":"^10.1.8","@semantic-release/changelog":"^6.0.3","@commitlint/config-conventional":"^20.2.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.0_1766955355909_0.859532515693928","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@apexmcp/sdk","version":"1.0.1","keywords":["apexmcp","mcp","model-context-protocol","sdk","typescript","server","tools","resources"],"author":{"name":"@keyrxng"},"license":"MIT","_id":"@apexmcp/sdk@1.0.1","maintainers":[{"name":"official_apexmcp","email":"kieranpatton@proton.me"}],"dist":{"shasum":"2366665c9f3f1daa441896d1392fe921bea7fdaa","tarball":"https://registry.npmjs.org/@apexmcp/sdk/-/sdk-1.0.1.tgz","fileCount":6,"integrity":"sha512-jQOAzRcnJ1E1LDkVWEXE16LrFtDoovgYy5VlGI7JhYP/9WOJzSjiweMNxpLcvta27hSOFiTIW3ypqwmXO9mmug==","signatures":[{"sig":"MEYCIQDjT/ioId5W7LLP51MOyDHRoSOJQPfF49ipLW9ABZqhewIhAICGB9wuCErKSu8X4LaFHT8trk+T9PRevZSjigmOgiIs","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37074},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.18.0"},"exports":{".":"./dist/index.js","./package.json":"./package.json"},"gitHead":"4085662a566f508530fc2976a4fb054ab31b9d45","private":false,"scripts":{"dev":"tsup --watch","knip":"knip","test":"jest --coverage","build":"tsup","clean":"rm -rf dist coverage .swc","format":"run-s format:lint format:prettier format:cspell","prepare":"husky install || true","test:ci":"jest --coverage --ci --reporters=default --reporters=jest-junit","typecheck":"tsc --noEmit","test:watch":"jest --watch","format:lint":"eslint --fix .","format:cspell":"cspell **/*","prepublishOnly":"bun run clean && bun run build && bun run test","format:prettier":"prettier --write ."},"_npmUser":{"name":"official_apexmcp","email":"kieranpatton@proton.me"},"_npmVersion":"11.4.2","description":"Developer-first SDK for building MCP (Model Context Protocol) servers in the ApexMCP ecosystem.","directories":{},"lint-staged":{"*.ts":["prettier --write","eslint --fix"],"src/**.{ts,json}":["cspell"]},"_nodeVersion":"22.17.0","dependencies":{"@sinclair/typebox":"^0.34.41","@modelcontextprotocol/sdk":"^1.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.12.4","jest":"^30.2.0","knip":"^5.73.4","tsup":"^8.5.0","husky":"^9.1.7","cspell":"^9.4.0","dotenv":"^17.2.3","eslint":"^9.39.2","prettier":"^3.1.0","@swc/core":"^1.15.4","@swc/jest":"^0.2.39","@types/bun":"^1.3.4","jest-junit":"^16.0.0","typescript":"^5.9.3","@mswjs/data":"^0.16.2","@types/deno":"^2.5.0","@types/jest":"^30.0.0","@types/node":"^25.0.2","lint-staged":"^16.2.7","npm-run-all":"^4.1.5","@jest/globals":"^30.2.0","typescript-eslint":"^8.49.0","eslint-plugin-import":"^2.32.0","@semantic-release/git":"^10.0.1","eslint-plugin-sonarjs":"^3.0.5","eslint-config-prettier":"^10.1.8","@semantic-release/changelog":"^6.0.3","@commitlint/config-conventional":"^20.2.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.1_1766957113757_0.607413645289467","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@apexmcp/sdk","version":"1.0.2","keywords":["apexmcp","mcp","model-context-protocol","sdk","typescript","server","tools","resources"],"author":{"name":"@keyrxng"},"license":"MIT","_id":"@apexmcp/sdk@1.0.2","maintainers":[{"name":"official_apexmcp","email":"kieranpatton@proton.me"}],"dist":{"shasum":"772b2c8fe16984ce86610026d7b3d41d2a704234","tarball":"https://registry.npmjs.org/@apexmcp/sdk/-/sdk-1.0.2.tgz","fileCount":6,"integrity":"sha512-VSvSqUF5E49+hblNi45Q5pbb4+dnDKydz5occN3l/L6hzVBAgM+kuGzjPJ4nMo4ulfN1tXdhm3A02kCApYZveQ==","signatures":[{"sig":"MEUCIQDjQfNkbLywVX6ZemHA6SpiRnys+ZxQZtlowzc5tXHhtQIgPgbSKoBcp4lNxcv5laSUTjEfLKhXm2w2c2vl6SSaN14=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37074},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.18.0"},"exports":{".":"./dist/index.js","./package.json":"./package.json"},"gitHead":"4085662a566f508530fc2976a4fb054ab31b9d45","private":false,"scripts":{"dev":"tsup --watch","knip":"knip","test":"jest --coverage","build":"tsup","clean":"rm -rf dist coverage .swc","format":"run-s format:lint format:prettier format:cspell","prepare":"husky install || true","test:ci":"jest --coverage --ci --reporters=default --reporters=jest-junit","typecheck":"tsc --noEmit","test:watch":"jest --watch","format:lint":"eslint --fix .","format:cspell":"cspell **/*","prepublishOnly":"bun run clean && bun run build && bun run test","format:prettier":"prettier --write ."},"_npmUser":{"name":"official_apexmcp","email":"kieranpatton@proton.me"},"_npmVersion":"11.4.2","description":"Developer-first SDK for building MCP (Model Context Protocol) servers in the ApexMCP ecosystem.","directories":{},"lint-staged":{"*.ts":["prettier --write","eslint --fix"],"src/**.{ts,json}":["cspell"]},"_nodeVersion":"22.17.0","dependencies":{"@sinclair/typebox":"^0.34.41","@modelcontextprotocol/sdk":"^1.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.12.4","jest":"^30.2.0","knip":"^5.73.4","tsup":"^8.5.0","husky":"^9.1.7","cspell":"^9.4.0","dotenv":"^17.2.3","eslint":"^9.39.2","prettier":"^3.1.0","@swc/core":"^1.15.4","@swc/jest":"^0.2.39","@types/bun":"^1.3.4","jest-junit":"^16.0.0","typescript":"^5.9.3","@mswjs/data":"^0.16.2","@types/deno":"^2.5.0","@types/jest":"^30.0.0","@types/node":"^25.0.2","lint-staged":"^16.2.7","npm-run-all":"^4.1.5","@jest/globals":"^30.2.0","typescript-eslint":"^8.49.0","eslint-plugin-import":"^2.32.0","@semantic-release/git":"^10.0.1","eslint-plugin-sonarjs":"^3.0.5","eslint-config-prettier":"^10.1.8","@semantic-release/changelog":"^6.0.3","@commitlint/config-conventional":"^20.2.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.2_1766959354643_0.5342825976853907","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@apexmcp/sdk","version":"1.0.3","keywords":["apexmcp","mcp","model-context-protocol","sdk","typescript","server","tools","resources"],"author":{"name":"@keyrxng"},"license":"MIT","_id":"@apexmcp/sdk@1.0.3","maintainers":[{"name":"official_apexmcp","email":"kieranpatton@proton.me"}],"dist":{"shasum":"bb26cde59b4333878b68ea58a907abc17e9cdcb0","tarball":"https://registry.npmjs.org/@apexmcp/sdk/-/sdk-1.0.3.tgz","fileCount":6,"integrity":"sha512-IbQs5q9kyMQEPQ/KRLE7A7CM8/OKN9Wt5YVaQFdWXqkae0DC9EQH2E5/jubVhPO4qQHWEfHd/MmKNLvYlxaY6w==","signatures":[{"sig":"MEYCIQCUcmQqxaWGbC4EZqdH2sDf2gfSfwXXqBveiHp/7w74qQIhAN3cr1CmZq2/ABTwPVPP4D+8F8WHjmKk5RViwcOkIRyT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38112},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.18.0"},"exports":{".":"./dist/index.js","./package.json":"./package.json"},"gitHead":"4085662a566f508530fc2976a4fb054ab31b9d45","private":false,"scripts":{"dev":"tsup --watch","knip":"knip","test":"jest --coverage","build":"tsup","clean":"rm -rf dist coverage .swc","format":"run-s format:lint format:prettier format:cspell","prepare":"husky install || true","test:ci":"jest --coverage --ci --reporters=default --reporters=jest-junit","typecheck":"tsc --noEmit","test:watch":"jest --watch","format:lint":"eslint --fix .","format:cspell":"cspell **/*","prepublishOnly":"bun run clean && bun run build && bun run test","format:prettier":"prettier --write ."},"_npmUser":{"name":"official_apexmcp","email":"kieranpatton@proton.me"},"_npmVersion":"11.4.2","description":"Developer-first SDK for building MCP (Model Context Protocol) servers in the ApexMCP ecosystem.","directories":{},"lint-staged":{"*.ts":["prettier --write","eslint --fix"],"src/**.{ts,json}":["cspell"]},"_nodeVersion":"22.17.0","dependencies":{"@sinclair/typebox":"^0.34.41","@modelcontextprotocol/sdk":"^1.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.12.4","jest":"^30.2.0","knip":"^5.73.4","tsup":"^8.5.0","husky":"^9.1.7","cspell":"^9.4.0","dotenv":"^17.2.3","eslint":"^9.39.2","prettier":"^3.1.0","@swc/core":"^1.15.4","@swc/jest":"^0.2.39","@types/bun":"^1.3.4","jest-junit":"^16.0.0","typescript":"^5.9.3","@mswjs/data":"^0.16.2","@types/deno":"^2.5.0","@types/jest":"^30.0.0","@types/node":"^25.0.2","lint-staged":"^16.2.7","npm-run-all":"^4.1.5","@jest/globals":"^30.2.0","typescript-eslint":"^8.49.0","eslint-plugin-import":"^2.32.0","@semantic-release/git":"^10.0.1","eslint-plugin-sonarjs":"^3.0.5","eslint-config-prettier":"^10.1.8","@semantic-release/changelog":"^6.0.3","@commitlint/config-conventional":"^20.2.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.3_1766963124188_0.6546865669957311","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@apexmcp/sdk","version":"1.0.4","description":"Developer-first SDK for building MCP (Model Context Protocol) servers in the ApexMCP ecosystem.","author":{"name":"@keyrxng"},"license":"MIT","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":"./dist/index.js","./package.json":"./package.json"},"publishConfig":{"access":"public"},"engines":{"node":">=18.18.0"},"scripts":{"build":"tsup","dev":"tsup --watch","test":"jest --coverage","test:watch":"jest --watch","test:ci":"jest --coverage --ci --reporters=default --reporters=jest-junit","format":"run-s format:lint format:prettier format:cspell","format:lint":"eslint --fix .","format:prettier":"prettier --write .","format:cspell":"cspell **/*","typecheck":"tsc --noEmit","knip":"knip","clean":"rm -rf dist coverage .swc","prepublishOnly":"bun run clean && bun run build && bun run test","prepare":"husky install || true"},"keywords":["apexmcp","mcp","model-context-protocol","sdk","typescript","server","tools","resources"],"dependencies":{"@modelcontextprotocol/sdk":"^1.25.1","zod":"4.1.13"},"devDependencies":{"@commitlint/config-conventional":"^20.2.0","@jest/globals":"^30.2.0","@mswjs/data":"^0.16.2","@semantic-release/changelog":"^6.0.3","@semantic-release/git":"^10.0.1","@swc/core":"^1.15.4","@swc/jest":"^0.2.39","@types/bun":"^1.3.4","@types/deno":"^2.5.0","@types/jest":"^30.0.0","@types/node":"^25.0.2","cspell":"^9.4.0","dotenv":"^17.2.3","eslint":"^9.39.2","eslint-config-prettier":"^10.1.8","eslint-plugin-import":"^2.32.0","eslint-plugin-sonarjs":"^3.0.5","husky":"^9.1.7","jest":"^30.2.0","jest-junit":"^16.0.0","knip":"^5.73.4","lint-staged":"^16.2.7","msw":"^2.12.4","npm-run-all":"^4.1.5","prettier":"^3.1.0","tsup":"^8.5.0","typescript":"^5.9.3","typescript-eslint":"^8.49.0"},"lint-staged":{"*.ts":["prettier --write","eslint --fix"],"src/**.{ts,json}":["cspell"]},"private":false,"_id":"@apexmcp/sdk@1.0.4","gitHead":"4085662a566f508530fc2976a4fb054ab31b9d45","_nodeVersion":"22.17.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-IjmnuBt2WZvgSOJyacV9GBE2nT1J0zUd8ThrYgZ6lzI10eWiZRNAKJUoJx4SyqfmNRuVW7xqjdt1Uo1hO5qV0w==","shasum":"9d090264aa5b19d6024e0b9d1ed9b3a12ad1f518","tarball":"https://registry.npmjs.org/@apexmcp/sdk/-/sdk-1.0.4.tgz","fileCount":6,"unpackedSize":37798,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAJx+/rttu1qbe+Y87SywMO3kUDFd5y+2LV6COFsBeTfAiATu/FzGAMyr2Fi1AC5zBfydztE1ngAjk+bhBDvI8L47g=="}]},"_npmUser":{"name":"official_apexmcp","email":"kieranpatton@proton.me"},"directories":{},"maintainers":[{"name":"official_apexmcp","email":"kieranpatton@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_1.0.4_1766967497494_0.17575962093766417"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-28T20:55:55.664Z","modified":"2025-12-29T00:18:17.870Z","1.0.0":"2025-12-28T20:55:56.056Z","1.0.1":"2025-12-28T21:25:13.912Z","1.0.2":"2025-12-28T22:02:34.800Z","1.0.3":"2025-12-28T23:05:24.340Z","1.0.4":"2025-12-29T00:18:17.668Z"},"author":{"name":"@keyrxng"},"license":"MIT","keywords":["apexmcp","mcp","model-context-protocol","sdk","typescript","server","tools","resources"],"description":"Developer-first SDK for building MCP (Model Context Protocol) servers in the ApexMCP ecosystem.","maintainers":[{"name":"official_apexmcp","email":"kieranpatton@proton.me"}],"readme":"# @apexmcp/sdk\r\n\r\nDeveloper-first SDK for building **MCP (Model Context Protocol)** servers in the ApexMCP ecosystem.\r\n\r\n## Goals\r\n\r\n- **Tiny**: a working MCP server in <10 LOC\r\n- **Elegant**: fluent builder API with good defaults\r\n- **Extensible**: plugins/hooks, plus escape hatches to the underlying `McpServer`\r\n- **Compatible**: built on the official `@modelcontextprotocol/sdk`\r\n\r\n## Quick start (STDIO)\r\n\r\n```ts\r\nimport { apex, t } from '@apexmcp/sdk';\r\n\r\nconst server = apex\r\n  .createServer('my-server', '0.1.0')\r\n  .tool({\r\n    name: 'hello',\r\n    description: 'Say hello',\r\n    input: t.Object({ name: t.String() }),\r\n    handler: ({ name }) => apex.text(`Hello ${name}`, { name }),\r\n  });\r\n\r\nawait server.listenStdio();\r\n```\r\n\r\n## Quick start (HTTP-only, Deno Deploy)\r\n\r\n```ts\r\nimport { apex, t } from '@apexmcp/sdk';\r\n\r\nconst server = apex\r\n  .createServer('my-server', '0.1.0')\r\n  .tool({\r\n    name: 'hello',\r\n    description: 'Say hello',\r\n    input: t.Object({ name: t.String() }),\r\n    handler: ({ name }) => apex.text(`Hello ${name}`, { name }),\r\n  });\r\n\r\nexport const fetch = server.fetch; // serves MCP on /mcp (and /health)\r\n```\r\n\r\n## Mount into an existing router (example: Hono)\r\n\r\n```ts\r\nimport { Hono } from 'hono';\r\nimport { apex, t } from '@apexmcp/sdk';\r\n\r\nconst server = apex\r\n  .createServer('my-server', '0.1.0')\r\n  .tool({\r\n    name: 'hello',\r\n    description: 'Say hello',\r\n    input: t.Object({ name: t.String() }),\r\n    handler: ({ name }) => apex.text(`Hello ${name}`, { name }),\r\n  });\r\n\r\nconst app = new Hono();\r\nconst { mcp, health } = server.routes();\r\n\r\napp.all('/mcp', c => mcp(c.req.raw));\r\napp.get('/health', c => health(c.req.raw));\r\n\r\nexport const fetch = app.fetch;\r\n```\r\n\r\n## API highlights\r\n\r\n- `apex.createServer(name, version, options?)`\r\n- `server.tool({ name, description, input, handler, ... })`\r\n- `server.resource({ name, uri, mimeType?, handler, ... })`\r\n- `server.use(plugin)`\r\n- `server.onShutdown(fn)`\r\n- `server.fetch` / `server.asFetch({ mcpPath, healthPath })`\r\n- `server.routes()` (router-friendly `{ mcp, health }`)\r\n- `server.mcp` (escape hatch to the official MCP server)\r\n\r\n","readmeFilename":"README.md"}