MCP Conversation Server
A Model Context Protocol (MCP) server implementation for managing conversations with OpenRouter's language models. This server provides a standardized interface for applications to interact with various language models through a unified conversation management system.
Features
- MCP Protocol Support
- Full MCP protocol compliance
- Resource management and discovery
- Tool-based interaction model
- Streaming response support
- Error handling and recovery
- OpenRouter Integration
- Support for all OpenRouter models
- Real-time streaming responses
- Automatic token counting
- Model context window management
- Available models include:
- Claude 3 Opus
- Claude 3 Sonnet
- Llama 2 70B
- And many more from OpenRouter's catalog
- Conversation Management
- Create and manage multiple conversations
- Support for system messages
- Message history tracking
- Token usage monitoring
- Conversation filtering and search
- Streaming Support
- Real-time message streaming
- Chunked response handling
- Token counting
- File System Persistence
- Conversation state persistence
- Configurable storage location
- Automatic state management
Installation
Configuration
Configuration
All configuration for the MCP Conversation Server is now provided via YAML. Please update the config/models.yaml
file with your settings. For example:
Server Configuration
The MCP Conversation Server now loads all its configuration from the YAML file. In your application, you can load the configuration as follows:
Note: Environment variables are no longer required as all configuration is provided via the YAML file.
Usage
Basic Server Setup
Available Tools
The server exposes several MCP tools:
- create-conversation
- send-message
- list-conversations
Resources
The server provides access to several resources:
- conversation://{id}
- Access specific conversation details
- View message history
- Check conversation metadata
- conversation://list
- List all active conversations
- Filter conversations by criteria
- Sort by recent activity
Development
Building
Running Tests
Debugging
The server provides several debugging features:
- Error Logging
- All errors are logged with stack traces
- Token usage tracking
- Rate limit monitoring
- MCP InspectorUse the MCP Inspector to:
- Test tool execution
- View resource contents
- Monitor message flow
- Validate protocol compliance
- Provider ValidationValidates:
- API key validity
- Model availability
- Rate limit status
Troubleshooting
Common issues and solutions:
- OpenRouter Connection Issues
- Verify your API key is valid
- Check rate limits on OpenRouter's dashboard
- Ensure the model ID is correct
- Monitor credit usage
- Message Streaming Errors
- Verify model streaming support
- Check connection stability
- Monitor token limits
- Handle timeout settings
- File System Errors
- Check directory permissions
- Verify path configuration
- Monitor disk space
- Handle concurrent access
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
ISC License
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
A Model Context Protocol server implementation that provides a standardized interface for applications to interact with OpenRouter's language models through a unified conversation management system.
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol Server that enables LLMs to interact with and execute REST API calls through natural language prompts, supporting GET/PUT/POST/PATCH operations on configured APIs.Last updated -6PythonApache 2.0
- -securityAlicense-qualityA Model Context Protocol server that enables large language models to interact with Linear's issue tracking system, allowing management of issues, projects, teams, and other Linear resources.Last updated -554TypeScriptMIT License
MCP TapData Serverofficial
-securityFlicense-qualityA Model Context Protocol server that enables Large Language Models to access and interact with database connections, including viewing schemas and performing CRUD operations on connected databases.Last updated -- -securityAlicense-qualityA Model Context Protocol server that enables developers to integrate advanced text-to-speech and video translation capabilities into their applications through simple API calls.Last updated -PythonMIT License