# Metatext MCP

> Metatext MCP Server gives your AI agent direct access to advanced NLP model management. Use this server to list all trained models (`list_nlp_models`), check dataset metadata, run real-time predictions via `run_model_inference`, and manage data pipelines by creating records or fetching account info. It lets you treat your entire MLOps workflow like a conversation.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** nlp, model-training, inference, machine-learning, no-code, data-pipelines

## Description

**Metatext MCP Server**: Your agent gets direct, granular access to every NLP model and dataset in your Metatext account. You treat your entire MLOps workflow like a conversation with your AI client. This server lets you manage models, run predictions, and build datasets without ever leaving the chat window.

**Checking Model Inventory & Status**

You can see everything you've trained. To get a complete list of every NLP model registered under your account, just ask for it; that triggers `list_nlp_models`. If you know what you’re looking for, you don’t have to wade through hundreds of results—you can narrow the search using `search_nlp_models` by matching keywords in a model's name or its capabilities tags. When you pick one out, you can pull up its full profile using `get_model_details`. This gives you comprehensive data like versioning and current status flags for that specific NLP model.

Understanding which versions are live is key. To view every active or archived deployment instance of any model, trigger `list_model_deployments`. It shows you exactly what’s running right now versus what's sitting in cold storage. If you need to run a prediction—say, sentiment scoring or entity extraction—you send the input text directly to a specified model ID by invoking `run_model_inference`; it hands back the result immediately.

**Managing Datasets and Data Points**

The server gives you full control over your data pipelines. First, you can get an overview of everything available by asking for all datasets with `list_nlp_datasets`. Once you find a dataset ID that looks promising, you check its blueprint using `get_dataset_details`. This tool returns the complete schema and metadata, letting you know exactly what kind of data structure it expects. If you need to see actual examples to audit the quality, you can run `list_dataset_records`, which lists multiple records within a dataset; remember, this function lets you control how many results are shown by using limits and offsets for proper pagination.

Need clean data for retraining? You use `create_dataset_record` to add single, new data points—or labels—to an existing dataset. This is how you build your training examples right from the agent conversation. These tools mean you don't have to jump between a dashboard and your chat interface; you just tell your AI client what needs fixing or updating.

**Account Oversight and Usage Auditing**

You can keep an eye on the health of the platform itself. To pull general usage metrics and check the overall account status for Metatext, you run `get_account_info`. This gives you a quick audit without having to log into billing or admin panels.

This server lets your AI agent handle everything from initial model discovery through live inference and data prep—all in one conversational flow. You tell it: 'Check the schema for Dataset X, then find Model Y, run it on this text, and record the output.' It runs the whole sequence automatically.

## Tools

### create_dataset_record
Adds a single new record (data point) to an existing dataset.

### get_account_info
Retrieves general usage metrics and account status information for the Metatext platform.

### get_dataset_details
Fetches the complete structure, schema, and metadata for a specified dataset ID.

### get_model_details
Retrieves comprehensive details (versioning, status) for a specific NLP model by its unique identifier.

### list_nlp_datasets
Returns a complete list of every dataset available in the Metatext account, often with filtering options.

### list_model_deployments
Shows all active and archived deployments of NLP models, helping track which version is live.

### list_nlp_models
Queries and returns a comprehensive list of all trained NLP models registered under your account.

### list_dataset_records
Lists multiple data records within a dataset, allowing you to paginate results based on limits and offsets.

### run_model_inference
Sends text input to a specified model ID to receive a prediction, classification, or extraction result.

### search_nlp_models
Finds specific NLP models by matching keywords in their name or capabilities tags.

## Prompt Examples

**Prompt:** 
```
List all my trained NLP models in Metatext.
```

**Response:** 
```
Retrieving models... I found several models including 'Sentiment Classifier' and 'Entity Extractor'.
```

**Prompt:** 
```
Analyze this text with model ID 'mod_123': 'I love this product!'
```

**Response:** 
```
Running inference... The model predicts 'Positive' with a confidence score of 98.5%.
```

**Prompt:** 
```
Add a new record to dataset 'ds_987' with text 'Refund requested' and label 'Support'.
```

**Response:** 
```
Creating record... The entry has been successfully added to dataset 'ds_987'.
```

## Capabilities

### View Model Inventory
List every trained NLP model available in the account using `list_nlp_models` or quickly search for a specific one with `search_nlp_models`.

### Run Predictions and Classifications
Execute real-time predictions on deployed models by passing input text to `run_model_inference`.

### Manage Datasets
Enumerate all datasets (`list_nlp_datasets`), check dataset structure with `get_dataset_details`, or add new data points using `create_dataset_record`.

### Inspect Model Status
Retrieve detailed metadata for specific models (`get_model_details`) and list active deployment instances via `list_model_deployments`.

### Audit Account Usage
Get usage metrics and account health information using the `get_account_info` tool.

## Use Cases

### Validating Model Drift
A data scientist suspects their 'Sentiment Classifier' is performing worse. They prompt the agent: "List my models and check the details for Sentiment Classifier." The agent uses `list_nlp_models` and then `get_model_details`. Next, they provide a batch of new, unclassified customer reviews, asking the agent to run them through `run_model_inference` to compare against old metrics. This quickly identifies if model drift is occurring.

### Building Training Data Sets
A team needs more examples of 'Refund requested' support tickets for a new model. They use the agent to run `list_nlp_datasets` to find the correct dataset ID, then ask it to check the schema via `get_dataset_details`. Finally, they pass them 20 raw text snippets and instruct the agent to use `create_dataset_record` for each one, labeling it 'Support' in a single flow.

### Auditing Production Deployments
The platform engineer needs to know if Model A or Model B is currently live and which version was used last week. They call `list_model_deployments` to see all active endpoints, then use `get_account_info` to check the overall usage against billing thresholds before approving a new deployment.

### Quick Model Lookup
A developer is working on a client-facing feature and needs an entity extractor but doesn't know the exact model ID. They ask the agent to 'Show me all models that extract names.' The agent immediately uses `search_nlp_models` by capability, providing the required model ID without any manual searching.

## Benefits

- **Execute Inference on Demand:** Instead of writing a script just to test a model, you simply ask your agent to run `run_model_inference` with the text. You get immediate classification scores or extractions without boilerplate code.
- **Full Data Lifecycle Control:** The server lets you manage data from start to finish. You can use `list_nlp_datasets` to see what exists, then `create_dataset_record` to add a new labeled example for training, and finally monitor the process with `get_model_details`.
- **Zero-Friction Model Discovery:** Need to know which model handles entity extraction? Use `search_nlp_models`. It finds models by name or capability tag in one step, skipping manual browsing of dozens of dashboards.
- **Auditability Built-In:** You don't just run models; you audit them. Use `list_model_deployments` to see exactly which model version is running live and what the historical usage patterns are via `get_account_info`.
- **Conversational Data Prep:** Forget complex YAML files for basic data tasks. The agent can talk to you: 'List my datasets' (`list_nlp_datasets`), then 'Show me details on that one' (`get_dataset_details`).
- **Direct API Access via Chat:** Everything normally requiring 5-10 distinct API endpoints—listing, getting details, running inference—is wrapped into a single, conversational tool call.

## How It Works

The bottom line is: you tell your AI client what you need in plain English, and it uses these tools to run the complex ML operations for you.

1. Connect your AI agent to the Metatext MCP Server and provide your API key.
2. The agent analyzes your request, determining which tools are needed (e.g., `list_nlp_models` followed by `run_model_inference`).
3. The server executes the sequence of tool calls, returns structured data (like model lists or prediction scores), and relays it back to the agent for a final conversational answer.

## Frequently Asked Questions

**How do I list all my NLP datasets using Metatext MCP Server?**
You call `list_nlp_datasets`. This tool returns a comprehensive inventory of every dataset ID in your account, allowing you to see what's ready for work.

**What is the difference between `get_dataset_details` and `list_dataset_records`?**
`get_dataset_details` shows the schema—the blueprint of the dataset. `list_dataset_records` actually retrieves the data points inside it, letting you inspect the content.

**Can I run predictions on a model that isn't deployed?**
No. You must first use `list_model_deployments` to verify an active deployment exists before calling `run_model_inference`. The server won't let you run it otherwise.

**How do I add new training data using Metatext MCP Server?**
You use the `create_dataset_record` tool. You must provide the specific dataset ID and all necessary fields to ensure the record is added correctly.

**What steps do I take to ensure my agent can connect using `get_account_info`?**
You must provide a valid Metatext API Key. This key authenticates your client and grants the agent access to specific account metrics, such as usage limits or overall resource consumption.

**How does `list_model_deployments` show me which NLP models are ready for use?**
It lists all currently active model endpoints. This tool doesn't just list models; it confirms their deployment status, telling your agent exactly where to send real-time inference requests.

**If I only know the name of a model, how do I use `search_nlp_models`?**
It filters your entire catalog by partial or full names. Instead of reviewing every trained NLP model, this tool quickly surfaces specific models you need for immediate inspection or testing.

**When using `list_dataset_records`, what happens if my dataset is huge?**
The tool retrieves data in paginated batches. You'll need to check the response metadata for pagination tokens or a next page URL to pull every available record, preventing API rate limits.

**How do I find my Metatext API Key?**
Log in to Metatext and navigate to your account settings to find and copy your API Key.

**Can I run inference on any model type?**
Yes, as long as the model is fully trained and deployed, you can use the `run_model_inference` tool.

**Is my AI data secure?**
Absolutely. Your token is encrypted at rest and injected securely at runtime.