{"_id":"@arial-ai/mcp","_rev":"2-6d10cd55ebaeebaba76828a6ac075788","name":"@arial-ai/mcp","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@arial-ai/mcp","version":"0.0.1","keywords":["mcp","model-context-protocol","server","api","framework"],"author":{"name":"Arial"},"license":"MIT","_id":"@arial-ai/mcp@0.0.1","maintainers":[{"name":"sneub","email":"shanen@gmail.com"}],"homepage":"https://github.com/arial-ai/mcp#readme","bugs":{"url":"https://github.com/arial-ai/mcp/issues"},"dist":{"shasum":"202c8697085ff0077d1eda50d60a231bdeacd2d1","tarball":"https://registry.npmjs.org/@arial-ai/mcp/-/mcp-0.0.1.tgz","fileCount":13,"integrity":"sha512-OOs2fw4j6kqJF7xg82VdwbHf1dY3WRbEZ4i3Z/fX2FXwbpdsJPr6Fk8CeaEiUkeGKiVDBkIdJe8jT+Ii7yfVAA==","signatures":[{"sig":"MEUCIAwKUphTEBhPUgZ4e5cIdnd8vuwm8REOqGhwuLNVi/NiAiEA5PJaChgtEnHGqFa+FoWqGG9ZHmz/OLxFXlKO8r+iLYo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16419},"main":"dist/index.js","_from":"file:arial-ai-mcp-0.0.1.tgz","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"scripts":{"dev":"tsx watch src/index.ts","build":"tsc","start":"node dist/index.js","type-check":"tsc --noEmit"},"_npmUser":{"name":"sneub","email":"shanen@gmail.com"},"prettier":{"semi":true,"tabWidth":2,"printWidth":80,"arrowParens":"always","singleQuote":true,"trailingComma":"all","bracketSpacing":true,"jsxSingleQuote":false,"jsxBracketSameLine":false},"_resolved":"/private/var/folders/mv/gr80dqc936z73s7bwybf_ljw0000gn/T/ac27f18eddf8e27a0c9eb7f90aa12ed4/arial-ai-mcp-0.0.1.tgz","_integrity":"sha512-OOs2fw4j6kqJF7xg82VdwbHf1dY3WRbEZ4i3Z/fX2FXwbpdsJPr6Fk8CeaEiUkeGKiVDBkIdJe8jT+Ii7yfVAA==","repository":{"url":"git+https://github.com/arial-ai/mcp.git","type":"git"},"_npmVersion":"10.7.0","description":"A framework for building MCP (Model Context Protocol) servers","directories":{},"_nodeVersion":"18.20.4","dependencies":{"ajv":"^8.17.1","hono":"^4.7.11","@hono/node-server":"^1.14.3","@modelcontextprotocol/sdk":"^1.12.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.4","nodemon":"^3.1.10","typescript":"^5.8.3","@types/node":"^22.15.30"},"_npmOperationalInternal":{"tmp":"tmp/mcp_0.0.1_1749528815862_0.7623128137987689","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@arial-ai/mcp","version":"0.0.2","description":"A framework for building MCP (Model Context Protocol) servers","main":"dist/index.js","types":"dist/index.d.ts","type":"module","publishConfig":{"access":"public"},"keywords":["mcp","model-context-protocol","server","api","framework"],"author":{"name":"Arial"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/arial-ai/mcp.git"},"bugs":{"url":"https://github.com/arial-ai/mcp/issues"},"homepage":"https://github.com/arial-ai/mcp#readme","devDependencies":{"@types/node":"^22.15.30","nodemon":"^3.1.10","tsx":"^4.19.4","typescript":"^5.8.3"},"dependencies":{"@hono/node-server":"^1.14.3","@modelcontextprotocol/sdk":"^1.12.1","@types/express":"^5.0.3","ajv":"^8.17.1","express":"^5.1.0","hono":"^4.7.11"},"engines":{"node":">=16.0.0"},"prettier":{"trailingComma":"all","tabWidth":2,"printWidth":80,"semi":true,"singleQuote":true,"jsxSingleQuote":false,"jsxBracketSameLine":false,"bracketSpacing":true,"arrowParens":"always"},"scripts":{"dev":"tsx watch src/index.ts","build":"tsc","start":"node dist/index.js","type-check":"tsc --noEmit"},"_id":"@arial-ai/mcp@0.0.2","_integrity":"sha512-liKgpi/LTuIFSSe3lj4v14eO61qxJJedTNK4/I0Dba8iuGnjUC/juQzoIR3Eq8E6y1h+ZTaPag6K8PjsYABi+Q==","_resolved":"/private/var/folders/mv/gr80dqc936z73s7bwybf_ljw0000gn/T/216137096e0c457f67dbfd3d07bb7100/arial-ai-mcp-0.0.2.tgz","_from":"file:arial-ai-mcp-0.0.2.tgz","_nodeVersion":"18.20.4","_npmVersion":"10.7.0","dist":{"integrity":"sha512-liKgpi/LTuIFSSe3lj4v14eO61qxJJedTNK4/I0Dba8iuGnjUC/juQzoIR3Eq8E6y1h+ZTaPag6K8PjsYABi+Q==","shasum":"e7d8f8fab2efa738aa1fd3294d231ad4fa5b9d05","tarball":"https://registry.npmjs.org/@arial-ai/mcp/-/mcp-0.0.2.tgz","fileCount":5,"unpackedSize":11547,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDW7FyCeDvVKC2Olr8YlGaSE2d18o+R9W7SQsVwIrANaQIhAJ0HmDaco0mESYxm+49SNuc82XBfEgsRxiFdb8Gu3yqp"}]},"_npmUser":{"name":"sneub","email":"shanen@gmail.com"},"directories":{},"maintainers":[{"name":"sneub","email":"shanen@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp_0.0.2_1749556837175_0.7429805694383413"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-10T04:13:35.780Z","modified":"2025-06-10T12:00:37.510Z","0.0.1":"2025-06-10T04:13:36.092Z","0.0.2":"2025-06-10T12:00:37.348Z"},"bugs":{"url":"https://github.com/arial-ai/mcp/issues"},"author":{"name":"Arial"},"license":"MIT","homepage":"https://github.com/arial-ai/mcp#readme","keywords":["mcp","model-context-protocol","server","api","framework"],"repository":{"type":"git","url":"git+https://github.com/arial-ai/mcp.git"},"description":"A framework for building MCP (Model Context Protocol) servers","maintainers":[{"name":"sneub","email":"shanen@gmail.com"}],"readme":"# @arial-ai/mcp\n\nA framework for easily building MCP (Model Context Protocol) servers with TypeScript and Node.js.\n\n## Features\n\n- Easy server setup with TypeScript support\n- Built on top of Express\n- Type-safe tool, resource, and prompt definitions\n- Automatic session management\n- Uses Streamable HTTP (only)\n\n## Installation\n\n```bash\nnpm install @arial-ai/mcp\n# or\nyarn add @arial-ai/mcp\n# or\npnpm add @arial-ai/mcp\n```\n\n## Quick Start\n\n```typescript\nimport { create } from '@arial-ai/mcp';\nimport { z } from 'zod';\n\nconst server = create({\n  name: 'my-mcp-server',\n  version: '1.0.0',\n  port: 3000,\n});\n\n// Add a simple echo tool\nserver.tool(\n  'echo-tool',\n  'Tool that echoes a message',\n  { message: z.string().describe('The message to echo') },\n  async ({ message }: { message: string }) => ({\n    content: [{ type: 'text', text: `Tool echo: ${message}` }],\n  }),\n);\n\n// Start the server\nserver.listen(() => {\n  console.log('MCP server is ready!');\n});\n```\n\n## API Reference\n\n### Configuration Options\n\n| Option      | Type     | Required | Description                                          |\n| ----------- | -------- | -------- | ---------------------------------------------------- |\n| name        | string   | Yes      | Name of your MCP server                              |\n| version     | string   | Yes      | Version of your server                               |\n| port        | number   | No       | Port to run the HTTP server on (default: 3000)       |\n| setupServer | function | No       | Optional setup function called during initialization |\n\n### Adding Tools\n\nUse the `server.tool()` method to add new tools to your MCP server:\n\n```typescript\nserver.tool(\n  'tool-name',\n  'Tool description',\n  { param: z.string().describe('Parameter description') },\n  async ({ param }) => ({\n    content: [{ type: 'text', text: `Result: ${param}` }],\n  }),\n);\n```\n\n### Adding Resources\n\nUse the `server.resource()` method to add resources:\n\n```typescript\nimport { ResourceTemplate } from '@arial-ai/mcp';\n\nserver.resource(\n  'resource-name',\n  'Resource description',\n  new ResourceTemplate('echo://{message}', { list: undefined }),\n  async (uri: any, { message }: { message: string }) => ({\n    contents: [\n      {\n        uri: uri.href,\n        text: `Resource content: ${message}`,\n      },\n    ],\n  }),\n);\n```\n\n### Adding Prompts\n\nUse the `server.prompt()` method to add prompts:\n\n```typescript\nserver.prompt(\n  'prompt-name',\n  'Prompt description',\n  { message: z.string() },\n  ({ message }: { message: string }) => ({\n    messages: [\n      {\n        role: 'user',\n        content: {\n          type: 'text',\n          text: `Please process: ${message}`,\n        },\n      },\n    ],\n  }),\n);\n```\n\n## Complete Example\n\n```typescript\nimport { create, ResourceTemplate } from '@arial-ai/mcp';\nimport { z } from 'zod';\n\nconst server = create({\n  name: 'example-mcp-server',\n  version: '1.0.0',\n  port: 3000,\n});\n\n// Add a tool\nserver.tool(\n  'calculate',\n  'Performs basic arithmetic',\n  {\n    operation: z.enum(['add', 'subtract', 'multiply', 'divide']),\n    a: z.number(),\n    b: z.number(),\n  },\n  async ({ operation, a, b }) => {\n    let result;\n    switch (operation) {\n      case 'add':\n        result = a + b;\n        break;\n      case 'subtract':\n        result = a - b;\n        break;\n      case 'multiply':\n        result = a * b;\n        break;\n      case 'divide':\n        result = a / b;\n        break;\n    }\n    return {\n      content: [{ type: 'text', text: `${a} ${operation} ${b} = ${result}` }],\n    };\n  },\n);\n\n// Add a resource\nserver.resource(\n  'status',\n  'Server status information',\n  new ResourceTemplate('status://{type}', { list: undefined }),\n  async (uri, { type }) => ({\n    contents: [\n      {\n        uri: uri.href,\n        text: `Server status (${type}): Running`,\n      },\n    ],\n  }),\n);\n\n// Add a prompt\nserver.prompt(\n  'greeting',\n  'Generate a greeting message',\n  { name: z.string() },\n  ({ name }) => ({\n    messages: [\n      {\n        role: 'user',\n        content: {\n          type: 'text',\n          text: `Generate a friendly greeting for ${name}`,\n        },\n      },\n    ],\n  }),\n);\n\nserver.listen(() => {\n  console.log('Server ready on port 3000');\n});\n```\n\n## Development\n\n1. Clone the repository\n2. Install dependencies:\n   ```bash\n   npm install\n   ```\n3. Start development server:\n   ```bash\n   npm run dev\n   ```\n\n## Building\n\n```bash\nnpm run build\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}