Back to Tutorials

Using RAG in Your MCP Client

Intermediate
25 minutes
What You'll Learn

In this tutorial, you'll learn how to leverage your RAG knowledge base directly from your MCP client (Claude, Cursor, etc.) to enhance your AI assistant with your own documentation and knowledge.

How to use the pluggedin_rag_query tool
Writing effective queries for your knowledge base
Combining RAG queries with other MCP tools
Best practices for contextual information retrieval
Prerequisites
  • Plugged.in account with MCP proxy configured
  • At least one document uploaded to your Library
  • MCP client (Claude Desktop, Cursor, etc.) connected
  • Basic understanding of RAG from the 'Building a RAG Knowledge Base' tutorial

1
Understanding the pluggedin_rag_query Tool

The pluggedin_rag_query tool is automatically available in your MCP client when connected through Plugged.in. It allows you to search through all documents in your current project's library.

Screenshot: Claude Desktop showing pluggedin_rag_query in available tools

The tool appears in your MCP client's tool list

2
Basic RAG Queries

Start with simple queries to search your knowledge base. The tool will return the most relevant chunks from your documents.

Simple Keyword Search

Use the pluggedin_rag_query tool to search for "API authentication"

Screenshot: Claude using RAG query tool

Shows the query being executed and results returned

Question-Based Query

Query my documents about "docker deployment configuration"

Topic Search

Find all mentions of "security best practices" in my uploaded documents

3
Advanced Query Techniques

Learn how to craft more sophisticated queries to get better results from your knowledge base.

Contextual Queries
Based on our project documentation, what are the recommended database indexes for the user table?

The AI will search for database indexing best practices in your documentation

Comparison Queries
Compare the authentication methods described in our API docs versus the security guidelines document

Great for finding information across multiple documents

Screenshot: Complex RAG query with detailed results

Shows how the AI processes and returns relevant information

4
Best Practices

Be Specific

More specific queries yield better results

Good: 'PostgreSQL connection pooling configuration'
Too broad: 'database'
Provide Context

Include context about what you're trying to achieve for better results

Combine with Other Tools

Use RAG queries alongside other MCP tools for powerful workflows:

1. Use pluggedin_rag_query to find deployment steps
2. Follow the instructions found
3. Use pluggedin_send_notification to alert team when complete

Common Issues & Solutions

Next Steps

Now that you can query your knowledge base, explore these related tutorials: