# FastGPT MCP

> FastGPT MCP lets you build sophisticated AI applications that talk directly to your company's specific knowledge base. This connector automates the entire data lifecycle—from ingesting raw documents and chunks of text to running advanced semantic searches and powering contextual chat completions using internal policies.

## Overview
- **Category:** data-management
- **Price:** Free
- **Tags:** fastgpt, rag-engine, knowledge-base, semantic-search, llm-orchestration, open-source

## Description

Building an AI agent that actually knows your business requires more than just feeding it a prompt; you have to manage the source material itself. This MCP handles that whole process. You can programmatically create structured knowledge bases, then push in documentation—whether it's legal manuals or product specs—for automatic indexing and vectorization. From there, your agent can run deep semantic queries against those specific datasets. It also lets you inspect applications and monitor the entire RAG pipeline directly from your workflow via Vinkius. The end result is an AI that grounds every answer in verified, structured data, eliminating generic responses and making it genuinely useful for day-to-day work.

## Tools

### chat_completions
Sends a message to a FastGPT application, tracking context and showing detailed intermediate steps for better debugging.

### get_embeddings
Generates numerical representations (embeddings) for any piece of text, useful for external semantic search tests.

### get_app_detail
Pulls all configuration details for a single AI application, letting you check its status and linked datasets.

### get_dataset_detail
Retrieves the full metadata and structure of an existing knowledge base dataset.

### create_dataset
Builds an entirely new knowledge base dataset so you can start storing specific types of information.

### delete_dataset_data
Removes specific pieces of data from a dataset when the source documents are outdated or inaccurate.

### list_apps
Lists all the AI applications you've created within your FastGPT environment.

### list_dataset_data
Shows a list of the individual data items currently stored in a specific dataset.

### list_datasets
Retrieves a list of all available knowledge bases, with options to filter by parent ID or search keywords.

### push_dataset_data
Adds new content or modifies existing data within a dataset's structured records.

### search_dataset_data
Performs an advanced semantic search query against a dataset to find highly relevant chunks of information.

### update_dataset_data
Modifies the content or metadata of existing data records in a knowledge base.

## Prompt Examples

**Prompt:** 
```
List all my AI applications in FastGPT.
```

**Response:** 
```
I've retrieved your applications. You have 2 active apps: 'Customer Support' (ID: app_1) and 'Internal HR' (ID: app_2). Which one would you like to inspect?
```

**Prompt:** 
```
Search dataset 'ds_123' for 'company refund policy'.
```

**Response:** 
```
Searching dataset 'ds_123'... I found 2 relevant results: 1. 'Refunds are processed in 5 days' (Score: 0.95), 2. 'Request via portal' (Score: 0.88). Would you like to see the full content?
```

**Prompt:** 
```
Create a new dataset named 'Internal Documentation'.
```

**Response:** 
```
Creating dataset... 'Internal Documentation' has been created successfully. ID: `ds_docs_999`. You can now start pushing data to it using the `push_dataset_data` tool.
```

## Capabilities

### Build new knowledge sources
Create and manage dedicated datasets (knowledge bases) to hold specific types of company information.

### Feed data into the system
Push text content or document chunks directly into a dataset for automatic indexing so the AI can read it.

### Search deep within documents
Run advanced semantic queries against your knowledge base to find relevant information and test search quality.

### Manage AI application settings
List and get detailed configurations for the various AI applications linked to your datasets.

### Run context-aware chats
Trigger RAG-powered chat sessions that track conversation history, ensuring consistency throughout a multi-step discussion.

## Use Cases

### Legal team needs to check compliance policies.
The legal analyst uses their agent to search for 'data retention policy' across multiple datasets. They use `search_dataset_data` and get specific citations, preventing them from citing outdated or incorrect rules.

### Dev team is building a new product feature.
The developer uses their agent to check the current list of available apps via `list_apps`, then checks the details for a specific dataset using `get_dataset_detail` before connecting it to the chat function.

### Operations team updates product manuals.
The ops manager uploads new versions of technical guides. Instead of manual file replacement, they use `push_dataset_data` and specify the document ID, ensuring a clean, traceable update to the knowledge base.

## Benefits

- Data Integrity: When you need to update source material, use `update_dataset_data` or `push_dataset_data`. This ensures the AI is always referencing the most current version of a policy or document.
- Debugging Search Failures: Don't guess why an answer was wrong. Use `search_dataset_data` to run precise semantic searches and verify that your knowledge base actually contains the right information.
- System Visibility: You can track everything with `list_apps`. This lets you see all the connected AI applications and know exactly which datasets feed into them, simplifying audits.
- Building From Scratch: Need a new area of expertise? Use `create_dataset` to build a dedicated knowledge base from scratch, keeping specialized data separate from general documentation.
- Deep Context Chat: Instead of generic chat, use the `chat_completions` tool. It tracks session history and shows intermediate steps, making complex conversations reliable.

## How It Works

The bottom line is you connect your existing AI workflow to a powerful data pipeline manager, letting it talk to structured internal knowledge sources.

1. First, subscribe to this MCP and set up your FastGPT instance (cloud or self-hosted).
2. Next, navigate to your app settings within FastGPT, generate an API Key, and find the Base URL.
3. Finally, enter both the API Key and Base URL into your AI client fields in Vinkius. You're ready to manage RAG pipelines.

## Frequently Asked Questions

**Can I use this with my self-hosted FastGPT instance?**
Yes! Simply provide your custom domain in the **Base URL** field (e.g., `https://fastgpt.mycompany.com`). The MCP will route all requests to your specific instance.

**How do I add new data to an existing dataset?**
Use the `push_dataset_data` tool. You can send a JSON array of objects containing the text content to be indexed. FastGPT will handle the chunking and embedding automatically.

**What is the 'goods_sign' used for in Pinduoduo tools?**
Wait, this is the FastGPT FAQ. For FastGPT, you mostly need Dataset IDs and App IDs. The 'goods_sign' is specific to the Pinduoduo MCP. Always check you are using the correct tools for the specific platform.

**What credentials do I need to use the `get_app_detail` tool?**
You must provide your API Key and Base URL. These two parameters authenticate your connection to FastGPT, ensuring that all operations—like viewing app configurations—are securely tied back to your specific account.

**If I want to remove old records, is the `delete_dataset_data` tool safe?**
It's highly effective for removal, but you must specify both the dataset ID and the exact data identifiers. This process deletes content permanently, so always verify your target IDs before running a deletion command.

**How does `search_dataset_data` find relevant information?**
The tool uses advanced semantic embeddings rather than simple keyword matching. It analyzes the meaning and context of your query, returning results ranked by relevance score for complex questions.

**Should I use `list_datasets` first to see all my available knowledge bases?**
Yes. Running `list_datasets` retrieves every dataset ID and name configured in your FastGPT instance. This lets you quickly confirm which knowledge base is ready for data ingestion or searching.

**What happens if I need to correct existing information using the `update_dataset_data` tool?**
The tool overwrites the entire record associated with a specific data ID. You must provide that unique ID and the full, corrected content; partial updates aren't supported.