@rockship/cosmoagents-mcp
v1.0.14
Published
A powerful Model Context Protocol (MCP) server implementation for seamless Cosmoagents API integration, enabling AI assistants to interact with Cosmoagents data
Downloads
22
Readme
Cosmoagents MCP Server
A powerful Model Context Protocol (MCP) server implementation for seamless Cosmoagents API integration, enabling AI assistants to create and manage email campaigns.
Overview
This MCP server provides a comprehensive set of tools for interacting with the Cosmoagents API, allowing AI assistants to:
- Create and manage email campaigns directly from your AI assistant interface
Why Use This MCP Server?
- Seamless AI Integration: Connect your AI assistants directly to Cosmoagents data
- Simplified API Operations: Perform common Cosmoagents tasks through natural language commands
- Real-time Data Access: Get up-to-date information from Cosmoagents
- Secure Authentication: Uses Cosmoagents's secure API token authentication
- Extensible Design: Easily add more Cosmoagents API capabilities as needed
Installation
# Clone the repository
git clone https://gitlab.rockitflow.com/rockship/mcp-servers/cosmoagents-mcp.git
cd cosmoagents-mcp
# Install dependencies
npm install
# Build the project
npm run buildConfiguration
The server requires an Cosmoagents API access token. You can obtain one by:
- Going to your Cosmoagents Account
- Generating an API key
You can provide the token in two ways:
As an environment variable:
COSMOAGENTS_API_KEY=your-api-keyAs a command-line argument:
npm start -- --api-key=your-api-key
For development, create a .env file in the project root to store your environment variables:
COSMOAGENTS_API_KEY=your-api-keyUsage
Starting the Server
# Start the server
npm start
# Or with a specific API key
npm start -- --api-key=your-api-keyIntegrating with AI Assistants
This MCP server is designed to work with AI assistants that support the Model Context Protocol. Once running, the server exposes a set of tools that can be used by compatible AI assistants to interact with Cosmoagents data.
Available Tools
The server exposes the following powerful Cosmoagents integration tools:
- create_campaign
- Use the create_campaign tool to create a new email campaign for a contact list
- Parameters:
contacts(array of objects, required): Array of contacts to include in the campaign. Each contact object should havefirst_name(string),last_name(string),email(string, required), andjob_title(string).playbook(enum, optional): Campaign playbook type. Defaults torevive_dormant_leads. Possible values:revive_dormant_leads,upsell_to_existing_customers,event_invite,content_offering,webinar_follow_up,click_start_from_scratch.name(string, optional): Optional custom name for the campaign.
- Example:
{ "contacts": [ { "first_name": "John", "last_name": "Doe", "email": "[email protected]", "job_title": "Software Engineer" } ], "playbook": "event_invite", "name": "My Event Campaign" }
Extending the Server
The server is designed to be easily extensible. To add new Cosmoagents API capabilities:
- Add new methods to
CosmoagentsClient: If you want to add a new Cosmoagents API capability, you will add a new method to theCosmoagentsClientclass insrc/common/network/cosmoagents-client.ts. - Create a new tool file: Create a new TypeScript file in
src/common/tools/(e.g.,new-tool.tool.ts) to define your new tool. This file will implement theToolDefinitioninterface and utilize theCosmoagentsClientmethod you added. - Register the tool in
ToolFactory: Add your new tool to theregisterAllToolsmethod insrc/common/factories/tool.factory.ts. - Rebuild the project: Run
npm run buildto compile your changes.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Keywords
Cosmoagents mcp, Model Context Protocol, MCP, Campaign, AI Tools
