QA
Intermediate LevelAI, LLMs, Embeddings & MCP

How do MCP Servers send real-time progress logs to host clients via notifications/message?

❓ Interview Prompt: Explain MCP notifications/message JSON-RPC events, log severity levels, and UI progress streaming.

During long-running tool executions (e.g. database migrations or heavy document processing), an MCP Server can stream real-time progress notifications back to the host client without completing the tool call.

Protocol Details:

•
Uses the `notifications/message` JSON-RPC notification method.
•
Supported severity levels: debug, info, warning, error.
•
Host clients display these logs in live UI status bars or progress logs.

Code Implementation Example

typescript
// Sending log notification from MCP Server tool handler
server.sendLoggingMessage({
  level: 'info',
  logger: 'db-migrator',
  data: 'Migrated 500 of 2000 records (25% complete)...'
});
💡Streaming real-time progress notifications from MCP Server.
🎯 Interview Key Takeaway

MCP servers stream live execution updates to clients using notifications/message JSON-RPC notifications.

#MCP#Logging#Notifications#JSON-RPC#Intermediate
Back to all AI, LLMs, Embeddings & MCP Questions→

More AI, LLMs, Embeddings & MCP Interview Questions

Beginner LevelAI, LLMs, Embeddings & MCP

What are Vector Embeddings and Cosine Similarity in AI Semantic Search?

Beginner LevelAI, LLMs, Embeddings & MCP

What is the Model Context Protocol (MCP) and how does it connect LLMs to external tools?

Beginner LevelAI, LLMs, Embeddings & MCP

What is Retrieval-Augmented Generation (RAG) and how does it prevent LLM hallucinations?