📚guideintermediate

Agentset: Build Production RAG Apps with MCP (2025 Guide)

Set up Agentset MCP server for RAG-powered knowledge bases. Learn installation, configuration, and integration with Claude Desktop, Cursor, and other AI clients.

ByMCP Directory Team
Published
⏱️25 minutes
agentsetragmcpknowledge-basedocument-searchsemantic-searchretrieval-augmented-generationai-agentsvector-databasedocument-processing

Agentset: Build Production RAG Apps with MCP

What you'll learn: How to set up Agentset MCP server to connect your knowledge base to AI assistants, enabling semantic search and document retrieval through Claude, Cursor, Windsurf, and other MCP clients.

What is Agentset?

Agentset is an open-source platform for building production-ready RAG (Retrieval-Augmented Generation) applications. It handles the entire RAG pipeline: document ingestion, chunking, embedding, and retrieval—so you can focus on building AI features instead of infrastructure.

Key Features

| Feature | Description | |---------|-------------| | High-Accuracy RAG | Hybrid search + reranking for precise results | | 22+ File Formats | PDF, DOCX, Markdown, HTML, and more | | Automatic Citations | Built-in source attribution for answers | | Deep Research Mode | Extended analysis across multiple sources | | Model Agnostic | Works with any LLM, embedding model, or vector DB | | MCP Server | Native integration with AI assistants |

Why Use Agentset with MCP?

MCP (Model Context Protocol) allows AI assistants to access external tools and data. With Agentset's MCP server, your AI assistant can:

  • Search your knowledge base in natural language
  • Retrieve relevant documents with citations
  • Answer questions using your proprietary data
  • Maintain context across conversations

Prerequisites

Before starting, you'll need:

  • Node.js 16+ installed
  • Agentset account (free tier: 1,000 pages, 10,000 retrievals)
  • API key from Agentset dashboard
  • Namespace ID for your knowledge base

Quick Start

Step 1: Create an Agentset Account

  1. Visit app.agentset.ai
  2. Sign up for a free account
  3. Create a new namespace for your documents
  4. Upload your documents (PDFs, docs, markdown, etc.)

Step 2: Get Your Credentials

From the Agentset dashboard:

  1. Navigate to Settings → API Keys
  2. Copy your API key (format: agentset_xxx)
  3. Go to your namespace and copy the Namespace ID (format: ns_xxx)

Step 3: Test the MCP Server

Run a quick test to verify everything works:

# Windows PowerShell
$env:AGENTSET_API_KEY="your-api-key"
npx @agentset/mcp --ns your-namespace-id
# macOS/Linux
AGENTSET_API_KEY=your-api-key npx @agentset/mcp --ns your-namespace-id

If successful, you'll see the server start and connect to your knowledge base.

Client Configuration

Claude Desktop

Add to your Claude Desktop config file:

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

{
  "mcpServers": {
    "agentset": {
      "command": "npx",
      "args": ["-y", "@agentset/mcp@latest"],
      "env": {
        "AGENTSET_API_KEY": "agentset_xxx",
        "AGENTSET_NAMESPACE_ID": "ns_xxx"
      }
    }
  }
}

Restart Claude Desktop after saving.

Cursor

  1. Open Settings → MCP Servers
  2. Add new server with this configuration:
{
  "agentset": {
    "command": "npx",
    "args": ["-y", "@agentset/mcp@latest"],
    "env": {
      "AGENTSET_API_KEY": "agentset_xxx",
      "AGENTSET_NAMESPACE_ID": "ns_xxx"
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "agentset": {
      "command": "npx",
      "args": ["-y", "@agentset/mcp@latest"],
      "env": {
        "AGENTSET_API_KEY": "agentset_xxx",
        "AGENTSET_NAMESPACE_ID": "ns_xxx"
      }
    }
  }
}

VS Code with GitHub Copilot

Add to your VS Code MCP settings:

{
  "mcp": {
    "servers": {
      "agentset": {
        "command": "npx",
        "args": ["-y", "@agentset/mcp@latest"],
        "env": {
          "AGENTSET_API_KEY": "agentset_xxx",
          "AGENTSET_NAMESPACE_ID": "ns_xxx"
        }
      }
    }
  }
}

Available Tools

Once connected, the Agentset MCP server provides these tools:

search_knowledge_base

Search through your indexed documents using natural language.

Example prompts:

  • "Find documents about API authentication"
  • "What does our documentation say about deployment?"
  • "Search for error handling best practices"

get_document

Retrieve a specific document by its ID.

Example prompts:

  • "Get the full content of the API guide"
  • "Show me document doc_123"

semantic_search

Perform semantic search with additional context.

Example prompts:

  • "Find information about deployment strategies, focusing on Kubernetes"
  • "Search for security guidelines related to OAuth"

Advanced Configuration

Custom Tool Description

Add a custom description for the tool that appears in your AI assistant:

npx @agentset/mcp --ns your-namespace-id -d "Search my company's internal documentation"

Multi-Tenant Setup

For applications serving multiple organizations:

{
  "mcpServers": {
    "agentset": {
      "command": "npx",
      "args": ["-y", "@agentset/mcp@latest", "-t", "tenant_abc123"],
      "env": {
        "AGENTSET_API_KEY": "agentset_xxx",
        "AGENTSET_NAMESPACE_ID": "ns_xxx"
      }
    }
  }
}

Multiple Namespaces

Connect multiple knowledge bases by adding separate server entries:

{
  "mcpServers": {
    "agentset-docs": {
      "command": "npx",
      "args": ["-y", "@agentset/mcp@latest"],
      "env": {
        "AGENTSET_API_KEY": "agentset_xxx",
        "AGENTSET_NAMESPACE_ID": "ns_documentation"
      }
    },
    "agentset-code": {
      "command": "npx",
      "args": ["-y", "@agentset/mcp@latest"],
      "env": {
        "AGENTSET_API_KEY": "agentset_xxx",
        "AGENTSET_NAMESPACE_ID": "ns_codebase"
      }
    }
  }
}

Real-World Use Cases

1. Internal Documentation Search

Scenario: Your team has hundreds of internal docs, wikis, and guides.

Setup:

  1. Upload all docs to Agentset
  2. Connect MCP server to Claude Desktop
  3. Ask questions like: "What's our deployment approval process?"

Result: Instant answers with citations to specific documents.

2. Codebase Knowledge Base

Scenario: Help developers understand your codebase.

Setup:

  1. Index README files, architecture docs, and API specs
  2. Connect to Cursor or Windsurf
  3. Ask: "How does our authentication middleware work?"

Result: Context-aware answers while coding.

3. Customer Support Knowledge

Scenario: AI-powered support using your documentation.

Setup:

  1. Upload product docs, FAQs, and troubleshooting guides
  2. Integrate via MCP
  3. Query: "How do I reset my password?"

Result: Accurate, cited responses from official docs.

Troubleshooting

API Key Authentication Failed

Symptoms: 401 Unauthorized errors

Solution:

  1. Verify API key in Agentset dashboard
  2. Check for typos in environment variable
  3. Ensure key hasn't expired

Namespace Not Found

Symptoms: "Namespace does not exist" errors

Solution:

  1. Double-check namespace ID format (ns_xxx)
  2. Verify you have access permissions
  3. Ensure documents have been indexed

Poor Search Results

Symptoms: Irrelevant or missing results

Solution:

  1. Add more descriptive metadata to documents
  2. Use more specific search queries
  3. Check if documents finished indexing
  4. Consider reindexing with better chunking settings

Connection Timeouts

Symptoms: Slow responses or timeouts

Solution:

  1. Check network connectivity
  2. Large documents may take longer to process
  3. Contact Agentset support for performance optimization

Self-Hosting Agentset

For full control, you can self-host Agentset:

# Clone the repository
git clone https://github.com/agentset-ai/agentset
cd agentset

# Install dependencies
bun install

# Configure environment
cp .env.example .env
# Edit .env with your settings

# Set up database
bun db:deploy

# Start the server
bun dev:web

Full self-hosting documentation: docs.agentset.ai/open-source/self-hosting

Comparison with Other RAG Solutions

| Feature | Agentset | DIY RAG | Other Platforms | |---------|----------|---------|-----------------| | Setup Time | Minutes | Days/Weeks | Hours | | MCP Support | Native | Custom | Varies | | File Formats | 22+ | Limited | Varies | | Citations | Built-in | Manual | Varies | | Pricing | Free tier | Infrastructure costs | Usually paid |

Next Steps

Related Resources


Last updated: December 2025 | Have questions? Browse more MCP guides