Emeritus MCP Server
MCP server for integrating AI models with Emeritus services, enabling user management, tag operations, order management, and leads import via a standardized interface.
README
Emeritus MCP Server
This project is a Model Context Protocol (MCP) server implementation for the Emeritus API. It provides a standardized interface for AI models to interact with Emeritus services, including user management, tag operations, order management, and leads import.
About Model Context Protocol (MCP)
The Model Context Protocol (MCP) is an open standard introduced by Anthropic that enables seamless integration between LLM applications and external data sources and tools. Think of MCP as a "USB-C for AI applications" - it provides a standardized way to connect AI models with external systems.
MCP uses a client-server architecture where:
- MCP Servers expose capabilities (tools, resources, prompts) in a standardized way
- MCP Clients (within AI applications) connect to these servers
- JSON-RPC 2.0 is used for communication between clients and servers
Features
This MCP server provides:
- Tools: Functions that AI models can execute to interact with Emeritus services
- User management (create, fetch, update users)
- Tag operations (create groups, assign tags)
- Order management (fetch orders and financial records)
- Leads import functionality
- Resources: Access to Emeritus data sources
- Secure Authentication: Token-based authentication with the Emeritus API
- Error Handling: Comprehensive error reporting and validation
Requirements
- Python 3.10 or higher
- Access to Emeritus API credentials
- An MCP-compatible client (like Claude Desktop, or any application using MCP SDKs)
Installation
- Clone the repository:
git clone <repository-url>
cd emeritus-mcp
- Create a virtual environment and install dependencies:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -e .
- Create a
.envfile based on the provided.env.example:
cp .env.example .env
- Edit the
.envfile with your Emeritus API credentials.
Configuration
Set the following environment variables in the .env file:
EMERITUS_API_HOST: The Emeritus API host URLEMERITUS_USER_ID: Your Emeritus User IDEMERITUS_API_SECRET: Your Emeritus API SecretDEBUG: Set toTruefor development,Falsefor production
Usage
Running the MCP Server
Start the server using the MCP standard way:
python -m emeritus_mcp
Or run directly:
python src/emeritus_mcp/server.py
Connecting to the Server
This MCP server can be used with any MCP-compatible client. For example:
Claude Desktop
Add the server to your Claude Desktop configuration:
{
"mcpServers": {
"emeritus": {
"command": "python",
"args": ["-m", "emeritus_mcp"],
"env": {
"EMERITUS_API_HOST": "your-api-host",
"EMERITUS_USER_ID": "your-user-id",
"EMERITUS_API_SECRET": "your-secret"
}
}
}
}
Other MCP Clients
Use the standard MCP connection protocols (stdio, SSE) supported by your client.
Available Tools
The server exposes the following tools that AI models can use:
User Management
create_user: Create a user by mobile number or emailfetch_user_profile: Get a user's profile informationupdate_user_owner: Update a user's ownerupdate_user_pool: Update a user's poolupdate_user_email: Update a user's emailfetch_user_contact: Fetch a user's contact information
Tag Management
create_tag_group: Create a tag grouplist_tag_groups: Get a list of tag groupsupdate_tag_group: Update a tag groupdeactivate_tag_group: Deactivate a tag groupactivate_tag_group: Activate a tag groupassign_user_tag: Assign a tag to a userlist_user_tags: List tags assigned to a user
Order Management
fetch_order: Get details for a specific orderlist_orders: Get a list of orderslist_order_financials: Get a list of order financial records
Leads Management
import_leads: Import leads from raw data
Project Structure
emeritus-mcp/
├── pyproject.toml # Project dependencies and configuration
├── README.md # Project documentation
├── .env.example # Example environment variables
├── src/
│ └── emeritus_mcp/ # Main package
│ ├── __init__.py # Package initialization
│ ├── __main__.py # CLI entry point
│ ├── server.py # MCP server implementation
│ ├── tools/ # MCP tools implementation
│ │ ├── __init__.py
│ │ ├── user.py # User management tools
│ │ ├── tag.py # Tag management tools
│ │ ├── order.py # Order management tools
│ │ └── leads.py # Leads management tools
│ ├── services/ # Emeritus API integration
│ │ ├── __init__.py
│ │ └── emeritus_client.py
│ └── config/ # Configuration management
│ ├── __init__.py
│ └── settings.py
Development
Testing
Run tests with pytest:
pytest
Code Formatting
Format code with Black and isort:
black src tests
isort src tests
Type Checking
Run type checking with mypy:
mypy src
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Ensure all tests pass
- Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
More About MCP
To learn more about the Model Context Protocol:
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。