MCP Hub
Back to servers

Harvestr

A comprehensive MCP server for Harvestr.io that enables managing customer feedback, product discoveries, and company/user data directly through an LLM. It provides extensive tools for interacting with components, feature requests, and custom attributes within the Harvestr ecosystem.

Stars
1
Tools
25
Updated
Dec 23, 2025

Harvestr MCP Server

A Model Context Protocol (MCP) server for Harvestr.io - a product management platform for managing customer feedback, discoveries, and components.

Built with FastMCP for clean, Pythonic MCP development.

Features

  • Companies: List, create, update, and manage companies and their attributes
  • Components: Browse product components and their hierarchy
  • Discoveries: Access feature requests, bugs, and insights with state tracking
  • Feedback: Manage customer feedback linked to messages and discoveries
  • Messages: Access customer communications
  • Users: List users and manage their attributes
  • Attributes: Access custom field definitions for users and companies

Quick Start

Prerequisites

  • Python 3.10 or higher
  • uv (recommended) or pip
  • A Harvestr.io account with API access

1. Clone and Install

# Clone the repository
git clone https://github.com/your-org/harvestr-mcp.git
cd harvestr-mcp

# Install with uv (recommended)
uv pip install -e .

# Or with pip
pip install -e .

2. Get Your Harvestr API Token

  1. Log in to your Harvestr.io account
  2. Navigate to Settings > Integrations > API Access Token
  3. Click Create new token and copy the generated token

3. Configure the API Token

Set your API token as an environment variable:

# Linux/macOS
export HARVESTR_API_TOKEN="your-api-token-here"

# Windows (PowerShell)
$env:HARVESTR_API_TOKEN="your-api-token-here"

# Windows (CMD)
set HARVESTR_API_TOKEN=your-api-token-here

For persistent configuration, add the export to your shell profile (~/.bashrc, ~/.zshrc, etc.):

echo 'export HARVESTR_API_TOKEN="your-api-token-here"' >> ~/.bashrc
source ~/.bashrc

Security Note: Treat your API token like a password. Never commit it to version control or share it publicly.

4. Run the Server

# Using FastMCP CLI (recommended)
fastmcp run src/harvestr_mcp/server.py:mcp

# Or using Python directly
python -m harvestr_mcp.server

5. Test with MCP Inspector (Optional)

To interactively test the server's tools:

npx @modelcontextprotocol/inspector fastmcp run src/harvestr_mcp/server.py:mcp

This opens a web interface where you can explore and test all available tools.

Installation

Using uv (recommended)

uv pip install -e .

Using pip

pip install -e .

Usage

Running the Server

Stdio Transport (for local use with MCP clients)

# Using the FastMCP CLI
fastmcp run src/harvestr_mcp/server.py:mcp

# Or directly with Python
python -m harvestr_mcp.server

HTTP Transport (for remote access)

fastmcp run src/harvestr_mcp/server.py:mcp --transport http --port 8000

Using with Claude Desktop

Add to your Claude Desktop configuration (~/.config/claude/claude_desktop_config.json on Linux/Mac or %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "harvestr": {
      "command": "uv",
      "args": ["run", "fastmcp", "run", "/path/to/harvestr-mcp/src/harvestr_mcp/server.py:mcp"],
      "env": {
        "HARVESTR_API_TOKEN": "your-api-token-here"
      }
    }
  }
}

Using with FastMCP Client

import asyncio
from fastmcp import Client

async def main():
    async with Client("http://localhost:8000/mcp") as client:
        # List all companies
        companies = await client.call_tool("harvestr_list_companies")
        print(companies)

        # Get a specific discovery
        discovery = await client.call_tool(
            "harvestr_get_discovery",
            {"discovery_id": "abc123", "include_fields": True}
        )
        print(discovery)

asyncio.run(main())

Available Tools

Users

ToolDescription
harvestr_list_usersList all users
harvestr_get_userRetrieve a specific user by ID
harvestr_list_user_attribute_valuesList attribute values for a user
harvestr_update_user_attribute_valuesUpdate attribute values for a user

Companies

ToolDescription
harvestr_list_companiesList all companies (optional: filter by externalUid)
harvestr_create_companyCreate a new company
harvestr_get_companyRetrieve a specific company by ID
harvestr_update_companyUpdate a company
harvestr_list_company_attribute_valuesList attribute values for a company
harvestr_update_company_attribute_valuesUpdate attribute values for a company

Components

ToolDescription
harvestr_list_componentsList all components (optional: filter by parentId)
harvestr_get_componentRetrieve a specific component by ID

Discoveries

ToolDescription
harvestr_list_discoveriesList all discoveries (optional: filter by parentId, include fields)
harvestr_get_discoveryRetrieve a specific discovery by ID
harvestr_get_discovery_stateGet the current state of a discovery
harvestr_list_discovery_feedbackList all feedback for a discovery

Discovery States

ToolDescription
harvestr_list_discovery_statesList all discovery states
harvestr_get_discovery_state_by_idRetrieve a specific discovery state by ID

Messages

ToolDescription
harvestr_list_messagesList all messages
harvestr_get_messageRetrieve a specific message by ID
harvestr_list_message_feedbackList all feedback for a message

Feedback

ToolDescription
harvestr_list_feedbackList all feedback (optional: filter by messageId, discoveryId)
harvestr_get_feedbackRetrieve a specific feedback by ID

Attributes

ToolDescription
harvestr_list_user_attributesList all user attribute definitions
harvestr_list_company_attributesList all company attribute definitions

Development

Setting Up for Development

# Clone and enter the repository
git clone https://github.com/your-org/harvestr-mcp.git
cd harvestr-mcp

# Install with dev dependencies using uv (recommended)
uv pip install -e ".[dev]"

# Or with pip
pip install -e ".[dev]"

Running Tests

The test suite uses pytest with pytest-asyncio for async test support:

# Run all tests
pytest

# Run with verbose output
pytest -v

# Run specific test file
pytest tests/test_client.py

# Run specific test class
pytest tests/test_server.py::TestUserTools

# Run with coverage (if installed)
pytest --cov=harvestr_mcp

Test Structure

tests/
├── __init__.py
├── conftest.py      # Shared fixtures and test configuration
├── test_client.py   # Tests for the Harvestr API client
├── test_types.py    # Tests for Pydantic models
└── test_server.py   # Tests for MCP server tools

Testing with MCP Inspector

For interactive testing of the server:

npx @modelcontextprotocol/inspector fastmcp run src/harvestr_mcp/server.py:mcp

Code Formatting

This project uses Ruff for linting and formatting:

# Check for issues
ruff check .

# Auto-fix issues
ruff check --fix .

# Format code
ruff format .

API Documentation

For detailed API documentation, see the Harvestr API Docs.

License

MIT License - see LICENSE for details.

Reviews

No reviews yet

Sign in to write a review