Skip to main content

MCP Integration

Harvest provides a Model Context Protocol (MCP) server that allows you to inject API, SDK, and CLI documentation directly into the context of your favorite AI coding assistants. This enables faster development with up-to-date documentation always available.

What is MCP?

The Model Context Protocol (MCP) is a standardized way for AI assistants to access external data sources and tools. By integrating Harvest as an MCP server, your AI coding assistant can:
  • Search across all indexed documentation
  • Retrieve relevant code examples and usage guides
  • Access up-to-date API references and SDK documentation
  • Get context-aware answers based on the latest documentation
  • Create new indexes for additional documentation sources
You can create new indexes directly through the MCP interface to add API, SDK, or CLI documentation from any source. Once indexed, this documentation becomes immediately available for your AI assistant to query, making it easy to expand the knowledge base available to your coding assistant.

Prerequisites

Before setting up the Harvest MCP server, you’ll need:
  1. A Harvest API key - Your API key is automatically available on the Add MCP page
  2. An MCP-compatible client - Such as Cursor, Claude Code, or other MCP clients

Quick Setup

The easiest way to get started is to visit the Add MCP page in your Harvest dashboard. This page:
  • Automatically includes your API key in all configuration options
  • Provides one-click installation for supported clients (Cursor)
  • Shows ready-to-use commands and configurations for other clients
  • Displays all available indexes you can query

Installation Methods

Cursor

Cursor provides the simplest installation method with a one-click deep link:
  1. Visit the Add MCP page in your Harvest dashboard
  2. Your API key is automatically included - no need to copy it manually
  3. Click the “Add Harvest MCP server to Cursor” button
  4. Cursor will automatically configure the MCP server with your API key
Alternatively, you can manually add the MCP server to your Cursor configuration:
  1. Open Cursor Settings → Features → Model Context Protocol
  2. Click “Add Server”
  3. Use the following configuration:
{
  "type": "streamable-http",
  "url": "https://www.goharvest.ai/mcp",
  "headers": {
    "Authorization": "Bearer YOUR_API_KEY"
  }
}

Claude Code

For Claude Code, use the command line to add the Harvest MCP server:
  1. Visit the Add MCP page in your Harvest dashboard
  2. Copy the Claude Code command shown on the page (your API key is already included)
  3. Paste and run the command in your terminal:
claude mcp add --transport http Harvest https://www.goharvest.ai/mcp --header "Authorization:Bearer YOUR_API_KEY"
The command on the Add MCP page already includes your API key, so you can copy and paste it directly without any modifications.

Other MCP Clients

For other MCP-compatible clients:
  1. Visit the Add MCP page in your Harvest dashboard
  2. Copy the JSON configuration shown on the page (your API key is already included)
  3. Add this configuration to your MCP client’s settings file according to your client’s documentation
The JSON configuration will look like this (with your API key already included):
{
  "type": "streamable-http",
  "url": "https://www.goharvest.ai/mcp",
  "headers": {
    "Authorization": "Bearer YOUR_API_KEY"
  }
}

Configuration Details

Server URL

The Harvest MCP server is available at:
https://www.goharvest.ai/mcp

Authentication

All requests to the Harvest MCP server require Bearer token authentication. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY

Server Name

The default server name is Harvest for production environments. For staging or development environments, the name may include the environment suffix (e.g., Harvest-staging).

Available MCP Tools

Once configured, the Harvest MCP server provides access to the following tools:

Get Context

Search across all indexed documentation to retrieve relevant code examples and usage guides. Parameters:
  • query (string, required): The search query for documentation
Returns:
  • Array of documentation chunks ranked by relevance with scores
  • Each chunk includes content, source, and relevance score

Add Index

Index a new documentation source (SDK, CLI, or API documentation). Parameters:
  • index_name (string, required): Name for the index
  • url (string, required): URL of the documentation to index
Returns:
  • Index details including index_id and indexing status

Usage Examples

Searching Documentation

Once the MCP server is configured, you can ask your AI assistant questions like:
  • “How do I authenticate with Supabase using Python?”
  • “Show me examples of Tailwind CSS utility classes for responsive layouts”
  • “What are the endpoints available in the Sportradar API?”
The AI assistant will automatically query Harvest’s indexed documentation and provide relevant, up-to-date examples.

Indexing Additional Documentation

You can also index additional documentation sources:
  • “Index the Supabase documentation at https://supabase.com/docs
  • “Add the Tailwind CSS documentation to Harvest”
  • “Index the Sportradar API documentation”

Troubleshooting

Connection Issues

If you’re having trouble connecting to the Harvest MCP server:
  1. Verify your API key - Check that your API key is correct in the Authorization header
  2. Check the URL - Ensure you’re using https://www.goharvest.ai/mcp
  3. Network connectivity - Verify your network can reach the Harvest API

Authentication Errors

If you receive authentication errors:
  • Ensure your API key is valid and active in the Harvest dashboard
  • Check that the Authorization header format is correct: Bearer YOUR_API_KEY
  • Verify your API key hasn’t been revoked or expired

No Results Returned

If searches return no results:
  • Check that there are indexes available in your Harvest account
  • Try broader search queries
  • Verify that the documentation you’re looking for has been indexed

Security Best Practices

Keep your API key secure. Never share your API key or commit it to version control.
  • Store your API key securely (environment variables, secure vaults)
  • Use different API keys for development and production
  • Rotate API keys regularly
  • Monitor API key usage in your Harvest dashboard

Next Steps