optiphoenix-mcp
v1.0.2
Published
A modular Model Context Protocol (MCP) server for OptiPehoenix A/B testing
Downloads
29
Maintainers
Readme
OptiPhoenix MCP Server
A modular Model Context Protocol (MCP) server that provides tools for Convert.com A/B testing platform and weather data.
Installation
Global Installation (Recommended)
npm install -g optiphoenix-mcpLocal Development Installation
git clone <repository-url>
cd mcps
npm installUsage
After Global Installation
Once installed globally, the package can be used in your MCP configuration:
{
"mcpServers": {
"optiphoenix-mcp": {
"type": "stdio",
"command": "optiphoenix-mcp",
"env": {
"CONVERT_APPLICATION_ID": "your-app-id",
"CONVERT_SECRET_KEY": "your-secret-key",
"CONVERT_BASE_URL": "https://api.convert.com",
"CONVERT_TOKEN_EXPIRY_MINUTES": "5"
}
}
}
}Local Development
For local development and testing:
# Run the MCP inspector for testing
npx @modelcontextprotocol/inspector node index.js
# Or run directly
npm startConfiguration
Set the following environment variables or include them in your MCP configuration:
CONVERT_APPLICATION_ID: Your Convert.com application IDCONVERT_SECRET_KEY: Your Convert.com secret keyCONVERT_BASE_URL: Convert API base URL (default: https://api.convert.com)CONVERT_TOKEN_EXPIRY_MINUTES: Token expiry time in minutes (default: 5)
Project Structure
mcps/
├── src/
│ ├── config/
│ │ └── index.js # Configuration management
│ ├── utils/
│ │ ├── auth.js # Authentication utilities
│ │ └── fileUtils.js # File system utilities
│ ├── tools/
│ │ ├── convertTools.js # Convert API tools
│ │ └── weatherTools.js # Weather API tools
│ └── server.js # Main server setup
├── index.js # Entry point
└── package.jsonArchitecture Benefits
Separation of Concerns
- Config: Centralized configuration management
- Utils: Reusable utility functions
- Tools: Modular tool implementations
- Server: Clean server setup and registration
Scalability
- Easy to add new tools by creating new modules
- Configuration changes in one place
- Reusable authentication and file utilities
- Clear separation between API providers
Maintainability
- Each module has a single responsibility
- Easy to test individual components
- Clear dependency structure
- Modular imports/exports
Adding New Tools
- Create a new tool module in
src/tools/ - Define tool schema and handler
- Export tool object
- Import and register in
src/server.js
Example:
// src/tools/newTool.js
const newTool = {
name: 'new-tool',
description: 'Description of the tool',
inputSchema: { /* zod schema */ },
handler: async (params) => { /* implementation */ }
};
module.exports = { newTool };