1. Conduid
  2. Communication
  3. Chat
MCP server · Communication

Chat

把 IDE 里的 AI(Copilot/Cursor/Windsurf)变成 ChatGPT + OpenAI API。一次对话,无限调用

Unclaimed last commit a year ago ai
39Low

Scored 20 days ago · breakdown

About Chat

Chat is an MCP server published by illegalagents in the Communication category: 把 IDE 里的 AI(Copilot/Cursor/Windsurf)变成 ChatGPT + OpenAI API。一次对话,无限调用. It has been installed 0 times through Conduid.

The repository has 2 stars and 0 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.

Install

Install
npx mcp-chat

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about Chat

Powered by Claude · Grounded in docs

I know everything about Chat. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

MCP-Chat SDK

MCP-Chat is a lightweight SDK that implements chat functionality on top of the Model Context Protocol (MCP). It allows you to create bidirectional chat communication between MCP server and client applications with minimal configuration.

Overview

MCP-Chat extends the Model Context Protocol by:

  1. Providing a standardized interface for chat message exchange
  2. Implementing resource-based chat thread management
  3. Supporting real-time notifications for new messages
  4. Enabling cross-protocol chat functionality with URI pattern chat+protocol:///path/to/thread

Getting Started

npm install mcp-chat

Usage

MCP-Chat is designed to be simple to implement. You only need to provide a few accessors and attach it to your MCP Server instance:

import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { MCPMessageBus, ChatNotificationMessage } from "mcp-chat";

// Create your MCP Server
const server = new Server(
  {
    name: "my-chat-server",
    version: "1.0.0",
  },
  {
    capabilities: {
      tools: {},
      resources: {},
    },
    instructions: "This is a chat server that supports MCP-Chat protocol",
  }
);

// Create your message bus instance
const messageBus = new MCPMessageBus({
  // Define your resource template for chat threads
  resourceTemplate: {
    uriTemplate: `chat+mycustom:///([^\\/]+)/([^\\/]+)`,
    name: "My Custom Chat",
    description: "Chat resources for my custom protocol",
  },
  
  // Provide an accessor to get all chat resources
  getResources: async () => {
    // Return an array of Resources matching the chat+mycustom:/// pattern
    return [
      {
        uri: "chat+mycustom:///thread1/general",
        name: "General Chat",
        description: "General chat thread",
      },
      // Add more resources as needed
    ];
  },
  
  // Provide an accessor to read messages from a given URI
  readMessages: async (uri: string) => {
    // Parse the URI and return messages for that thread
    // Return array of ChatNotificationMessage objects
    return [
      {
        id: "msg1",
        uri: uri,
        author: {
          name: "User1",
          id: "user1",
        },
        content: "Hello world!",
        timestamp: new Date().toISOString(),
      },
      // Add more messages as needed
    ];
  },
  
  // Provide an accessor to write messages to a given URI
  writeMessage: async (uri: string, message: string) => {
    // Implement your message writing logic
    // Return a confirmation string or undefined
    return "Message sent successfully";
  },
});

// Attach the message bus to your MCP server
messageBus.attach(server);

// When a new message arrives, notify subscribed clients
async function onNewMessage(uri: string) {
  await messageBus.updateResource(uri);
}

Message Format

MCP-Chat uses a standardized message format:

export type ChatNotificationMessage = {
  id: string;         // Unique message ID
  uri: string;        // Resource URI where the message belongs
  author: {
    name: string;     // Display name of the author
    id: string;       // Unique ID of the author
  };
  content: string;    // Message content
  timestamp: string;  // ISO timestamp of when the message was sent
};

Resource URIs

Chat resources use a specialized URI format:

chat+protocol:///thread/path/goes/here

Where:

  • chat+protocol identifies the chat protocol (e.g., chat+discord, chat+slack, etc.)
  • IMPORTANT: All MCP-Chat URIs MUST begin with the chat+ prefix to be recognized by the SDK
  • The path component after /// identifies the thread or channel

MCP Client Interactions

Any MCP client that supports the MCP-Chat protocol can:

  1. Discover chat resources via the standard MCP resources mechanism
  2. Read chat messages by accessing the resource URI
  3. Send messages using the protocol-specific tool exposed automatically
  4. Subscribe to real-time updates for chat resources

Subscription and Notifications

To receive real-time updates, clients can:

  1. Subscribe to a resource URI using the standard MCP subscribe request:
{
  "method": "subscribe",
  "params": {
    "uri": "chat+protocol:///thread/path"
  }
}
  1. When new messages arrive, call the updateResource method:
// Notify clients when a new message is received
await messageBus.updateResource("chat+protocol:///thread/path");

This will send a resource update notification to all subscribed clients, so they can fetch the updated messages.

Real-world Example

The discord-mcp-server package is an example of MCP-Chat in action. It:

  1. Creates a Discord bot that listens for messages
  2. Exposes Discord channels as chat resources with URIs like chat+discord:///serverId/channelId
  3. Allows reading message history from these resources
  4. Provides a chat+discord tool to send messages back to the channel
  5. Notifies clients when new messages arrive on subscribed channels

License

ISC

README mirrored from the source repository 20 days ago. The original is authoritative.

Questions

About Chat

How do I install Chat?

Run npx mcp-chat, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is Chat safe to use with an AI agent?

Its trust score is 39 out of 100 (low). It passes 0 of 1 static security checks; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Chat still maintained?

The last commit was a year ago, with 0 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.