{"_id":"@davidmoore-io/ms-365-mcp-server","_rev":"2-ab7cbe4e5e41dc8bd30b95fd29fb65f8","name":"@davidmoore-io/ms-365-mcp-server","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@davidmoore-io/ms-365-mcp-server","version":"1.0.0","keywords":["mcp","microsoft-365","graph-api","model-context-protocol"],"author":{"name":"David Moore","email":"your-email@example.com"},"license":"MIT","_id":"@davidmoore-io/ms-365-mcp-server@1.0.0","maintainers":[{"name":"davidmoore-io","email":"npmjs@davidmoore.io"}],"contributors":[{"url":"original author","name":"Softeria"}],"homepage":"https://github.com/davidmoore-io/ms-365-mcp-server#readme","bugs":{"url":"https://github.com/davidmoore-io/ms-365-mcp-server/issues"},"bin":{"ms-365-mcp-server":"dist/index.js"},"dist":{"shasum":"663eec1fddf6def3ae2d53153b5707d36592635d","tarball":"https://registry.npmjs.org/@davidmoore-io/ms-365-mcp-server/-/ms-365-mcp-server-1.0.0.tgz","fileCount":26,"integrity":"sha512-7JW8Jm1syi7CF0D87WKTKJdoFspCF1sccgmbwlwxxtVBjPun769RzjsjFtsIdg3I3gtKLvlJasDTfLwJdCXg4A==","signatures":[{"sig":"MEUCIDg4I1OcMRfJwhvfy6rDTOEuN2cFyzIMmRElWM0VbHkfAiEA3Es4kscSBMdYUzwGMYJ0RB+aUQPZGTlWKfHX8Ps0ozc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":770286},"main":"dist/index.js","type":"module","gitHead":"4f6cf22475673ca032bc0bc02c9911c6ccff0396","scripts":{"dev":"tsx src/index.ts","test":"vitest run","build":"tsc","format":"prettier --write \"**/*.{ts,mts,js,mjs,json,md}\"","inspect":"npx @modelcontextprotocol/inspector tsx src/index.ts","release":"ts-node --esm bin/release.mts","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"davidmoore-io","email":"npmjs@davidmoore.io"},"repository":{"url":"git+https://github.com/davidmoore-io/ms-365-mcp-server.git","type":"git"},"_npmVersion":"11.3.0","description":"Microsoft 365 MCP Server - Fork with pre-authenticated token support","directories":{},"_nodeVersion":"24.0.1","dependencies":{"zod":"^3.24.2","keytar":"^7.9.0","js-yaml":"^4.1.0","winston":"^3.17.0","commander":"^11.1.0","@azure/msal-node":"^2.1.0","@modelcontextprotocol/sdk":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.4","vitest":"^3.1.1","prettier":"^3.5.3","typescript":"^5.8.3","@types/node":"^22.15.15","@redocly/cli":"^1.34.3"},"_npmOperationalInternal":{"tmp":"tmp/ms-365-mcp-server_1.0.0_1748378094410_0.45440896164059397","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@davidmoore-io/ms-365-mcp-server","version":"1.0.1","description":"Microsoft 365 MCP Server - Fork with pre-authenticated token support","type":"module","main":"dist/index.js","bin":{"ms-365-mcp-server":"dist/index.js"},"scripts":{"build":"tsc","test":"vitest run","test:watch":"vitest","dev":"tsx src/index.ts","format":"prettier --write \"**/*.{ts,mts,js,mjs,json,md}\"","release":"ts-node --esm bin/release.mts","inspect":"npx @modelcontextprotocol/inspector tsx src/index.ts","prepublishOnly":"npm run build"},"keywords":["mcp","microsoft-365","graph-api","model-context-protocol"],"homepage":"https://github.com/davidmoore-io/ms-365-mcp-server#readme","bugs":{"url":"https://github.com/davidmoore-io/ms-365-mcp-server/issues"},"author":{"name":"David Moore","email":"your-email@example.com"},"contributors":[{"name":"Softeria","url":"original author"}],"license":"MIT","publishConfig":{"access":"public"},"dependencies":{"@azure/msal-node":"^2.1.0","@modelcontextprotocol/sdk":"^1.8.0","commander":"^11.1.0","js-yaml":"^4.1.0","keytar":"^7.9.0","winston":"^3.17.0","zod":"^3.24.2"},"devDependencies":{"@redocly/cli":"^1.34.3","@types/node":"^22.15.15","prettier":"^3.5.3","tsx":"^4.19.4","typescript":"^5.8.3","vitest":"^3.1.1"},"repository":{"type":"git","url":"git+https://github.com/davidmoore-io/ms-365-mcp-server.git"},"_id":"@davidmoore-io/ms-365-mcp-server@1.0.1","gitHead":"094b1cdc077e03f233078034fe7ab27c52b6463c","_nodeVersion":"24.0.1","_npmVersion":"11.3.0","dist":{"integrity":"sha512-pcGJPV8F/NHqEzof1Fw11tzF7n6RZjZ735GuGv57me/nQmQCyRpALXcCYBnBvAC1aKTw71kmUpBCiUiBpXY5aw==","shasum":"ed392c62904420be1e5051a8b42316a8245edb83","tarball":"https://registry.npmjs.org/@davidmoore-io/ms-365-mcp-server/-/ms-365-mcp-server-1.0.1.tgz","fileCount":26,"unpackedSize":770811,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAGRXCwmAloc2PbQooAy34pfH1PkqjrzNV/EY0UFr9+hAiEAiJMZ8XB5uVXnteAhaEfF0kwGvDLJLXJ/vCL//HxX7Gs="}]},"_npmUser":{"name":"davidmoore-io","email":"npmjs@davidmoore.io"},"directories":{},"maintainers":[{"name":"davidmoore-io","email":"npmjs@davidmoore.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ms-365-mcp-server_1.0.1_1748381948166_0.32633888023934077"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-27T20:34:54.296Z","modified":"2025-05-27T21:39:08.593Z","1.0.0":"2025-05-27T20:34:54.622Z","1.0.1":"2025-05-27T21:39:08.411Z"},"bugs":{"url":"https://github.com/davidmoore-io/ms-365-mcp-server/issues"},"author":{"name":"David Moore","email":"your-email@example.com"},"license":"MIT","homepage":"https://github.com/davidmoore-io/ms-365-mcp-server#readme","keywords":["mcp","microsoft-365","graph-api","model-context-protocol"],"repository":{"type":"git","url":"git+https://github.com/davidmoore-io/ms-365-mcp-server.git"},"description":"Microsoft 365 MCP Server - Fork with pre-authenticated token support","contributors":[{"name":"Softeria","url":"original author"}],"maintainers":[{"name":"davidmoore-io","email":"npmjs@davidmoore.io"}],"readme":"# ms-365-mcp-server\n\n[![npm version](https://img.shields.io/npm/v/@davidmoore-io/ms-365-mcp-server.svg)](https://www.npmjs.com/package/@davidmoore-io/ms-365-mcp-server) [![build status](https://github.com/davidmoore-io/ms-365-mcp-server/actions/workflows/build.yml/badge.svg)](https://github.com/davidmoore-io/ms-365-mcp-server/actions/workflows/build.yml) [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/davidmoore-io/ms-365-mcp-server/blob/main/LICENSE)\n\nMicrosoft 365 MCP Server - Fork with Pre-authenticated Token Support\n\n> **Fork Notice**: This is a fork of the original [@softeria/ms-365-mcp-server](https://www.npmjs.com/package/@softeria/ms-365-mcp-server) with added support for pre-authenticated tokens via environment variables. This allows for better integration with applications that already handle Microsoft authentication.\n\nA Model Context Protocol (MCP) server for interacting with Microsoft 365 services through the Graph API.\n\n## Prerequisites\n\n- Node.js >= 14\n\n## Features\n\n- Authentication via Microsoft Authentication Library (MSAL)\n- Excel file operations\n- Calendar event management\n- Mail operations\n- OneDrive file management\n- OneNote notebooks and pages\n- To Do tasks and task lists\n- Planner plans and tasks\n- Outlook contacts\n\n## Quick Start Example\n\nTest login in Claude Desktop:\n\n![Login example](https://github.com/user-attachments/assets/e457884f-c98a-4186-9e6f-eb323ec24e0a)\n\n## Examples\n\n![Image](https://github.com/user-attachments/assets/1a296afb-48ed-42b0-9e7c-e685d5d1784c)\n\n## Integration\n\n### Claude Desktop\n\nTo add this MCP server to Claude Desktop:\n\nEdit the config file under Settings > Developer:\n\n```json\n{\n  \"mcpServers\": {\n    \"ms365\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@davidmoore-io/ms-365-mcp-server\"\n      ]\n    }\n  }\n}\n```\n\n### Claude Code CLI\n\n```bash\nclaude mcp add ms365 -- npx -y @davidmoore-io/ms-365-mcp-server\n```\n\nFor other interfaces that support MCPs, please refer to their respective documentation for the correct\nintegration method.\n\n### Authentication\n\n> ⚠️ You must authenticate before using tools.\n\n#### Option 1: Pre-authenticated Token (New!)\n\nIf you already have a Microsoft 365 access token (e.g., from your application), you can pass it via environment variable:\n\n```bash\nMS365_ACCESS_TOKEN=\"your-access-token\" npx @softeria/ms-365-mcp-server\n```\n\nOr in your MCP configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"ms365\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@softeria/ms-365-mcp-server\"],\n      \"env\": {\n        \"MS365_ACCESS_TOKEN\": \"your-access-token\"\n      }\n    }\n  }\n}\n```\n\nThe server will validate the token on startup and use it for all API calls. If the token is invalid or expires, it will fall back to the standard authentication flow.\n\n#### Option 2: Interactive Device Code Flow (Original)\n\n1. **MCP client login**:\n    - Call the `login` tool (auto-checks existing token)\n    - If needed, get URL+code, visit in browser\n    - Use `verify-login` tool to confirm\n2. **Optional CLI login**:\n   ```bash\n   npx @softeria/ms-365-mcp-server --login\n   ```\n   Follow the URL and code prompt in the terminal.\n\nTokens are cached securely in your OS credential store (fallback to file).\n\n## CLI Options\n\nThe following options can be used when running ms-365-mcp-server directly from the command line:\n\n```\n--login           Login using device code flow\n--logout          Log out and clear saved credentials\n--verify-login    Verify login without starting the server\n```\n\n### Server Options\n\nWhen running as an MCP server, the following options can be used:\n\n```\n-v                Enable verbose logging\n--read-only       Start server in read-only mode, disabling write operations\n```\n\nEnvironment variables:\n\n- `READ_ONLY=true|1`: Alternative to --read-only flag\n- `LOG_LEVEL`: Set logging level (default: 'info')\n- `SILENT=true`: Disable console output\n\n## License\n\nMIT © 2025 Softeria\n","readmeFilename":"README.md"}