{"_id":"@alliottech/sharepoint-mcp-server","_rev":"3-7a4e3b90738af482c480e798a743ba7f","name":"@alliottech/sharepoint-mcp-server","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@alliottech/sharepoint-mcp-server","version":"0.1.0","keywords":["mcp","model-context-protocol","sharepoint","microsoft-graph","claude","ai","assistant"],"author":{"name":"SharePoint MCP Server Contributors"},"license":"MPL-2.0","_id":"@alliottech/sharepoint-mcp-server@0.1.0","maintainers":[{"name":"alliot","email":"alliot@iots.vip"}],"homepage":"https://github.com/sekops/sharepoint-mcp-server#readme","bugs":{"url":"https://github.com/sekops/sharepoint-mcp-server/issues"},"bin":{"alliot-sharepoint-mcp":"build/index.js"},"dist":{"shasum":"a2e447b681c02259c487cce89615e30151e2f53b","tarball":"https://registry.npmjs.org/@alliottech/sharepoint-mcp-server/-/sharepoint-mcp-server-0.1.0.tgz","fileCount":4,"integrity":"sha512-RPfGcAvI1MrB9TuT9lDlqCLXJik3ycujvMKW81qHANMjbKXu71TiC7qX9CdGDtqOHmsBJXmx+oEvALVr2rnbZg==","signatures":[{"sig":"MEYCIQCAufd0yB4nasL5Kn1sEGf7eu+t+FygcPP9GbZFz5t3lQIhAOfzvlEtt+Zmto7P+OF/3qF2kwBoDoL7xrRgh8emyC2V","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44416},"type":"module","gitHead":"840123621a63d1a93532697512ef338dc2223c2a","private":false,"scripts":{"test":"node test/basic-test.js","build":"tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\"","watch":"tsc --watch","prepare":"npm run build","inspector":"npx @modelcontextprotocol/inspector build/index.js"},"_npmUser":{"name":"alliot","email":"alliot@iots.vip"},"repository":{"url":"git+https://github.com/sekops/sharepoint-mcp-server.git","type":"git"},"_npmVersion":"11.4.2","description":"A Model Context Protocol server for browsing and interacting with Microsoft SharePoint sites and documents","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@modelcontextprotocol/sdk":"0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^20.11.24"},"_npmOperationalInternal":{"tmp":"tmp/sharepoint-mcp-server_0.1.0_1753324706838_0.29281137940544744","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@alliottech/sharepoint-mcp-server","version":"0.1.1","keywords":["mcp","model-context-protocol","sharepoint","microsoft-graph","claude","ai","assistant"],"author":{"name":"SharePoint MCP Server Contributors"},"license":"MPL-2.0","_id":"@alliottech/sharepoint-mcp-server@0.1.1","maintainers":[{"name":"alliot","email":"alliot@iots.vip"}],"homepage":"https://github.com/sekops/sharepoint-mcp-server#readme","bugs":{"url":"https://github.com/sekops/sharepoint-mcp-server/issues"},"bin":{"alliot-sharepoint-mcp":"build/index.js"},"dist":{"shasum":"243448cdfbb85a75315e22a3ab9a4f90195d9cbd","tarball":"https://registry.npmjs.org/@alliottech/sharepoint-mcp-server/-/sharepoint-mcp-server-0.1.1.tgz","fileCount":4,"integrity":"sha512-O2PdsBbUp9w1hHbHCutU4VK30szeI7zd2lHXnWyyTEiw9LwKhz2PZ2UXK/jRkYz31tSl//tMbzjrxOC87CwbAw==","signatures":[{"sig":"MEUCIQDgOrrLfusYeo5S4uKJunK2QtYhoZFyU1AQgQiLn6VvbwIgInPuWqA14hq7Ct9diwh65GtVWXKS0hzj2wXZ0FIJdd8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44418},"type":"module","gitHead":"f12e263e3fbd94869ddc98ac05c8e8bc15164f06","private":false,"scripts":{"test":"node test/basic-test.js","build":"tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\"","watch":"tsc --watch","prepare":"npm run build","inspector":"npx @modelcontextprotocol/inspector build/index.js"},"_npmUser":{"name":"alliot","email":"alliot@iots.vip"},"repository":{"url":"git+https://github.com/sekops/sharepoint-mcp-server.git","type":"git"},"_npmVersion":"11.4.2","description":"A Model Context Protocol server for browsing and interacting with Microsoft SharePoint sites and documents","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@modelcontextprotocol/sdk":"0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^20.11.24"},"_npmOperationalInternal":{"tmp":"tmp/sharepoint-mcp-server_0.1.1_1753324842002_0.3405355881512242","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@alliottech/sharepoint-mcp-server","version":"0.1.2","description":"A Model Context Protocol server for browsing and interacting with Microsoft SharePoint sites and documents","private":false,"type":"module","license":"MPL-2.0","author":{"name":"SharePoint MCP Server Contributors"},"repository":{"type":"git","url":"git+https://github.com/sekops/sharepoint-mcp-server.git"},"bugs":{"url":"https://github.com/sekops/sharepoint-mcp-server/issues"},"homepage":"https://github.com/sekops/sharepoint-mcp-server#readme","keywords":["mcp","model-context-protocol","sharepoint","microsoft-graph","claude","ai","assistant"],"bin":{"sharepoint-mcp":"build/index.js"},"scripts":{"build":"tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\"","prepare":"npm run build","watch":"tsc --watch","inspector":"npx @modelcontextprotocol/inspector build/index.js","test":"node test/basic-test.js"},"dependencies":{"@modelcontextprotocol/sdk":"0.6.0"},"devDependencies":{"@types/node":"^20.11.24","typescript":"^5.3.3"},"_id":"@alliottech/sharepoint-mcp-server@0.1.2","gitHead":"36f1a535715098ee497ebbd7d7384b1c29e8babd","_nodeVersion":"22.14.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-7TN3SzvduP97J9ioOl2UkTA2byq6nEN080n8clCy/8wGjY017tylrXSQVHQrHGTTD86n/dXVLDg9miYvLLQw0g==","shasum":"3ddb36e90297971d049e951eb4f357c6cb0e0e13","tarball":"https://registry.npmjs.org/@alliottech/sharepoint-mcp-server/-/sharepoint-mcp-server-0.1.2.tgz","fileCount":4,"unpackedSize":44411,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDnIFqIRp1o/jqhbCvTNSe2U7b43u264nO+THGoNQGI1wIhAMShtce6EkvnemsEBEX7COol/rq2C09kolSbTjFx02d8"}]},"_npmUser":{"name":"alliot","email":"alliot@iots.vip"},"directories":{},"maintainers":[{"name":"alliot","email":"alliot@iots.vip"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sharepoint-mcp-server_0.1.2_1753324878228_0.7244709427448577"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-24T02:38:26.708Z","modified":"2025-07-24T02:41:18.615Z","0.1.0":"2025-07-24T02:38:26.999Z","0.1.1":"2025-07-24T02:40:42.189Z","0.1.2":"2025-07-24T02:41:18.398Z"},"bugs":{"url":"https://github.com/sekops/sharepoint-mcp-server/issues"},"author":{"name":"SharePoint MCP Server Contributors"},"license":"MPL-2.0","homepage":"https://github.com/sekops/sharepoint-mcp-server#readme","keywords":["mcp","model-context-protocol","sharepoint","microsoft-graph","claude","ai","assistant"],"repository":{"type":"git","url":"git+https://github.com/sekops/sharepoint-mcp-server.git"},"description":"A Model Context Protocol server for browsing and interacting with Microsoft SharePoint sites and documents","maintainers":[{"name":"alliot","email":"alliot@iots.vip"}],"readme":"# SharePoint MCP Server\n\nA Model Context Protocol server for browsing and interacting with Microsoft SharePoint sites and documents.\n\nThis TypeScript-based MCP server provides comprehensive SharePoint integration through Microsoft Graph API, enabling:\n\n- **Resources**: Access SharePoint sites as MCP resources with structured metadata\n- **Tools**: Search files, list sites, browse document libraries, and retrieve file content\n- **Authentication**: Secure OAuth2 client credentials flow with automatic token management\n\n## Features\n\n### Resources\n- List SharePoint sites accessible to the application\n- Access individual site information via `sharepoint://site/{siteId}` URIs\n- JSON-formatted site metadata with display names and web URLs\n\n### Tools\n\n#### `search_files`\nSearch for files and documents across SharePoint using Microsoft Graph Search API\n- **Parameters**: \n  - `query` (required): Search query string\n  - `limit` (optional): Maximum results to return (default: 10)\n\n#### `list_sites`\nList SharePoint sites accessible to the application\n- **Parameters**:\n  - `search` (optional): Filter sites by display name\n\n#### `get_site_info`\nGet detailed information about a specific SharePoint site\n- **Parameters**:\n  - `siteUrl` (required): SharePoint site URL (e.g., https://tenant.sharepoint.com/sites/sitename)\n\n#### `list_site_drives`\nList document libraries (drives) in a SharePoint site\n- **Parameters**:\n  - `siteUrl` (required): SharePoint site URL\n\n#### `list_drive_items`\nList files and folders in a SharePoint document library\n- **Parameters**:\n  - `siteUrl` (required): SharePoint site URL\n  - `driveId` (optional): Specific drive ID (uses default drive if not specified)\n  - `folderPath` (optional): Folder path to list items from (default: root)\n\n#### `get_file_content`\nGet the content of a specific file from SharePoint (text files only)\n- **Parameters**:\n  - `siteUrl` (required): SharePoint site URL\n  - `filePath` (required): Path to the file\n  - `driveId` (optional): Specific drive ID (uses default drive if not specified)\n\n## Installation\n\n### Using npx (Recommended)\nYou can run the SharePoint MCP Server directly using npx without installing it globally:\n\n```bash\nnpx @alliottech/sharepoint-mcp-server\n```\n\n### Global Installation\nAlternatively, you can install it globally:\n\n```bash\nnpm install -g @alliottech/sharepoint-mcp-server\nsharepoint-mcp-server\n```\n\n## Prerequisites\n\n### Azure App Registration\n1. Register an application in Azure Active Directory\n2. Configure API permissions:\n   - Microsoft Graph: `Sites.Read.All` (Application permission)\n   - Microsoft Graph: `Files.Read.All` (Application permission)\n3. Grant admin consent for the permissions\n4. Create a client secret\n\n### Environment Variables\nSet the following environment variables:\n\n```bash\nSHAREPOINT_URL=https://yourtenant.sharepoint.com\nTENANT_ID=your-azure-tenant-id\nCLIENT_ID=your-azure-app-client-id\nCLIENT_SECRET=your-azure-app-client-secret\n```\n\n## Development\n\nInstall dependencies:\n```bash\nnpm install\n```\n\nBuild the server:\n```bash\nnpm run build\n```\n\nFor development with auto-rebuild:\n```bash\nnpm run watch\n```\n\n## Testing\n\nTest the server using the MCP Inspector:\n```bash\nnpm run inspector\n```\n\nThe Inspector provides a web interface to test all available tools and resources.\n\n## Installation\n\n### Claude Desktop Configuration\n\nAdd the server to your Claude Desktop configuration:\n\n**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n**Windows**: `%APPDATA%/Claude/claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"sharepoint-mcp-server\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/sharepoint-mcp-server/build/index.js\"],\n      \"env\": {\n        \"SHAREPOINT_URL\": \"https://yourtenant.sharepoint.com\",\n        \"TENANT_ID\": \"your-azure-tenant-id\",\n        \"CLIENT_ID\": \"your-azure-app-client-id\",\n        \"CLIENT_SECRET\": \"your-azure-app-client-secret\"\n      }\n    }\n  }\n}\n```\n\n### Global Installation\n\nYou can also install the server globally:\n\n```bash\nnpm install -g .\n```\n\nThen use it directly:\n```bash\nsharepoint-mcp-server\n```\n\n## Architecture\n\nThe server implements a service-oriented architecture with clear separation of concerns:\n\n- **Authentication Layer**: Handles OAuth2 token acquisition and refresh\n- **Graph API Client**: Manages HTTP requests to Microsoft Graph API\n- **Tool Handlers**: Process MCP tool requests and format responses\n- **Resource Handlers**: Manage SharePoint site resources and metadata\n- **Error Handling**: Comprehensive error management with proper MCP error codes\n\n## Security Considerations\n\n- Uses OAuth2 client credentials flow for secure authentication\n- Tokens are automatically refreshed before expiration\n- All API requests use HTTPS\n- Client secrets should be stored securely and never committed to version control\n- Application permissions require admin consent in Azure AD\n\n## Troubleshooting\n\n### Common Issues\n\n1. **Authentication Errors**: Verify Azure app registration and permissions\n2. **Site Access**: Ensure the app has appropriate SharePoint permissions\n3. **Network Issues**: Check firewall settings for Microsoft Graph API access\n\n### Debug Mode\n\nSet environment variable for detailed logging:\n```bash\nDEBUG=sharepoint-mcp-server\n```\n\n## Contributing\n\n1. Follow TypeScript best practices\n2. Maintain comprehensive error handling\n3. Add tests for new functionality\n4. Update documentation for API changes\n\n## License\n\nThis project is licensed under the Mozilla Public License 2.0. See the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nWe welcome contributions! Please follow these guidelines:\n\n### Getting Started\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Make your changes\n4. Add tests for new functionality\n5. Ensure all tests pass (`npm test`)\n6. Commit your changes (`git commit -m 'Add amazing feature'`)\n7. Push to the branch (`git push origin feature/amazing-feature`)\n8. Open a Pull Request\n\n### Development Guidelines\n- Follow TypeScript best practices and maintain type safety\n- Implement comprehensive error handling with proper MCP error codes\n- Add JSDoc comments for all public methods and classes\n- Maintain the service-oriented architecture with clear separation of concerns\n- Follow SOLID principles and keep functions focused and testable\n- Update documentation for any API changes\n\n### Code Style\n- Use TypeScript strict mode\n- Follow the existing code formatting and naming conventions\n- Remove unused imports and variables\n- Use descriptive variable and function names\n- Prefer composition over inheritance\n\n### Testing\n- Add unit tests for new functionality\n- Test error conditions and edge cases\n- Ensure the basic test suite passes\n- Test with real SharePoint environments when possible\n\n### Documentation\n- Update README.md for new features or configuration changes\n- Add JSDoc comments for new public APIs\n- Include examples for complex functionality\n- Update the changelog for significant changes\n\n## Changelog\n\n### [0.1.0] - Initial Release\n- Basic SharePoint integration via Microsoft Graph API\n- Support for searching files across SharePoint\n- Site listing and browsing capabilities\n- Document library access and file content retrieval\n- OAuth2 client credentials authentication\n- MCP resource support for SharePoint sites\n- Comprehensive error handling and logging\n\n## Support\n\nIf you encounter issues or have questions:\n\n1. Check the [troubleshooting section](#troubleshooting) in this README\n2. Search existing [GitHub issues](https://github.com/sekops/sharepoint-mcp-server/issues)\n3. Create a new issue with detailed information about your problem\n4. Include relevant logs and configuration (without sensitive information)\n\n## Acknowledgments\n\n- Built with the [Model Context Protocol SDK](https://github.com/modelcontextprotocol/typescript-sdk)\n- Uses Microsoft Graph API for SharePoint integration\n- Inspired by the MCP community and ecosystem\n","readmeFilename":"README.md"}