Metadata-Version: 2.4
Name: influenceflow-mcp
Version: 1.0.0
Summary: MCP server for InfluenceFlow — 56 tools for AI-agent-driven influencer marketing. Works with Claude Desktop, Claude Code, and any MCP client.
Project-URL: Homepage, https://influenceflow.io
Project-URL: Documentation, https://influenceflow.io/docs/mcp
Project-URL: Repository, https://github.com/srgirsky/InfluenceFlow
Project-URL: Bug Tracker, https://github.com/srgirsky/InfluenceFlow/issues
Project-URL: Changelog, https://github.com/srgirsky/InfluenceFlow/blob/main/influenceflow-mcp/CHANGELOG.md
Author-email: InfluenceFlow <support@influenceflow.co>
License-Expression: MIT
Keywords: ai,ai-agent,anthropic,automation,claude,creator-economy,influencer,influencer-marketing,marketing,mcp,model-context-protocol
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# InfluenceFlow MCP Server

A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that enables Claude to manage influencer marketing campaigns through natural conversation.

## Features

- **Creator Discovery**: Search and filter creators by niche, followers, engagement rate, location, and pricing
- **Campaign Management**: Full lifecycle — create, activate, pause, complete, and delete campaigns
- **AI-Powered Discovery**: Trigger creator discovery, get keyword suggestions, bulk invite creators
- **Offer Workflow**: Send offers to creators, handle negotiations, and track responses
- **Application Management**: Review, accept, reject, or counter creator applications
- **Collaboration Tracking**: Monitor content creation from contract to completion
- **Content Review**: Approve or request revisions on submitted content
- **Milestone Management**: Track and release payment milestones
- **Talent Pools**: Organize creators into reusable talent pools
- **Tracking Links**: Create and monitor affiliate/tracking links
- **Webhooks**: Configure real-time event notifications
- **Analytics**: Performance metrics, ROI analysis, and agent usage tracking
- **MCP Resources**: Live data feeds for campaigns, analytics, collaborations, and webhook events
- **MCP Prompts**: Guided workflow templates for common tasks

## Installation

```bash
pip install influenceflow-mcp
```

Or use with uvx (no installation required):

```bash
uvx influenceflow-mcp
```

## Configuration

### 1. Get Your API Key

1. Log into [InfluenceFlow](https://influenceflow.io/app/)
2. Go to Settings > API Keys
3. Create a new API key

### 2. Set Environment Variable

```bash
export INFLUENCEFLOW_API_KEY="your_api_key_here"
```

### 3. Configure Claude Desktop

Add to your Claude Desktop configuration file:

**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

```json
{
  "mcpServers": {
    "influenceflow": {
      "command": "uvx",
      "args": ["influenceflow-mcp"],
      "env": {
        "INFLUENCEFLOW_API_KEY": "your_api_key_here"
      }
    }
  }
}
```

Or if installed via pip:

```json
{
  "mcpServers": {
    "influenceflow": {
      "command": "influenceflow-mcp",
      "env": {
        "INFLUENCEFLOW_API_KEY": "your_api_key_here"
      }
    }
  }
}
```

## Available Tools (56 total)

### Creator Tools (3)

| Tool | Description |
|------|-------------|
| `search_creators` | Search for creators by niche, followers, engagement, location, rates |
| `get_creator_profile` | Get detailed profile for a specific creator |
| `get_creator_media_kit` | Get creator's media kit with stats and portfolio |

### Campaign Tools (8)

| Tool | Description |
|------|-------------|
| `list_campaigns` | List all campaigns with optional status filter |
| `get_campaign` | Get detailed campaign information |
| `create_campaign` | Create a new influencer marketing campaign |
| `update_campaign` | Update campaign details |
| `activate_campaign` | Activate a draft or paused campaign |
| `pause_campaign` | Pause an active campaign |
| `complete_campaign` | Mark a campaign as completed |
| `delete_campaign` | Delete a draft campaign |

### Offer Tools (4)

| Tool | Description |
|------|-------------|
| `list_offers` | List all offers sent to creators |
| `get_offer` | Get detailed offer information |
| `send_offer` | Send an offer to a creator |
| `withdraw_offer` | Withdraw a pending offer |

### Application Tools (5)

| Tool | Description |
|------|-------------|
| `list_applications` | List creator applications with status filters |
| `get_application` | Get detailed application information |
| `accept_application` | Accept a creator's application |
| `reject_application` | Reject a creator's application |
| `counter_application` | Send a counter-offer on an application |

### Collaboration Tools (8)

| Tool | Description |
|------|-------------|
| `list_collaborations` | List all active collaborations |
| `get_collaboration` | Get detailed collaboration information |
| `approve_content` | Approve submitted content |
| `request_revision` | Request changes to content |
| `advance_collaboration` | Move collaboration to next stage |
| `complete_collaboration` | Mark collaboration as complete |
| `cancel_collaboration` | Cancel an active collaboration |
| `get_collaboration_performance` | Get performance metrics for a collaboration |

### Content Tools (4)

| Tool | Description |
|------|-------------|
| `list_content` | List content submissions with status filters |
| `get_content` | Get detailed content submission |
| `approve_content_submission` | Approve a content submission |
| `request_content_revision` | Request revision with feedback |

### Milestone Tools (3)

| Tool | Description |
|------|-------------|
| `list_milestones` | List payment milestones for a collaboration |
| `get_milestone` | Get detailed milestone information |
| `release_milestone` | Release payment for a completed milestone |

### Talent Pool Tools (5)

| Tool | Description |
|------|-------------|
| `list_talent_pools` | List all talent pools |
| `create_talent_pool` | Create a new talent pool |
| `get_talent_pool` | Get talent pool details and members |
| `add_creator_to_pool` | Add a creator to a talent pool |
| `remove_creator_from_pool` | Remove a creator from a talent pool |

### Tracking Link Tools (3)

| Tool | Description |
|------|-------------|
| `list_tracking_links` | List tracking links for a campaign |
| `create_tracking_link` | Create a new tracking/affiliate link |
| `get_tracking_link_stats` | Get click and conversion stats |

### Webhook Tools (4)

| Tool | Description |
|------|-------------|
| `list_webhooks` | List configured webhooks |
| `create_webhook` | Create a new webhook subscription |
| `delete_webhook` | Delete a webhook subscription |
| `test_webhook` | Send a test event to a webhook |

### Discovery Tools (5)

| Tool | Description |
|------|-------------|
| `trigger_discovery` | Start AI-powered creator discovery for a campaign |
| `get_discovery_status` | Check discovery progress |
| `get_discovery_keywords` | Get keyword suggestions for discovery |
| `bulk_invite_creators` | Invite multiple discovered creators at once |
| `get_discovery_estimate` | Estimate creator pool size for criteria |

### Analytics Tools (4)

| Tool | Description |
|------|-------------|
| `get_analytics_summary` | Get overall performance summary |
| `get_campaign_analytics` | Get detailed campaign analytics |
| `get_collaboration_analytics` | Get analytics for a specific collaboration |
| `get_agent_usage` | Get agent usage metrics (DAA/MAA) |

## MCP Resources

Live read-only data feeds that provide context to Claude:

| Resource URI | Description |
|-------------|-------------|
| `influenceflow://campaigns` | Current campaign list with status and budget info |
| `influenceflow://analytics/summary` | Overall performance analytics summary |
| `influenceflow://collaborations/active` | Active collaborations needing attention |
| `influenceflow://webhooks/events` | Available webhook event types and descriptions |

## MCP Prompts

Guided workflow templates for common multi-step tasks:

| Prompt | Description |
|--------|-------------|
| `campaign_setup_workflow` | Step-by-step guide to create and launch a campaign |
| `content_review_workflow` | Review and approve/reject pending content submissions |
| `creator_discovery_workflow` | Find and evaluate creators for a campaign |
| `analytics_report` | Generate a comprehensive performance report |

## Agent Identification

If you're building an AI agent that uses the InfluenceFlow API, we recommend setting the `X-Agent-Id` header to identify your agent:

```python
headers = {
    "Authorization": "Bearer your_api_key",
    "X-Agent-Id": "my-agent/1.0"
}
```

This enables:
- Agent-specific analytics in the InfluenceFlow dashboard
- Better debugging and support
- Usage tracking via DAA (Daily Active Agents) and MAA (Monthly Active Agents) metrics

The `get_agent_usage` tool returns these metrics for your brand's API usage.

## Example Conversations

### Finding Creators

```
User: Find me fitness micro-influencers in the US with at least 3% engagement rate and rates under $500 per post

Claude: I'll search for fitness creators matching your criteria.

[Uses search_creators tool]

I found 15 creators matching your criteria. Here are the top 5:

1. @FitWithSarah - 45K followers, 4.2% engagement, $350/post
2. @GymLifeMike - 62K followers, 3.8% engagement, $400/post
...
```

### Running a Campaign

```
User: Create a summer fitness campaign with a $10,000 budget running from June to August

Claude: I'll create that campaign for you.

[Uses create_campaign tool]

Done! I've created "Summer Fitness Campaign" (cmp_abc123):
- Budget: $10,000
- Timeline: June 1 - August 31
- Status: Draft

Would you like me to activate it or search for creators to invite?
```

### Discovering Creators

```
User: Find creators for my new skincare campaign

Claude: I'll trigger AI-powered discovery for your campaign.

[Uses trigger_discovery tool]
[Uses get_discovery_status tool]

Discovery found 32 potential creators. Here are the top matches:
...

Would you like me to bulk invite the top 10?
```

### Managing Content Reviews

```
User: What content is pending review?

Claude: Let me check your pending reviews.

[Uses list_content tool with status="pending_review"]

You have 3 pieces of content awaiting review:

1. @FitWithSarah - Summer Protein Reel (submitted 2 hours ago)
2. @GymLifeMike - Workout Tips Post (submitted yesterday)
3. @YogaWithJen - Morning Routine Story (submitted 3 days ago)

Would you like me to show you any of these submissions?
```

## Development

### Running Locally

```bash
# Clone the repository
git clone https://github.com/srgirsky/InfluenceFlow.git
cd InfluenceFlow/influenceflow-mcp

# Install dependencies
pip install -e .

# Run the server
export INFLUENCEFLOW_API_KEY="your_key"
python -m influenceflow_mcp.server
```

### Running Tests

```bash
pip install -e ".[dev]"
pytest
```

## Environment Variables

| Variable | Description | Default |
|----------|-------------|---------|
| `INFLUENCEFLOW_API_KEY` | Your InfluenceFlow API key | Required |
| `IF_API_KEY` | Shorthand for API key | - |
| `INFLUENCEFLOW_API_BASE` | API base URL | Production URL |

## License

MIT License - see LICENSE file for details.

## Support

- Documentation: https://docs.influenceflow.co/mcp
- Issues: https://github.com/srgirsky/InfluenceFlow/issues
- Email: support@influenceflow.co
