{"_id":"@buschgroup/digital-twin-mcp","name":"@buschgroup/digital-twin-mcp","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.5":{"name":"@buschgroup/digital-twin-mcp","version":"1.0.5","description":"MCP Server for DTF","repository":{"type":"git","url":"https://gitlab.dreebit.com/coc/dtf/mcp-server.git"},"license":"ISC","author":"","publishConfig":{"access":"public"},"type":"commonjs","main":"dist/index.mjs","bin":{"digital-twin-mcp":"dist/index.mjs"},"devDependencies":{"@types/express":"^5.0.3","@types/jest":"^29.5.14","@types/ws":"^8.5.13","jest":"^29.7.0","jest-junit":"^16.0.0","ts-jest":"^29.2.5","tsup":"8.5.0","tsx":"4.20.3","typescript":"5.8.3"},"dependencies":{"@modelcontextprotocol/sdk":"1.13.3","@types/cors":"^2.8.19","cors":"^2.8.5","cross-fetch":"^4.1.0","dotenv":"^17.1.0","express":"^5.1.0","graphql-request":"^7.2.0","ws":"^8.18.0","zod":"3.25.67"},"scripts":{"dev":"tsx watch src/index.ts","dev:http":"MCP_HTTP_MODE=true tsx watch src/index.ts","dev:debug":"DEBUG=true tsx watch src/index.ts","build":"tsup","build:production":"tsup --env.NODE_ENV production","start":"node dist/index.mjs","start:http":"MCP_HTTP_MODE=true node dist/index.mjs","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","inspector":"echo 'Starting MCP Server in HTTP mode for testing...' && npm run start:http","test:tools":"echo 'Testing tools manually - server will start in stdio mode' && npm run dev","test:inspector":"node test-tools.js","test:debug":"node --inspect-brk test-tools.js","debug:tools":"node --inspect-brk debug-tools.js","test:integration":"node tests/integration/run-all.js","test:integration:find":"node tests/integration/find-asset-by-serial.test.js","test:integration:search":"node tests/integration/search-assets.test.js","test:integration:auth":"node tests/integration/auth-token.test.js","test:integration:register":"node tests/integration/register-asset.test.js","test:integration:all":"node tests/integration/all-tools.test.js","test:npx":"npx @buschgroup/digital-twin-mcp","env:setup":"cp .env.example .env && echo 'Created .env file. Please edit it with your values.'"},"_id":"@buschgroup/digital-twin-mcp@1.0.5","gitHead":"3ad4334f635e1209f1c7f397b806a6b7008ee8a2","_nodeVersion":"22.15.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-GtROalmAHqebulIhk7ypVubc0M41E++IPUiBFHegw/G495fh9kPi5TY3mPoVL8Ktxe4Qn76vC1jn72XsCDahdQ==","shasum":"86725d454d8e7e8fa2a54d02728c386ef00cc4b8","tarball":"https://registry.npmjs.org/@buschgroup/digital-twin-mcp/-/digital-twin-mcp-1.0.5.tgz","fileCount":4,"unpackedSize":124245,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCfkkQavR6Ufxi0Fibt0Xx767Sj49yVwvLzG+Xs89BXIgIhAOYfAvz1TBTTxynIgdJI25bVTZHgHwALp6fvoUV6npo6"}]},"_npmUser":{"name":"tonimoeckel","email":"tonimoeckel@gmail.com","actor":{"name":"tonimoeckel","email":"tonimoeckel@gmail.com","type":"user"}},"directories":{},"maintainers":[{"name":"tonimoeckel","email":"tonimoeckel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/digital-twin-mcp_1.0.5_1752154653385_0.074092356837415"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-10T13:37:33.277Z","1.0.5":"2025-07-10T13:37:33.565Z","modified":"2025-07-10T13:37:33.889Z"},"maintainers":[{"name":"tonimoeckel","email":"tonimoeckel@gmail.com"}],"description":"MCP Server for DTF","repository":{"type":"git","url":"https://gitlab.dreebit.com/coc/dtf/mcp-server.git"},"license":"ISC","readme":"# DTF MCP Server\n\n[![Coverage](https://gitlab.dreebit.com/coc/dtf/mcp-server/badges/main/coverage.svg)](https://gitlab.dreebit.com/coc/dtf/mcp-server/-/commits/main)\n[![Pipeline](https://gitlab.dreebit.com/coc/dtf/mcp-server/badges/main/pipeline.svg)](https://gitlab.dreebit.com/coc/dtf/mcp-server/-/pipelines)\n\nModel Context Protocol (MCP) server for DTF Asset Management with GraphQL integration.\n\n## Quick Start\n\n### Option 1: Use Published NPM Package (Recommended)\n\n1. **No installation required** - npx will automatically download and run the package\n\n2. **Configure Claude Desktop:**\n   Add this configuration to your Claude Desktop settings:\n\n   **On macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`\n   **On Windows:** `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n   ```json\n   {\n     \"mcpServers\": {\n       \"BuschGroupDigitalTwin\": {\n         \"command\": \"npx\",\n         \"args\": [\"@buschgroup/digital-twin-mcp\"],\n         \"env\": {\n           \"API_URL\": \"https://testing.buscheservices.io/graphql\",\n           \"USERNAME\": \"your-keycloak-username\",\n           \"PASSWORD\": \"your-keycloak-password\"\n         }\n       }\n     }\n   }\n   ```\n\n3. **Restart Claude Desktop** to load the MCP server\n\n4. **Verify setup:** You should see DTF asset management tools available in Claude\n\n### Option 2: Local Development Setup\n\n1. **Clone repository and setup environment:**\n   ```bash\n   git clone https://gitlab.dreebit.com/coc/dtf/mcp-server.git\n   cd mcp-server\n   npm install\n   npm run env:setup\n   # Edit .env file with your authentication method (see below)\n   ```\n\n2. **Configure Claude Desktop for local development:**\n   ```json\n   {\n     \"mcpServers\": {\n       \"digital-twin-mcp\": {\n         \"command\": \"npm\",\n         \"args\": [\"run\", \"dev\"],\n         \"cwd\": \"/path/to/your/digital-twin-mcp\",\n         \"env\": {\n           \"API_URL\": \"https://testing.buscheservices.io/graphql\",\n           \"USERNAME\": \"your-keycloak-username\",\n           \"PASSWORD\": \"your-keycloak-password\"\n         }\n       }\n     }\n   }\n   ```\n\n3. **Start development server:**\n   ```bash\n   npm run dev\n   ```\n\n## Authentication Configuration\n\nThe MCP server supports two authentication methods that can be configured either in Claude Desktop's environment variables or in a local `.env` file:\n\n### Method 1: Username/Password Authentication (Recommended)\nDirect authentication with Keycloak using username and password:\n\n**In Claude Desktop config:**\n```json\n{\n  \"mcpServers\": {\n    \"dtf-mcp-server\": {\n      \"command\": \"npx\",\n      \"args\": [\"@buschgroup/digital-twin-mcp\"],\n      \"env\": {\n        \"API_URL\": \"https://testing.buscheservices.io/graphql\",\n        \"USERNAME\": \"your-keycloak-username\",\n        \"PASSWORD\": \"your-keycloak-password\",\n        \"KEYCLOAK_URL\": \"https://dev.sso.buschgroup.com\",\n        \"KEYCLOAK_REALM\": \"dev\",\n        \"KEYCLOAK_CLIENT_ID\": \"busch-otto-public\"\n      }\n    }\n  }\n}\n```\n\n**Or in local `.env` file:**\n```bash\n# Required for username/password authentication\nUSERNAME=your-keycloak-username\nPASSWORD=your-keycloak-password\n\n# Optional - defaults provided\nKEYCLOAK_URL=https://dev.sso.buschgroup.com\nKEYCLOAK_REALM=dev\nKEYCLOAK_CLIENT_ID=busch-otto-public\n```\n\n### Method 2: Bearer Token Authentication (Fallback)\nManual bearer token management:\n\n**In Claude Desktop config:**\n```json\n{\n  \"mcpServers\": {\n    \"dtf-mcp-server\": {\n      \"command\": \"npx\",\n      \"args\": [\"@buschgroup/digital-twin-mcp\"],\n      \"env\": {\n        \"API_URL\": \"https://testing.buscheservices.io/graphql\",\n        \"GRAPHQL_BEARER_TOKEN\": \"your-bearer-token-here\"\n      }\n    }\n  }\n}\n```\n\n**Or in local `.env` file:**\n```bash\n# Required for manual authentication\nGRAPHQL_BEARER_TOKEN=your-bearer-token-here\n```\n\n### Common Configuration Options\n```bash\n# GraphQL API endpoint (required)\nAPI_URL=https://testing.buscheservices.io/graphql\n\n# Server configuration (optional)\nMCP_HTTP_MODE=false\nPORT=3000\nNODE_ENV=development\nDEBUG=false\n```\n\n## Available Tools\n\n### Asset Management Tools\n\n- **findAssetBySerialNumber**: Find an asset by its exact serial number\n  - Uses additional Systems of Record (e.g. SAP) when the asset is not yet registered\n  - Returns structured JSON data for optimal Claude processing\n  - Parameters: `serialNumber` (required), `manufacturerId` (optional)\n  - Example: `Find asset with serial number \"ABC123\"`\n\n- **searchAssets**: Search for assets using full-text search across various fields\n  - Full-text search with relevance scoring across multiple fields\n  - Supports advanced filtering by manufacturer, product category, client, etc.\n  - Returns ranked results with relevance scores\n  - Parameters: `query` (required), `fields`, `manufacturerId`, `productCategoryId`, `serialNumber`, `productCode`, `assetUrn`, `clientId`, `marketSegmentId`, `productId`, `offset`, `limit`\n  - Example: `Search for \"Pfeiffer vacuum pumps\" in DTF assets`\n\n- **registerAsset**: Register a new asset in the DTF system\n  - Creates a new asset record with identification information\n  - Supports optional location and origin information\n  - Returns complete asset details after registration\n  - Parameters: `asset` (with `serialNumber`, `productCode`), `location` (optional), `origin` (optional)\n  - Example: `Register new asset with serial \"XYZ789\" and product code \"12345\"`\n\n### Usage in Claude Desktop\n\nOnce configured, you can use these tools naturally in conversation:\n\n- *\"Find the asset with serial number D17471742\"*\n- *\"Search for all Pfeiffer Vacuum assets\"*\n- *\"Register a new asset with serial number ABC123 and product code 98765\"*\n- *\"What assets are manufactured by Busch?\"*\n\nThe MCP server will automatically handle authentication and return structured JSON data that Claude can process and present in a user-friendly format.\n\n## Development\n\n- `npm run dev` - Stdio mode (for Claude Desktop)\n- `npm run dev:http` - HTTP/WebSocket mode  \n- `npm run dev:debug` - Debug mode with logging\n- `npm run test` - Run unit tests\n- `npm run test:inspector` - Test MCP tools manually\n- `npm run test:integration` - Run all integration tests\n- `npm run test:integration:find` - Test findAssetBySerialNumber\n- `npm run test:integration:search` - Test searchAssets\n- `npm run test:integration:auth` - Test authentication token management\n- `npm run test:integration:all` - Test all tools together\n\n## Documentation\n\n- [CLAUDE.md](./CLAUDE.md) - Detailed development instructions\n- [DEBUGGING.md](./DEBUGGING.md) - Complete debugging guide with VS Code setup","readmeFilename":"readme.md","_rev":"1-f003b43de5305f60f6224e4cb83ebef7"}