espocrm-power-mcp
Version:
A powerful MCP server for EspoCRM
65 lines (52 loc) • 2.12 kB
Markdown
# EspoCRM Power MCP Server
This MCP server provides a powerful set of tools for interacting with EspoCRM, including CRUD operations, analytics, and agent knowledge management.
## Installation
To use this server, you can run it directly with `npx`:
```bash
npx -labs/espocrm-power-mcp
```
Alternatively, you can clone the repository and run it locally:
```bash
git clone https://github.com/CG-Labs/EspoCRM-Power-MCP.git
cd EspoCRM-Power-MCP
npm install
npm start
```
## Configuration
This server is configured through environment variables. You can set them in your shell, create a `.env` file in the project root, or configure them in your MCP client's settings file.
### MCP Settings Example (e.g., `mcp_settings.json`)
```json
{
"mcpServers": {
"espocrm": {
"command": "npx",
"args": [
"espocrm-power-mcp"
],
"env": {
"ESPOCRM_API_URL": "https://your-espocrm-instance/api/v1",
"ESPOCRM_API_KEY": "your-api-key",
"MYSQL_HOST": "your-mysql-host",
"MYSQL_USER": "your-mysql-user",
"MYSQL_PASSWORD": "your-mysql-password",
"MYSQL_DATABASE": "your-espocrm-database",
"AGENT_USER_ID": "your-agent-user-id"
}
}
}
}
```
- `ESPOCRM_API_URL`: The URL of your EspoCRM API (e.g., `https://your-espocrm-instance/api/v1`).
- `ESPOCRM_API_KEY`: Your EspoCRM API key.
- `MYSQL_HOST`: The hostname of your MySQL database.
- `MYSQL_USER`: The username for your MySQL database.
- `MYSQL_PASSWORD`: The password for your MySQL database.
- `MYSQL_DATABASE`: The name of your EspoCRM database.
- `AGENT_USER_ID`: The ID of the user to assign gists to.
## Available Tools
- `discover_entities`: Discovers available EspoCRM entities.
- `query`: Executes CRUD operations on entities with intelligent routing.
- `analytics`: Runs analytics queries.
- `get_gist`: Retrieves an agent gist by name.
- `create_gist`: Creates a new agent gist. The `Gist` entity is a custom entity where we can save heuristics for the agents to use while conducting complex SQL and API queries.
- `update_gist`: Updates an existing agent gist.