{"_id":"@agione/agione-mcp","_rev":"3-870bc4fe5a887e48709be0b87979952e","name":"@agione/agione-mcp","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@agione/agione-mcp","version":"1.0.0","_id":"@agione/agione-mcp@1.0.0","maintainers":[{"name":"tuchongyang","email":"779311998@qq.com"}],"dist":{"shasum":"e3ed13adee3e958393ffedc0372e08154fb7c240","tarball":"https://registry.npmjs.org/@agione/agione-mcp/-/agione-mcp-1.0.0.tgz","fileCount":5,"integrity":"sha512-Qqu1TN1YZORTiIZfzeRGI06cDraiXsT4IZdQjuJGOvcmXdJvf6GOhyMzK+1yuuXuOM+OEyZfjdTj9Cppl9k2IQ==","signatures":[{"sig":"MEQCID3q/zJK/FJ8vgSA95p29Kt/IWjlCfhRaCc8PGzTeTHXAiBLNOicnQpXV1PMZr6Ha+Ue8U4AmxtD4mqW4JF8m7TDFw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42039},"main":"build/index.js","type":"module","private":false,"scripts":{"dev":"tsx src/index.ts","build":"vite build","start":"node build/index.js","typecheck":"tsc --noEmit","start:menu":"node build/menu/index.js"},"_npmUser":{"name":"tuchongyang","email":"779311998@qq.com"},"_npmVersion":"11.6.2","description":"MCP server for Agione admin operations","directories":{},"_nodeVersion":"24.13.0","dependencies":{"zod":"^4.0.0","@modelcontextprotocol/sdk":"^1.10.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.5","vite":"^8.0.14","typescript":"^5.9.2","@types/node":"^22.17.0"},"_npmOperationalInternal":{"tmp":"tmp/agione-mcp_1.0.0_1779354005530_0.8221047483276778","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@agione/agione-mcp","version":"1.0.1","_id":"@agione/agione-mcp@1.0.1","maintainers":[{"name":"tuchongyang","email":"779311998@qq.com"}],"bin":{"agione-mcp":"build/index.js","agione-menu-mcp":"build/menu/index.js"},"dist":{"shasum":"d8c6979c0b578a52c325afb5d30b85c78fdf6ae0","tarball":"https://registry.npmjs.org/@agione/agione-mcp/-/agione-mcp-1.0.1.tgz","fileCount":5,"integrity":"sha512-/3M3JG2Wz0fVmDYe4+WyyJw2uUcGM/kHyO3Sps4Pih36mVh0BGksba8HMIJw3V/8zMxsqHFakumupObyfkpqLw==","signatures":[{"sig":"MEQCID51wvVJ8kas2c8z5LRYoQDJXUHmo6ifQbHZbfK2kOFuAiAySDi4RFVDmOc6G9y1RhbgcOZ8ZTo7wyOZLpSwJwkLww==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42176},"main":"build/index.js","type":"module","private":false,"scripts":{"dev":"tsx src/index.ts","build":"vite build","start":"node build/index.js","typecheck":"tsc --noEmit","start:menu":"node build/menu/index.js"},"_npmUser":{"name":"tuchongyang","email":"779311998@qq.com"},"_npmVersion":"11.6.2","description":"MCP server for Agione admin operations","directories":{},"_nodeVersion":"24.13.0","dependencies":{"zod":"^4.0.0","@modelcontextprotocol/sdk":"^1.10.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.5","vite":"^8.0.14","typescript":"^5.9.2","@types/node":"^22.17.0"},"_npmOperationalInternal":{"tmp":"tmp/agione-mcp_1.0.1_1779355644495_0.5224891262995832","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@agione/agione-mcp","version":"1.0.2","description":"MCP server for Agione admin operations","private":false,"type":"module","main":"build/index.js","bin":{"agione-mcp":"build/index.js","agione-menu-mcp":"build/menu/index.js"},"scripts":{"build":"vite build","typecheck":"tsc --noEmit","dev":"tsx src/index.ts","start":"node build/index.js","start:menu":"node build/menu/index.js"},"dependencies":{"@modelcontextprotocol/sdk":"^1.10.2","zod":"^4.0.0"},"devDependencies":{"@types/node":"^22.17.0","tsx":"^4.20.5","typescript":"^5.9.2","vite":"^8.0.14"},"publishConfig":{"access":"public"},"_id":"@agione/agione-mcp@1.0.2","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-OKpW9diiZQsVYVfp0Rg4fHPEBxNMv4GhEW7NFHwa3GTySdmrcjrmGrGJ5P94Mm7r15kvv8858DJjWL0RRhhOUg==","shasum":"ddb5f892cf6aceefb7af3bee166f29fbf3547a07","tarball":"https://registry.npmjs.org/@agione/agione-mcp/-/agione-mcp-1.0.2.tgz","fileCount":5,"unpackedSize":45616,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDLc2ryv6WPgG8BMLBjzQMmgvWYOARnL9fA+vqCuHZxuQIgD7wkK9eLlcWaGTew/037i9t5cdaIVeez06nxr0EXg6s="}]},"_npmUser":{"name":"tuchongyang","email":"779311998@qq.com"},"directories":{},"maintainers":[{"name":"tuchongyang","email":"779311998@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agione-mcp_1.0.2_1779420658671_0.03969381559674945"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-21T09:00:05.345Z","modified":"2026-05-22T03:30:58.957Z","1.0.0":"2026-05-21T09:00:05.658Z","1.0.1":"2026-05-21T09:27:24.629Z","1.0.2":"2026-05-22T03:30:58.801Z"},"description":"MCP server for Agione admin operations","maintainers":[{"name":"tuchongyang","email":"779311998@qq.com"}],"readme":"# Agione MCP\n\nThis package exposes Agione admin operations as MCP tools.\n\n## Structure\n\n- `src/index.ts`: aggregate entrypoint. Register all feature modules here.\n- `src/menu/index.ts`: menu-only compatibility entrypoint.\n- `src/core/*`: reusable runtime code shared by every module.\n  - `env.ts`: env file loading, runtime config, masked context output.\n  - `http.ts`: authenticated JSON requests, token refresh, API URL building.\n  - `server.ts`: MCP stdio server wiring and module dispatch.\n  - `response.ts`: common MCP text responses, error formatting, write confirmation guard.\n- `src/modules/<domain>/*`: domain modules such as `menu`, later `role` or `user`.\n  - `types.ts`: domain DTOs and backend response shapes.\n  - `schemas.ts`: zod input validation and JSON schemas exposed to MCP clients.\n  - `service.ts`: backend API calls and domain workflows.\n  - `tools.ts`: MCP tool definitions and tool handlers.\n  - `index.ts`: exports a `ToolModule`.\n\n## Adding A Module\n\nCreate `src/modules/role` or `src/modules/user` with the same file shape as `menu`, export a `ToolModule`, then add it to `modules` in `src/index.ts`.\n\nKeep cross-domain behavior in `src/core`. Keep backend endpoint details and workflow rules inside the owning domain module.\n\n## Menu Identity\n\nRead helpers such as `menu_resolve`, `menu_get`, and `menu_export_json` can use\n`path`, but path can be duplicated. Write tools intentionally reject path\nselectors and only accept `menuId` or `permissionMenuId`.\n\n```json\n{\n  \"selector\": {\n    \"by\": \"menuId\",\n    \"value\": \"123456\",\n    \"appId\": \"metis\"\n  }\n}\n```\n\nThe menu module resolves selectors into a normalized identity containing both\n`menuId` and `permissionMenuId`. Tools that need `menuId` or `permissionMenuId`\nchoose the correct backend id internally, which avoids model confusion between\nthose two fields.\n\n## Token Refresh Cache\n\nWhen an access token expires, the client refreshes it with\n`AGIONE_REFRESH_TOKEN` and `AGIONE_BASIC_AUTH` or\n`AGIONE_OAUTH2_PASSWORD_CLIENT`. Refreshed access and refresh tokens are cached\nunder `~/.agione-mcp/<profile>.tokens.json` by default, scoped to the configured\nprofile and API base. Override this with `AGIONE_TOKEN_CACHE_FILE`, or set\n`AGIONE_TOKEN_CACHE_DISABLED=true` to disable local token caching.\n","readmeFilename":"README.md"}