{"_id":"@cof-org/mcp","name":"@cof-org/mcp","dist-tags":{"latest":"0.5.1"},"versions":{"0.5.1":{"name":"@cof-org/mcp","version":"0.5.1","description":"Commerce Operations Foundation MCP Server","type":"module","main":"dist/index.js","types":"dist/index.d.ts","bin":{"cof-mcp":"dist/index.js"},"exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsc","dev":"vite-node src/index.ts","start":"node dist/index.js","test":"npm run build && vitest","test:ui":"vitest --ui","test:coverage":"vitest --coverage","test:watch":"vitest --watch","test:unit":"npm run build && vitest tests/unit","test:integration":"npm run build && vitest tests/integration","lint":"eslint src --ext .ts","format":"prettier --write \"src/**/*.ts\"","typecheck":"tsc --noEmit","typecheck:watch":"tsc --noEmit --watch","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build","generate:json-schemas":"npx tsx src/schemas/utils/generate-schemas.ts"},"keywords":["mcp","fulfillment","fulfillment-management","ecommerce","ai","claude"],"author":{"name":"Commerce Operations Foundation"},"license":"MIT","dependencies":{"@modelcontextprotocol/sdk":"^0.5.0","ajv":"^8.12.0","ajv-formats":"^3.0.1","dotenv":"^16.3.1","uuid":"^9.0.1","winston":"^3.17.0","winston-daily-rotate-file":"^5.0.0","zod":"^4.1.12"},"devDependencies":{"@eslint/js":"^9.8.0","@types/node":"^20.10.5","@types/uuid":"^9.0.7","@typescript-eslint/eslint-plugin":"^8.7.0","@typescript-eslint/parser":"^8.7.0","@vitest/coverage-v8":"^3.2.4","@vitest/ui":"^3.2.4","eslint":"^9.8.0","eslint-plugin-import":"^2.32.0","eslint-plugin-unused-imports":"^4.2.0","prettier":"^3.1.1","typescript":"^5.3.3","typescript-eslint":"^8.7.0","vite":"^7.1.3","vite-node":"^3.2.4","vitest":"^3.2.4"},"engines":{"node":">=18.0.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/cof-org/mcp.git"},"_id":"@cof-org/mcp@0.5.1","gitHead":"fbb0767f84c3159ea8b48c27a9cdbdb18232b1b7","bugs":{"url":"https://github.com/cof-org/mcp/issues"},"homepage":"https://github.com/cof-org/mcp#readme","_nodeVersion":"20.19.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-W+bZUWV+/LdCKr/u2z0uiMpYLfB7BTViGydCThLS9LfeIR9Vis8h3bgbHalqG8LOdxAgNOW1TFbl63C/bCoilA==","shasum":"2667ff1a490e2db9cfce9e06187384c49bd7561f","tarball":"https://registry.npmjs.org/@cof-org/mcp/-/mcp-0.5.1.tgz","fileCount":299,"unpackedSize":599268,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFfXIgmLsnbEicFgihUZdTIDXe+AyAKjBx1L0ldlS/FHAiBLiSB1fIONHvfjy9Qi8nkgprWmb0S8SE/QWkS562A5Aw=="}]},"_npmUser":{"name":"j-shao","email":"john@pipe17.com"},"directories":{},"maintainers":[{"name":"j-shao","email":"john@pipe17.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp_0.5.1_1764104601725_0.015321926087181525"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-25T21:03:21.601Z","0.5.1":"2025-11-25T21:03:21.904Z","modified":"2025-11-25T21:03:22.174Z"},"maintainers":[{"name":"j-shao","email":"john@pipe17.com"}],"description":"Commerce Operations Foundation MCP Server","homepage":"https://github.com/cof-org/mcp#readme","keywords":["mcp","fulfillment","fulfillment-management","ecommerce","ai","claude"],"repository":{"type":"git","url":"git+https://github.com/cof-org/mcp.git"},"author":{"name":"Commerce Operations Foundation"},"bugs":{"url":"https://github.com/cof-org/mcp/issues"},"license":"MIT","readme":"# Commerce Operations Foundation MCP Server\n\nA Model Context Protocol (MCP) server that provides standardized access to commerce operations and fulfillment systems.\n\n## Features\n\n- 10 standardized fulfillment tools covering core order capture, fulfillment, and data queries\n- Plug-and-play adapter system for different fulfillment backends\n- Mock adapter for testing and development\n- Full TypeScript implementation with strict type safety\n- JSON Schema validation for all inputs\n- stdio transport for Claude Desktop integration\n\n## Quick Start\n\n### Installation\n\n```bash\n# From the repository root\ncd server\nnpm install\n```\n\n### Running the Server\n\n```bash\n# Development mode with TypeScript via vite-node\nnpm run dev\n\n# Production mode\nnpm run build\nnpm start\n```\n\n### Configuration\n\nCopy `.env.example` to `.env` and configure:\n\n```bash\n# Use built-in mock adapter (default)\nADAPTER_TYPE=built-in\nADAPTER_NAME=mock\n\n# Set log level\nLOG_LEVEL=info\n\n# Optional: pass adapter options as JSON\nADAPTER_CONFIG='{\"fixedLatency\":150}'\n```\n\n## Architecture\n\nThe server follows a three-layer architecture:\n\n1. **Protocol Layer** - Handles MCP communication\n2. **Service Layer** - Business logic and validation\n3. **Adapter Layer** - Fulfillment integration (pluggable)\n\n## Available Tools\n\n### Action Tools\n- `create-sales-order` - Create new orders from external systems or checkouts\n- `cancel-order` - Cancel existing orders with optional reasons\n- `update-order` - Modify order details and metadata\n- `fulfill-order` - Mark orders as fulfilled and return fulfillment data\n\n### Query Tools\n- `get-orders` - Retrieve orders with rich filtering\n- `get-customers` - Fetch customer records\n- `get-products` - Get product catalog entries\n- `get-product-variants` - Retrieve variant data\n- `get-inventory` - Check stock levels across locations\n- `get-fulfillments` - List fulfillment records and statuses\n\n## Claude Desktop Integration\n\nAdd to your Claude Desktop configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"cof-mcp\": {\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/server/dist/index.js\"],\n      \"env\": {\n        \"ADAPTER_TYPE\": \"built-in\",\n        \"ADAPTER_NAME\": \"mock\"\n      }\n    }\n  }\n}\n```\n\n## Security Considerations\n\n### Dynamic Adapter Loading\n\nThis MCP server supports dynamic loading of adapters from NPM packages and local files to facilitate adapter development and testing. This flexibility comes with security considerations:\n\n**⚠️ IMPORTANT SECURITY NOTICE:**\n- Dynamically loaded adapters execute with full system permissions\n- Only load adapters from trusted sources\n- Never load adapters from user uploads or untrusted repositories\n- The adapter code has the same access level as the MCP server itself\n\n**For Production Environments:**\n- Consider implementing a whitelist of allowed adapters\n- Run the MCP server in a containerized/sandboxed environment\n- Use Node.js experimental permission flags to restrict file/network access\n- Implement code signing for adapters\n\n**For Development (Reference Implementation):**\n- The current implementation prioritizes developer flexibility\n- Logs all adapter loading for transparency\n- Validates file existence and type before loading\n- Suitable for local development and testing\n\n### Best Practices\n\n1. **Adapter Development**: When developing custom adapters, ensure your code:\n   - Only accesses necessary Fulfillment APIs\n   - Doesn't expose sensitive credentials\n   - Validates all inputs properly\n   - Handles errors gracefully\n\n2. **Configuration Security**:\n   - Store sensitive configuration in environment variables\n   - Never commit `.env` files to version control\n   - Use secrets management in production\n\n3. **Network Security**:\n   - Run the MCP server behind appropriate firewalls\n   - Use TLS/SSL for Fulfillment API communications\n   - Implement rate limiting for production use\n\n## Development\n\n### Project Structure\n\n```\nserver/\n├── src/\n│   ├── adapters/      # Built-in Fulfillment adapters\n│   ├── services/      # Business logic\n│   ├── tools/         # Tool implementations\n│   ├── types/         # TypeScript types\n│   └── utils/         # Utilities\n└── tests/            # Test suites\n```\n\n### Adding a Custom Adapter\n\n1. Create your adapter class implementing `IFulfillmentAdapter`\n2. Register it in the adapter factory\n3. Configure via environment variables\n\nSee [docs/architecture](../docs/architecture/system-architecture.md) for details.\n\n### Testing\n\n```bash\n# Run all tests\nnpm test\n\n# Run specific test suites\nnpm run test:unit\nnpm run test:integration\n```\n\n## Documentation\n\n- [Architecture Guide](../docs/architecture/system-architecture.md)\n- [MCP Specification](../docs/specification/mcp-server-spec.md)\n- [Tool Reference](../docs/standard/tools-reference.md)\n\n## License\n\nMIT\n\n## Contributing\n\nSee [CONTRIBUTING.md](../CONTRIBUTING.md) for guidelines.\n\n## Support\n\nFor issues and questions, visit [GitHub Issues](https://github.com/cof-org/mcp/issues).\n","readmeFilename":"README.md","_rev":"1-023806344e3da2b3dc90a1bbc99f78bd"}