{"_id":"@agentico/mcp-server","_rev":"4-c7dfad57827a01a5fc112fbfc90b3216","name":"@agentico/mcp-server","dist-tags":{"latest":"0.4.0"},"versions":{"0.2.0":{"name":"@agentico/mcp-server","version":"0.2.0","keywords":["mcp","modelcontextprotocol","server","agentic","facade","ai"],"author":{"url":"https://rebelion.la","name":"La Rebelion Labs"},"license":"MIT","_id":"@agentico/mcp-server@0.2.0","maintainers":[{"name":"adrianescutia","email":"adrian@rebelion.la"}],"contributors":[{"url":"https://escutia.me/adrian","name":"Adrian Escutia"}],"homepage":"https://agentico.dev","bugs":{"url":"https://github.com/agentico-dev/mcp-server/issues"},"bin":{"server":"build/index.js"},"dist":{"shasum":"0e5ce5534adc901050229ac3de6be1c68b73a739","tarball":"https://registry.npmjs.org/@agentico/mcp-server/-/mcp-server-0.2.0.tgz","fileCount":10,"integrity":"sha512-DU8iUxUfWI3lzLD2UPjf8YQqlYeKJnXJrGhqBvvf7IaNR39OI5fe494sH4kn6Q6wHAdC7q9Wy8pAf3mMOXPAuQ==","signatures":[{"sig":"MEQCIF/3d/HhJV77S2ZlFoKDWMCY/5oG00Luy8j95ct4/tEmAiAxpJkrxmYwiqkEeCyEERi7Cvv+K4JaIeuyj4/VBUUzSQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61154},"main":"./build/index.js","type":"module","types":"./build/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js"}},"gitHead":"453a26acfb86d0af9ecc2c4cf887aaae00dd1c9a","scripts":{"build":"tsc","start":"node --disable-warning=ExperimentalWarning build/index.js","watch":"tsc --watch","inspector":"npx @modelcontextprotocol/inspector build/index.js","postbuild":"node -e \"require('fs').chmodSync('build/index.js', '755')\"","publish:npm":"npm run build && npm publish --access public","version:major":"npm version major","version:minor":"npm version minor","version:patch":"npm version patch"},"_npmUser":{"name":"adrianescutia","email":"adrian@rebelion.la"},"repository":{"url":"git+https://github.com/agentico-dev/mcp-server.git","type":"git"},"_npmVersion":"10.8.2","description":"A Model Context Protocol Server facade to simplify the implementation of agents","directories":{},"resolutions":{"strip-ansi":"6.0.1"},"_nodeVersion":"18.20.5","dependencies":{"zod":"^3.24.1","zod-to-json-schema":"^3.24.1","@modelcontextprotocol/sdk":"^1.1.0"},"typesVersions":{"*":{"*":["./build/*"]}},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.5"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_0.2.0_1736771274103_0.5134499258642093","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@agentico/mcp-server","version":"0.2.1","keywords":["mcp","modelcontextprotocol","server","agentic","facade","ai"],"author":{"url":"https://rebelion.la","name":"La Rebelion Labs"},"license":"MIT","_id":"@agentico/mcp-server@0.2.1","maintainers":[{"name":"adrianescutia","email":"adrian@rebelion.la"}],"contributors":[{"url":"https://escutia.me/adrian","name":"Adrian Escutia"}],"homepage":"https://agentico.dev","bugs":{"url":"https://github.com/agentico-dev/mcp-server/issues"},"bin":{"server":"build/index.js"},"dist":{"shasum":"856b51ddb9d14ac1d46bd6316aaa9f9241740b51","tarball":"https://registry.npmjs.org/@agentico/mcp-server/-/mcp-server-0.2.1.tgz","fileCount":10,"integrity":"sha512-6tv0X3pn8dFLPoxQEuX3QydJ6J4BmQifpzeU0l+pMDQeqry9lqGXMi92A0WSR49SNsGDN1bRjofezCxCNQFiKA==","signatures":[{"sig":"MEUCIQDK6V4mgffc0h3XBA16jVgvVaZLY62TToVtj3OPbokJFwIgGtXev+7iYI1km8cru5EP2Boo/1i1Zl2GuVn/msfjif4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":61476},"main":"./build/index.js","type":"module","types":"./build/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js"}},"gitHead":"5f9c5109eafa913c7887384e7081bb014ae681a8","scripts":{"build":"tsc","start":"node --disable-warning=ExperimentalWarning build/index.js","watch":"tsc --watch","inspector":"npx @modelcontextprotocol/inspector build/index.js","postbuild":"node -e \"require('fs').chmodSync('build/index.js', '755')\"","publish:npm":"npm run build && npm publish --access public","version:major":"npm version major","version:minor":"npm version minor","version:patch":"npm version patch"},"_npmUser":{"name":"adrianescutia","email":"adrian@rebelion.la"},"repository":{"url":"git+https://github.com/agentico-dev/mcp-server.git","type":"git"},"_npmVersion":"10.8.2","description":"A Model Context Protocol Server facade to simplify the implementation of agents","directories":{},"resolutions":{"strip-ansi":"6.0.1"},"_nodeVersion":"18.20.5","dependencies":{"zod":"^3.24.1","zod-to-json-schema":"^3.24.1","@modelcontextprotocol/sdk":"~1.4.0"},"typesVersions":{"*":{"*":["./build/*"]}},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^20.11.24"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_0.2.1_1737738199267_0.6497298610740261","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@agentico/mcp-server","version":"0.3.0","keywords":["mcp","modelcontextprotocol","server","agentic","facade","ai"],"author":{"url":"https://rebelion.la","name":"La Rebelion Labs"},"license":"MIT","_id":"@agentico/mcp-server@0.3.0","maintainers":[{"name":"adrianescutia","email":"adrian@rebelion.la"}],"contributors":[{"url":"https://escutia.me/adrian","name":"Adrian Escutia"}],"homepage":"https://agentico.dev","bugs":{"url":"https://github.com/agentico-dev/mcp-server/issues"},"bin":{"server":"build/index.js"},"dist":{"shasum":"72f032b6a4f134e18a87918bf08d0cf62bfa3613","tarball":"https://registry.npmjs.org/@agentico/mcp-server/-/mcp-server-0.3.0.tgz","fileCount":12,"integrity":"sha512-Tct4G1E55PUSRSDebeQIUcIo6JAqE7Le4odAUSVsaKtcHLUDQd2use7ZANevOiMBRfrFZZkMGgRS9Wcg5hk4EA==","signatures":[{"sig":"MEYCIQC8Per3t03mZv8hUXamQ1kbecJ8EFR6KFeCI10NLWeNHQIhAJ4d6WXCEu8aYVg9W1sKUlsSwZm3dvnnR3tMernK1nZq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66714},"main":"./build/index.js","type":"module","types":"./build/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js"}},"gitHead":"8f2a0c16cd869046faf0c8e1fbc1cb2f0db5da08","scripts":{"build":"tsc","start":"node --disable-warning=ExperimentalWarning build/index.js","watch":"tsc --watch","inspector":"npx @modelcontextprotocol/inspector build/index.js","postbuild":"node -e \"require('fs').chmodSync('build/index.js', '755')\"","publish:npm":"npm run build && npm publish --access public","version:major":"npm version major","version:minor":"npm version minor","version:patch":"npm version patch"},"_npmUser":{"name":"adrianescutia","email":"adrian@rebelion.la"},"repository":{"url":"git+https://github.com/agentico-dev/mcp-server.git","type":"git"},"_npmVersion":"10.8.2","description":"A Model Context Protocol Server facade to simplify the implementation of agents","directories":{},"resolutions":{"strip-ansi":"6.0.1"},"_nodeVersion":"18.20.6","dependencies":{"zod":"^3.24.1","@opentelemetry/api":"^1.9.0","zod-to-json-schema":"^3.24.1","@opentelemetry/sdk-node":"^0.57.1","@modelcontextprotocol/sdk":"~1.4.1","@opentelemetry/sdk-trace-node":"^1.30.1","@opentelemetry/instrumentation-fs":"^0.19.0","@opentelemetry/instrumentation-http":"^0.57.1","@opentelemetry/instrumentation-express":"^0.47.0","@opentelemetry/exporter-trace-otlp-http":"^0.57.1","@opentelemetry/auto-instrumentations-node":"^0.56.0"},"typesVersions":{"*":{"*":["./build/*"]}},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^20.11.24"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_0.3.0_1738947700171_0.6570456414602341","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"_id":"@agentico/mcp-server@0.4.0","bin":{"server":"build/index.js"},"dist":{"shasum":"faba8e3ec8b1174586b6d257d9dad5fac397a9a1","tarball":"https://registry.npmjs.org/@agentico/mcp-server/-/mcp-server-0.4.0.tgz","fileCount":32,"integrity":"sha512-8hx3/tIHPCheUjUTDYddWZebJsrdtj6tfyMIfLfGCUL39BB3vqLKVROj8XbSwm5L6FoUDlkA3WgSj/NrZNKLsQ==","signatures":[{"sig":"MEUCIBw9bgq4sXuuIWHN8/kMDSvtjzefE6RUpP5U11Bt9LHoAiEA+qGy5kJtwHuaXvUusrZSTGt1EGnOaAdwjIDuPFgvHS4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIE1s1A5zoCKssN8m8jhN578eLlu8uwmUY8NgyUoqFLpeAiBNQzqVfq+xG0sPeQYikCgwuqISnencn18CK68IRt/eRg=="}],"unpackedSize":90185},"main":"./build/index.js","name":"@agentico/mcp-server","type":"module","author":{"url":"https://rebelion.la","name":"La Rebelion Labs"},"shasum":"faba8e3ec8b1174586b6d257d9dad5fac397a9a1","engines":{"node":">=18"},"exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js"}},"license":"MIT","scripts":{"build":"tsc","start":"node --disable-warning=ExperimentalWarning build/index.js","watch":"tsc --watch","inspector":"npx @modelcontextprotocol/inspector build/index.js","postbuild":"node -e \"require('fs').chmodSync('build/index.js', '755')\"","publish:npm":"npm run build && npm publish --access public","version:major":"npm version major","version:minor":"npm version minor","version:patch":"npm version patch"},"version":"0.4.0","_npmUser":{"name":"adrianescutia","email":"adrian@rebelion.la"},"homepage":"https://agentico.dev","keywords":["mcp","modelcontextprotocol","server","agentic","facade","ai"],"_integrity":"sha512-8hx3/tIHPCheUjUTDYddWZebJsrdtj6tfyMIfLfGCUL39BB3vqLKVROj8XbSwm5L6FoUDlkA3WgSj/NrZNKLsQ==","repository":{"url":"https://github.com/agentico-dev/mcp-server","type":"git"},"_npmVersion":"10.8.3","description":"A Model Context Protocol Server facade to simplify the implementation of agents","directories":{},"maintainers":[{"name":"adrianescutia","email":"adrian@rebelion.la"}],"resolutions":{"strip-ansi":"6.0.1"},"_nodeVersion":"26.3.0","contributors":[{"url":"https://escutia.me/adrian","name":"Adrian Escutia"}],"dependencies":{"zod":"^3.24.1","js-yaml":"^4.1.0","@opentelemetry/api":"^1.9.0","zod-to-json-schema":"^3.24.1","@opentelemetry/sdk-node":"^0.57.2","@modelcontextprotocol/sdk":"~1.9.0","@opentelemetry/sdk-trace-node":"^1.30.1","@opentelemetry/instrumentation-fs":"^0.19.0","@opentelemetry/instrumentation-http":"^0.57.1","@opentelemetry/instrumentation-express":"^0.47.0","@opentelemetry/exporter-trace-otlp-http":"^0.57.1","@opentelemetry/auto-instrumentations-node":"^0.56.0"},"typesVersions":{"*":{"*":["./build/*"]}},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^20.11.24","@types/js-yaml":"^4.0.9"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-server_0.4.0_1789218497195_0.6602832825676432"}}},"time":{"created":"2025-01-13T12:27:53.989Z","modified":"2026-09-12T13:08:17.468Z","0.2.0":"2025-01-13T12:27:54.301Z","0.2.1":"2025-01-24T17:03:19.528Z","0.3.0":"2025-02-07T17:01:40.337Z","0.4.0":"2026-09-12T13:08:17.304Z"},"author":{"url":"https://rebelion.la","name":"La Rebelion Labs"},"license":"MIT","homepage":"https://agentico.dev","keywords":["mcp","modelcontextprotocol","server","agentic","facade","ai"],"repository":{"url":"https://github.com/agentico-dev/mcp-server","type":"git"},"description":"A Model Context Protocol Server facade to simplify the implementation of agents","contributors":[{"url":"https://escutia.me/adrian","name":"Adrian Escutia"}],"maintainers":[{"name":"adrianescutia","email":"adrian@rebelion.la"}],"readme":"# mcp-server ![NPM Version](https://img.shields.io/npm/v/%40agentico%2Fmcp-server)\n\n> [!IMPORTANT]\n> This project has evolved into [HAPI MCP](https://www.npmjs.com/settings/mcp-com-ai/packages). We started exploring MCP in November 2024 and quickly realized that MCP is most valuable as a contract between AI clients and existing services, not as a custom server layer that duplicates backend logic.\n>\n> That insight led us to create the HAPI MCP approach: expose your existing APIs through OAS/Swagger or Arazzo specs, and let HAPI MCP handle the rest.\n>\n> We recommend using the new package and following updates in the [MCP.com.ai GitHub repository](https://github.com/mcp-com-ai/hapimcp).\n\nThis project is the early version of that journey: a simple MCP server that helped us learn, prototype, and validate the approach.\n\nEvolution of the project:\n\n[MCP Server](https://github.com/la-rebelion/mcp-server) -> [HAPI MCP Server](https://github.com/la-rebelion/hapimcp) (by La Rebelion Labs) -> [HAPI MCP](https://github.com/mcp-com-ai/hapimcp) (by MCP.com.ai)\n\nToday, the recommended workflow is to run an MCP server with the `hapi` CLI and your OAS/Swagger or Arazzo specification.\n\n```sh\nhapi serve my-server --headless --specs https://your.specs.url --url https://your.backend.url\n```\n\n![MCP Server](https://mcp.com.ai/img/logo.svg)\n\n---\n\nMCP Server is a simple server that implements the Model Context Protocol (MCP) to provide a **simpler API** to interact with the Model Context Protocol. \n\n## Why Use This Server?\n\nIn \"[La Rebelion](https://rebelion.la)\" we are working on a set of tools and services to simplify processes and workflows for a better and more efficient developer experience. This server is part of a set of tools.\n\nMCP is amazing, but it can be a bit confusing to get started. We have create a **[facade](https://refactoring.guru/design-patterns/facade)** to simplify the process of creating a server that implements the Model Context Protocol. The pattern is simple, you just need to create the `tools` with your own logic, register the tools and start the server.\n\n## Steps to Create a New Server\n\nIn the future we will provide a CLI to create a new server similar to [MCP create server](https://www.npmjs.com/package/@modelcontextprotocol/create-server), but for now you can follow the steps below based on the [official documentation to create a server](https://modelcontextprotocol.io/quickstart/server).\n\n```bash\nmkdir -p my-server/src\ncd my-server/\nyarn init -y\nyarn add @modelcontextprotocol/sdk zod zod-to-json-schema\nyarn add -D @types/node typescript\n# Here lies the magic\nyarn add @agentico/mcp-server\n```\n\nYou need to update the `package.json` file and create a `tsconfig.json` file.\n\n## Getting Started\n\nImplement your tools with your custom logic, and register them in the MCPServer. Here is an example of a simple `echo` tool:\n\n```typescript\nimport { Tool, ToolSchema } from \"@agentico/mcp-server\";\n\nexport class EchoTool extends Tool {\n  toolSchema: ToolSchema = { \n    name: \"echo\",\n    description: \"Echoes the input message\",\n    schema: { // the schema for the parameters needed by the tool\n      type: \"object\",\n      properties: {\n        message: { type: \"string\" },\n      },\n      required: [\"message\"],\n    },\n  };\n\n  /**\n   * Your logic here, implement the execute method to define the tool behavior\n   * @param input The input message - use the schema to define the input type\n   * @returns In the example, we are echoing the message\n   */\n  async execute(input: any): Promise<any> {\n    // This is a simple echo tool demo, nothing fancy, just echoing the message\n    return Promise.resolve({\n      content: [\n        {\n          type: \"text\",\n          text: `${input.message}` \n        }\n      ]\n      });\n  }\n}\n```\n\nCreate an `index.ts` file with the following content:\n\n```typescript\n#!/usr/bin/env node\nimport { MCPServer } from '@agentico/mcp-server'\nimport { EchoTool } from \"./tools/EchoTool.js\";\n\nconst myServer = new MCPServer('My MCP Server', '1.0.0');\n\nasync function main() {\n  // Register tools\n  myServer.registerTool(\"echo\", EchoTool);\n  await myServer.run();\n}\n\nmain().catch((error) => {\n  console.error(\"Server error:\", error);\n  process.exit(1);\n});\n```\n\nThat's it! You have created a simple server that implements the Model Context Protocol. Test it with [Claude Desktop](https://claude.ai/download) or any other client that supports MCP.\n\nBuild the project with the following command:\n\n```bash\nyarn build\n```\n\nYou can start the server, but has no logic yet, you can test it with the following command:\n\n```bash\nyarn start\n# or\nnode build/index.js\n```\n\nThat's it, start creating your own tools and services to simplify your workflows and processes.\n\nGo Rebels! ✊🏻\n\n## UML Diagram\n\n![UML Diagram](./mcp-server.png)\n\n* **MCPServer**: Registers the tools that will be used by the server.\n* **Tool**: Base class for all tools, containing common properties and methods. `execute` is the method that will be called when the tool is invoked, implement your logic here.\n* **EchoTool**: Specific implementation of a tool, extending the Tool class and defining its own schema and initialization logic.\n* **EchoSchema**: Defines the structure of the input for the EchoTool.\n* **EchoInput**: Type definition for the input based on the schema.\n\nThis pattern allows for a flexible and extensible way to manage and implement tools using the MCPServer and Tool classes.\n\n## Support Us\n\nIf you find this helpful, please consider supporting us by giving a star to this repository, by contributing to the project or by becoming a sponsor.\n\nYou can find more information on how to support us at [La Rebelion GitHub Sponsors](https://github.com/sponsors/la-rebelion). Also, [buying us a coffee](https://buymeacoffee.com/larebelion), [PayPal](https://www.paypal.com/donate?hosted_button_id=7CV28AHGL9ZZY) is a great way to support us or purchasing [\"La Rebelion\" merch](https://go.rebelion.la/merch).\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.","readmeFilename":"README.md"}