Skip to main content
Glama

MCP Chat

by hbd
MIT License
3

MCP Chat

Using MCP (Model Context Protocol) servers for chat.

I was initially inspired to make this based upon an idea for a chat roulette style interaction using an MCP client like the Claude Mac app or the Claude Code. For simplicity's sake, this proof of concept just uses a simple in-memory room-based system that supports two users in a single room sending messages between each other.

MCP Chat Demo

What?

MCP is designed for AI assistants to call tools. This project abuses that design to let humans chat with each other through tool calls. A long polling tool is used to wait for messages from the recipient. This is not ideal. Ideally, we'd be using custom notifications, but the MCP clients that I'm working with and most MCP clients today do not support custom messages/notifications.

How it works

Run the MCP server in using the SHTTP transport:

# Terminal 1 uv sync uv run fastmcp run mcp_chat/server.py --transport http

Connect to the MCP server using Claude Code, for example:

Note: See the demo gif for an example of using this with Claude Code

# Terminals 2 & 3 claude mcp add --transport http mcp-chat -s project -- http://localhost:8000/mcp claude # Do this in 2 separate sessions

The magic: wait_for_message blocks until a message arrives. Real-time chat through long-polling.

Tools

  • join_room - Create/join a room
  • send_message - Send a message
  • wait_for_message - Wait for messages (blocks!)
  • leave_chat - Leave the room

Requirements

  • Python 3.11+
  • uv package manager

Future ideas

  • Random pairing (chat roulette style)
  • Custom notifications for async messaging
  • Multi-user rooms
  • Message history

Why?

Sunday project. Wanted to see if MCP could be bent into a chat protocol. Turns out it can.

License

MIT

-
security - not tested
A
license - permissive license
-
quality - not tested

A server that enables users to chat with each other by repurposing the Model Context Protocol (MCP), designed for AI tool calls, into a human-to-human communication system.

  1. What?
    1. How it works
      1. Tools
        1. Requirements
          1. Future ideas
            1. Why?
              1. License

                Related MCP Servers

                • -
                  security
                  -
                  license
                  -
                  quality
                  A Model Context Protocol server that bridges Microsoft Teams and MCP-compatible clients, enabling chat integration, message handling, and advanced search capabilities without REST API endpoints.
                  Last updated -
                  Python
                • -
                  security
                  A
                  license
                  -
                  quality
                  A high-performance Model Context Protocol (MCP) server designed for large language models, enabling real-time communication between AI models and applications with support for session management and intelligent tool registration.
                  Last updated -
                  2
                  Python
                  MIT License
                • A
                  security
                  F
                  license
                  A
                  quality
                  An all-in-one Model Context Protocol (MCP) server that connects your coding AI to numerous databases, data warehouses, data pipelines, and cloud services, streamlining development workflow through seamless integrations.
                  Last updated -
                  2
                  Python
                  • Apple
                  • Linux
                • -
                  security
                  -
                  license
                  -
                  quality
                  A basic Model Context Protocol server implementation that demonstrates core functionality including tools and resources for AI chat applications.
                  Last updated -
                  Python

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/hbd/mcp-chat'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server