Skip to main content
Glama
fuchrai

Fuchr CRM MCP Server

Official
by fuchrai
README.md
# Fuchr CRM MCP Server

A Model Context Protocol (MCP) server that exposes CRM functionality (customers, deals) as tools for AI agents.

## What it does

This server provides three tools:
- `getCustomerByEmail` - Look up customer by email
- `listOpenDeals` - List all open (non-closed) deals
- `updateDealStage` - Update deal stage with business rule validation

## Business rules

- **Deal stage progression**: Cannot move a deal to "Closed Won" unless it's currently in "Negotiation" stage
- **Valid stages**: Prospecting → Qualification → Proposal → Negotiation → Closed Won/Lost
- **Data persistence**: SQLite database (`crm.db`)

## Setup

1. Install dependencies:
   ```bash
   pip install -r requirements.txt
   ```

2. Initialize database:
   ```bash
   python database.py
   ```

3. Run server:
   ```bash
   python server.py
   ```

## Connect to Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "fuchr-crm": {
      "command": "python",
      "args": ["/path/to/server.py"],
      "cwd": "/path/to/fuchr-mcp-crm-py"
    }
  }
}
```

## Example agent workflow

1. User: "Show me all open deals"
2. Agent calls: `listOpenDeals()`
3. Agent returns: List of deals with customer info

1. User: "Update deal #3 to Negotiation"
2. Agent calls: `updateDealStage(deal_id=3, new_stage="Negotiation")`
3. Agent returns: Updated deal details

1. User: "Find customer with email john@acme.com"
2. Agent calls: `getCustomerByEmail(email="john@acme.com")`
3. Agent returns: Customer details

## What this would look like in a real company

In production, this MCP server would:
- Connect to your actual CRM (Salesforce, HubSpot, Pipedrive) via API
- Use OAuth2 for authentication
- Log all tool calls to your SIEM (Splunk, Datadog)
- Rate limit requests per agent/user
- Validate agent permissions (e.g., only sales agents can update deals)
- Encrypt data in transit (HTTPS) and at rest (database encryption)

## Security considerations

- No hardcoded secrets (use environment variables)
- Input validation on all tool parameters
- Business rule enforcement (deal stage progression)
- Error handling with clear messages (no stack traces exposed)

## License

MIT