Agentset MCP Server for RAG Applications
Build intelligent, document-based RAG applications quickly with the Agentset MCP server for developers.
npx -y @agentset-ai/mcp-serverOverview
The Agentset MCP server is a lightweight Model Context Protocol (MCP) adapter that makes it easy to add document-aware retrieval tools to LLM-driven workflows. It exposes an MCP-compatible tool description that LLM orchestrators (for example Claude or other MCP-aware hosts) can discover and call. Behind the scenes it connects to Agentset namespaces — collections of documents and embeddings — so models can perform retrieval-augmented generation (RAG) against your indexed content.
For developers building document-based assistants, knowledge-bases, or internal search workflows, the MCP server removes boilerplate: you run a single process (or start it via npx/dlx) and it publishes a standard MCP tool that forwards search and fetch requests to the Agentset platform. That lets LLMs include relevant documents in the prompt or call out to retrieval operations during conversations.
Features
- MCP-compliant server that publishes a discovery document and tool endpoints for model orchestration platforms
- Connects to Agentset namespaces (document collections) using your AGENTSET_API_KEY
- Supports quick CLI startup via npx / yarn dlx / pnpm dlx; no complex install required
- Configurable namespace and tenant scoping for multi-tenant deployments
- Optional custom tool description to tailor what the model sees in tool listings
- Suitable for local development, CI tasks, and integration with platform connectors (e.g., Claude MCP configuration)
Installation / Configuration
Prerequisites: an Agentset API key and at least one namespace ID (ns_xxx). You can pass configuration via environment variables or CLI flags.
Start with npx:
# start MCP server for a namespace (temporary npx run)
AGENTSET_API_KEY=your-api-key
Using yarn dlx:
AGENTSET_API_KEY=your-api-key
Using pnpm dlx:
AGENTSET_API_KEY=your-api-key
You can also provide the namespace via environment variable:
AGENTSET_API_KEY=your-api-key AGENTSET_NAMESPACE_ID=your-namespace-id
Common CLI flags and environment variables:
| Option / Env var | Purpose |
|---|---|
| –ns or –namespace | Namespace ID to expose (overrides AGENTSET_NAMESPACE_ID) |
| -d, –description | Custom tool description shown in MCP discovery |
| -t, –tenant | Tenant ID (for multi-tenant Agentset setups) |
| AGENTSET_API_KEY | Required API key (agentset_xxx) |
| AGENTSET_NAMESPACE_ID | Alternative way to set namespace via env |
Example with custom description and tenant id:
AGENTSET_API_KEY=agentset_xxx
Available Tools / Resources
When running, the MCP server exposes a standard MCP discovery endpoint that describes one or more tools backed by Agentset. Typical capabilities exposed to the model include:
- Document retrieval/search for the configured namespace(s)
- Fetching full document content or metadata
- (Optional) Tool description text that explains what queries the tool handles and how results will be used
These resources are intended to be consumed by model orchestration platforms that support MCP discovery. For full API and platform-specific integration notes, see the official docs: https://docs.agentset.ai and the repository: https://github.com/agentset-ai/mcp-server
Example MCP registration snippet for a host (e.g., Claude or another MCP-aware runtime):
Use Cases
RAG-powered chat assistant for product documentation
Deploy the MCP server pointing at a namespace containing product manuals. When the model needs to cite a specification or provide step-by-step instructions, it can call the Agentset tool to retrieve relevant passages and include them in responses.Multi-tenant knowledge apps
Run the same MCP server binary in a multi-tenant environment by passing different namespace and tenant IDs for each process. Each process exposes tools scoped to a single tenant/namespace so orchestration layers can route requests appropriately.Summarization and citeable answers for customer support
Use the retrieval tool to fetch exact paragraphs that relate to a support ticket. The model can summarize the findings and include citations, improving answer accuracy and auditability.Composer for automated workflows
Combine the Agentset MCP tool with other MCP tools (e.g., calendar, search, code executor) so models can construct multi-step operations that depend on both structured tools and unstructured knowledge in your Agentset namespace.
Tips and Links
- Use AGENTSET_API_KEY and AGENTSET_NAMESPACE_ID environment variables for CI-friendly deployments and secrets management.
- Provide a concise custom description with -d to help the model understand the tool’s intended usage.
- Repository and source: https://github.com/agentset-ai/mcp-server
- Docs and API reference: https://docs.agentset.ai
The Agentset MCP server is a practical bridge between indexed document collections and modern LLM orchestration, enabling reliable RAG workflows with minimal setup.