close.com-mcpserver

gregcmartin/close.com-mcpserver

3.1

If you are the rightful owner of close.com-mcpserver and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

An AI-powered Model Context Protocol (MCP) server that enables Claude to interact with your Close.com CRM through natural language.

Close.com MCP Server

An AI-powered Model Context Protocol (MCP) server that enables Claude to interact with your Close.com CRM through natural language.

Overview

This MCP server provides Claude with full access to your Close.com CRM, allowing you to manage leads, opportunities, contacts, tasks, and activities using conversational AI. Built with Python and the Anthropic Claude API.

Features

  • 🤖 Natural Language Interface - Interact with Close.com using plain English
  • 🔧 23 Powerful Tools - Complete CRUD operations for all major Close.com resources
  • 🔄 Automatic Pagination - Seamlessly handle large datasets
  • Smart Retry Logic - Automatic retry for transient errors
  • 🎯 Type-Safe - Full type hints throughout the codebase
  • 🛡️ Error Handling - Rich exception handling with detailed error messages

Supported Operations

Leads

  • List, get, create, update, delete leads
  • Filter and search capabilities

Opportunities

  • Full CRUD operations
  • Track sales pipeline stages

Contacts

  • Manage contact information
  • Link contacts to leads

Tasks

  • Create and manage tasks
  • Mark tasks as complete or reopen them

Activities

  • Log calls, notes, and emails
  • Track customer interactions

Installation

# Clone the repository
git clone https://github.com/gregcmartin/close.com-mcpserver.git
cd close.com-mcpserver

# Install dependencies
pip install -e .

Quick Start

1. Set up your API keys

export CLOSE_API_KEY="your-close-api-key"
export ANTHROPIC_API_KEY="your-anthropic-api-key"

2. Launch the MCP CLI

close-mcp-cli

3. Start chatting!

You> List all leads from Acme Corp
Claude> I found 3 leads from Acme Corp...

You> Create a new opportunity for the first lead worth $50,000
Claude> I've created a new opportunity...

You> Delete all opportunities with $0 value
Claude> I found 15 opportunities with $0 value. Are you sure you want to delete them?

Configuration

Command Line Options

close-mcp-cli --help

Options:
  --close-api-key TEXT        Close API key (or set CLOSE_API_KEY env var)
  --anthropic-api-key TEXT    Anthropic API key (or set ANTHROPIC_API_KEY env var)
  --model TEXT                Claude model to use (default: claude-sonnet-4-20250514)
  --timeout FLOAT             Close API request timeout in seconds
  --verbose                   Enable debug logging

Environment Variables

Create a .env file:

CLOSE_API_KEY=your_close_api_key
ANTHROPIC_API_KEY=your_anthropic_api_key
CLAUDE_MODEL=claude-sonnet-4-20250514

Python API

You can also use the Close.com client directly in your Python code:

from close_client import CloseClient

client = CloseClient("YOUR_API_KEY")

# List leads
leads = client.leads.list()

# Create a lead
lead = client.leads.create({
    "name": "Acme Corp",
    "contacts": [{
        "name": "John Doe",
        "emails": [{"email": "john@acme.com"}]
    }]
})

# Create an opportunity
opportunity = client.opportunities.create({
    "lead_id": lead["id"],
    "value": 50000,
    "confidence": 75
})

Requirements

Dependencies

  • requests - HTTP client
  • tenacity - Retry logic
  • anthropic - Claude AI integration

Development

Running Tests

python -m unittest discover tests

Project Structure

close-mcp-server/
├── close_client/
│   ├── __init__.py
│   ├── client.py           # Core API client
│   ├── exceptions.py       # Custom exceptions
│   ├── mcp_server.py       # MCP server implementation
│   └── resources/          # Resource-specific modules
│       ├── leads.py
│       ├── opportunities.py
│       ├── contacts.py
│       ├── tasks.py
│       └── activities.py
├── tests/                  # Unit tests
├── README.md
└── pyproject.toml

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details

Support

Acknowledgments

Built with the Model Context Protocol and powered by Anthropic Claude.