MCP Notification Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP Notification Server - Complete Demonstration
A comprehensive, production-ready demonstration of MCP (Model Context Protocol) notifications and subscriptions with working examples, multiple patterns, interactive demos, and complete documentation.
π― What's This?
This repository provides the most complete demonstration of MCP notifications available, including:
Working server implementations (basic and advanced)
Interactive client demos
Real-world notification patterns
Comprehensive testing scenarios
Complete architecture documentation
Step-by-step guides
Perfect for learning how to implement notifications in your own MCP servers!
Related MCP server: MCP Events Starter
β‘ Quick Start
Get running in 5 minutes β QUICKSTART.md
git clone https://github.com/whocaresthat/mcp-notification-server.git
cd mcp-notification-server
npm install
npm run build
# Run interactive demo
node dist/examples/client.jsπ Complete Documentation
Document | Description |
π QUICKSTART.md | Get up and running in 5 minutes |
π¬ DEMO.md | Interactive demonstration walkthrough |
ποΈ ARCHITECTURE.md | System design, patterns, and best practices |
π§ͺ test-scenarios.md | 10 comprehensive test scenarios |
π patterns.md | 7 notification patterns with code examples |
β¨ Features
Three Implementation Levels
Basic Server (src/index.ts)
Simple, easy to understand
Core notification concepts
Perfect for learning
Advanced Server (examples/advanced-server.ts)
File system watching
Webhook endpoints
Periodic updates
Production patterns
Interactive Client (examples/client.ts)
Full client implementation
Automated demo
Shows notifications in action
Comprehensive Examples
β Event-driven notifications β Periodic updates (timers) β File system monitoring β Webhook integration β Threshold-based alerts β Batched notifications β Multiple subscribers β Subscription lifecycle management
π What You'll Learn
For Beginners
β What are MCP notifications?
β How to enable subscriptions
β Sending your first notification
β Testing with Claude Desktop
For Advanced Users
β Production-ready patterns
β Performance optimization
β Error handling strategies
β Security considerations
β Scalability patterns
π Usage
Option 1: Interactive Demo
npm install
npm run build
node dist/examples/client.jsSee notifications in action with automated demo!
Option 2: Claude Desktop
Add to your Claude config:
{
"mcpServers": {
"notification-demo": {
"command": "node",
"args": ["/absolute/path/to/mcp-notification-server/dist/index.js"]
}
}
}Then try in Claude:
"Subscribe to counter://main"
"Increment the counter by 5"
"What's the current counter value?"
Option 3: MCP Inspector
npx @modelcontextprotocol/inspector dist/index.jsOpen http://localhost:5173 for interactive testing.
Option 4: Custom Integration
Use the code as a template for your own MCP server!
π Documentation Highlights
Architecture Overview
Client ββsubscribeββ> Server
Client <ββnotifyβββββββThe server:
Accepts subscriptions from clients
Monitors resources for changes
Automatically notifies subscribers
Manages subscription lifecycle
See ARCHITECTURE.md for complete details.
Notification Patterns
From patterns.md:
Event-Driven - User actions trigger notifications
Periodic - Regular updates (timers)
File System - Monitor file changes
Threshold - Alert on important values
Batched - Group notifications
Filtered - Conditional updates
Cascading - Related resource updates
Test Scenarios
From test-scenarios.md:
Basic subscribe and notify
Multiple subscribers
Unsubscribe behavior
Multiple resources
Error handling
Performance under load
Connection loss recovery
And more...
π― Real-World Use Cases
This demonstration shows patterns for:
π Real-time Dashboards - Live data updates
π System Monitoring - Health checks and alerts
π File Synchronization - Hot-reload configurations
π Log Streaming - Real-time log viewing
π¨ Alert Systems - Threshold-based notifications
π₯ Collaboration Tools - Multi-user updates
π Analytics - Live metrics tracking
π¦ What's Included
mcp-notification-server/
βββ π QUICKSTART.md # 5-minute setup guide
βββ π DEMO.md # Interactive walkthrough
βββ π ARCHITECTURE.md # System design docs
βββ src/
β βββ index.ts # Basic server (start here!)
βββ examples/
β βββ advanced-server.ts # Production patterns
β βββ client.ts # Interactive demo
β βββ patterns.md # 7 notification patterns
β βββ test-scenarios.md # Testing guide
β βββ run-demo.sh # Easy demo runner
βββ package.json
βββ tsconfig.jsonπ§ Development
# Install dependencies
npm install
# Build everything
npm run build
# Run basic server
npm start
# Run advanced server
node dist/examples/advanced-server.js
# Run interactive client demo
node dist/examples/client.jsπ Code Examples
Minimal Server
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
const server = new Server(
{ name: "my-server", version: "1.0.0" },
{ capabilities: { resources: { subscribe: true } } }
);
// Handle subscriptions
server.setRequestHandler(SubscribeRequestSchema, async (request) => {
subscriptions.set(clientId, request.params.uri);
return {};
});
// Send notifications
await server.notification({
method: "notifications/resources/updated",
params: { uri: "resource://example" }
});Minimal Client
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
// Handle notifications
client.setNotificationHandler({
method: "notifications/resources/updated",
handler: async (notification) => {
console.log(`Updated: ${notification.params.uri}`);
}
});
// Subscribe
await client.request({
method: "resources/subscribe",
params: { uri: "resource://example" }
});π§ͺ Testing
Run the comprehensive test scenarios:
# See all test scenarios
cat examples/test-scenarios.md
# Run with MCP Inspector
npx @modelcontextprotocol/inspector dist/index.jsπ Key Features
Feature | Basic Server | Advanced Server |
Subscribe/Unsubscribe | β | β |
Tool-triggered notifications | β | β |
File system watching | β | β |
Periodic updates | β | β |
Webhook integration | β | β |
Multiple subscribers | β | β |
Error handling | β | β |
Performance optimized | Basic | β |
π€ Contributing
Contributions welcome! Please:
Read ARCHITECTURE.md
Check test-scenarios.md
Add tests for new features
Update documentation
π Learn More
π MCP Specification
π§ MCP TypeScript SDK
π MCP Documentation
π¬ MCP Community
π― Next Steps
Start Here β QUICKSTART.md
Try Demo β
node dist/examples/client.jsRead Patterns β patterns.md
Understand Design β ARCHITECTURE.md
Build Your Own β Use this as a template!
π License
MIT License - See LICENSE file for details
π Why This Repository?
This is the most comprehensive MCP notification demonstration available because it includes:
β Three levels of implementation (basic, advanced, client)
β Seven real-world notification patterns
β Complete architecture documentation
β Ten comprehensive test scenarios
β Interactive demos you can run immediately
β Production-ready code you can use as a template
β Step-by-step guides for every skill level
Ready to master MCP notifications? Start with QUICKSTART.md! π
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Notification workflows, subscribers, topics and delivery activity; trigger a workflow with consent.
Delegate standing watches over companies and topics. Get signed webhook alerts. OAuth/API.
Send, search, and manage notifications, accounts, and push preferences
Testing-phase Products Watch endpoint; public discovery remains while new onboarding is paused.
Related MCP Servers
AlicenseNot gradedqualityBmaintenanceEnables AI clients to create and configure monitors, subscribe to their evidence streams with durable cursors, and process observations with guaranteed at-least-once delivery.21 npmApache 2.0- AlicenseNot gradedqualityCmaintenanceEnables clients to create tasks and subscribe to a task.created event stream, delivering signed, filterable webhook callbacks with verified challenges and managed subscription lifecycles. It exposes event discovery, listing, subscribing, and unsubscribing alongside the task tool over a single MCP endpoint.3MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to manage signed event subscriptions, submit Grok requests and receive results and replies, and track deduplicated asynchronous delivery through an authenticated owner console backed by persistent storage. External message text is treated strictly as data, with bounded retries and receipt-based roundtrip termination.MIT
- AlicenseAqualityBmaintenanceEnables agents and operators to create liveness watches, check in, inspect watch status and credits, and retrieve alert or recovery receipts through MCP tools.5MIT