npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@spteck/m365-hooks

v1.4.0

Published

A comprehensive collection of React hooks for Microsoft 365 development, including SharePoint, Microsoft Graph, and **Model Context Protocol (MCP)** client integration.

Downloads

985

Readme

M365 - React hooks use to create React Applications that need to access M365 Data

By João Mendes

A comprehensive collection of React hooks for Microsoft 365 development, including SharePoint, Microsoft Graph, and Model Context Protocol (MCP) client integration.

Features

  • 🔌 MCP Client Hook - Connect to any Model Context Protocol server and use it as a data layer
  • 📊 SharePoint data access hooks
  • 📅 Calendar events management
  • 👥 User and group management
  • 🔍 Search and recommendations
  • 📹 Video and media handling
  • 💾 Advanced caching with IndexedDB
  • 🎨 Theming utilities
  • ⚡ Performance optimized
  • 🔒 Type-safe with TypeScript

New: MCP Server Integration

The useMCPServer hook enables your application to connect to any Model Context Protocol server and use it as a universal data layer. Perfect for:

  • AI agent integrations
  • External API abstractions
  • Tool orchestration
  • Resource management
  • Cross-platform data access

Quick Example:

import { useMCPServer } from '@spteck/m365-hooks';

const { tools, callTool } = useMCPServer({
  url: 'https://mcp-server.example.com',
  headers: { Authorization: 'Bearer token' }
});

// Call any tool from the server
const result = await callTool({
  name: 'get_data',
  arguments: { query: 'search term' }
});

📖 Full MCP Documentation | Examples

Installation

npm install @spteck/m365-hooks

Available Hooks

MCP Integration

  • useMCPServer - Model Context Protocol client for universal data layer access

SharePoint

  • usePnPjs - PnP JS integration
  • useSharePointPermissions - Permission checking
  • useSharePointCalendarEvents - Calendar events
  • useSharePointActivities - Activity tracking
  • useNewsPosts - News posts management
  • usePageLikes - Page likes functionality
  • useMySavedPages - Saved pages management

Microsoft Graph

  • useGraphUserAPI - User API access
  • useGroupCalendarEvents - Group calendar events

Utilities

  • useCache - In-memory caching
  • useIndexedDBCache - Persistent caching
  • useUtils - General utilities
  • useLogging - Logging utilities
  • useAppToast - Toast notifications

Media

  • useVideos - Video management
  • useVideoThumbnail - Video thumbnails

Other

  • useAppCatalog - App catalog management
  • useMicrosoftAppStore - App store integration
  • useMicrosoftLicensing - License management
  • useYammerMessages - Yammer integration
  • useEventManagement - Event management
  • usePooling - Polling utilities
  • useRecomendedItems - Recommendations
  • useMantineThemeFromFluentTheme - Theme conversion

Documentation

License

MIT

Author

João Mendes - @joaojmendes