What is MCP Conversation Server?
MCP Conversation Server is an MCP (Model Context Protocol) server implementation for managing conversations with OpenRouter's language models. It provides a standardized interface for applications to interact with various language models through a unified conversation management system.
How to use MCP Conversation Server?
Install the package via npm (npm install mcp-conversation-server), then configure it using a YAML file (config/models.yaml) that specifies your OpenRouter API key, persistence path, model definitions, and default model. In your application, import ConversationServer from the package, instantiate it with the loaded config, and call run(). The server exposes MCP tools (create-conversation, send-message, list-conversations) and resources (conversation://{id}, conversation://list).
Key features of MCP Conversation Server
- Full MCP protocol compliance with resource management and tool-based interaction
- Integration with all OpenRouter models including Claude 3 Opus, Sonnet, and Llama 2 70B
- Real-time streaming responses with chunked handling and token counting
- Create and manage multiple conversations with message history tracking
- Token usage monitoring and model context window management
- File system persistence with configurable storage location and automatic state management
- Conversation filtering and search capabilities
Use cases of MCP Conversation Server
- Building a chatbot that can switch between different LLM providers via OpenRouter
- Creating a conversation-based tool or agent that persists discussions across sessions
- Developing an application that needs to track token usage and context windows per conversation
- Enabling streaming interactions with language models for real-time response display
Comments