# Together AI MCP

> Together AI connects your agent to hundreds of open-source LLMs for real-time inference, image generation, and model training. Use this MCP to generate vectors, run complex chats, or fine-tune models like Llama and Mixtral directly from any compatible client.

## Overview
- **Category:** ai-frontier
- **Price:** Free
- **Tags:** llm, model-inference, fine-tuning, open-source-ai, machine-learning, api-deployment

## Description

Need to get bleeding-edge AI models into your daily workflow? This Together AI MCP connects your agent to an entire library of open-source LLMs. You can query powerful models—like Llama, Mixtral, and others—to run chats or perform basic text completions without leaving your chat environment. It's built for developers who need world-class inference speed right now. Beyond just chatting, you can generate rich vector embeddings instantly from raw text logs to populate any analytical database. Need visuals? Instruct the MCP to create images using detailed descriptions. You can also provision and track custom fine-tuning jobs by pointing to a base model and a dataset file. Once connected via Vinkius, your agent gains access to this full suite of capabilities, letting you manage everything from basic text generation to complex model training cycles.

## Tools

### chat_completion
Executes a multi-turn conversation using specified Together AI models and message history.

### text_completion
Performs standard text generation by receiving only a model ID and an initial prompt.

### create_finetune_job
Initiates a new model fine-tuning job using a specified base model and training dataset file.

### generate_embeddings
Converts an array of input texts into rich vector embeddings for use in databases.

### generate_image
Creates a visual image by translating a detailed descriptive prompt into a picture using external diffusion models.

### list_finetune_jobs
Retrieves and shows the current status of all fine-tuning jobs you've created.

### list_available_models
Lists every AI model currently supported on the Together AI network for your review.

## Prompt Examples

**Prompt:** 
```
List all the models currently available on Together AI.
```

**Response:** 
```
I've fetched 132 available models. Here are the top chat models:
- meta-llama/Llama-2-70b-chat-hf
- mistralai/Mixtral-8x7B-Instruct-v0.1
- google/gemma-7b-it
Ask if you want the embedding or image models only.
```

**Prompt:** 
```
Generate an embedding array using model `togethercomputer/m2-bert-80M-8k-retrieval` for the sentence 'The cat sat on the mat'.
```

**Response:** 
```
Embeddings generated successfully. Dimensions: 768. Sample values:
[-0.0124, 0.0411, 0.0812, ... -0.0123]
```

## Capabilities

### Run Advanced Conversations
Your agent handles multi-turn conversations using powerful open-source models by providing a simple chat history and requesting completion.

### Generate Text Content
You can execute basic text generation tasks, giving the MCP a model ID and a prompt to get immediate textual output.

### Create Image Assets
The MCP generates original images when you supply a detailed physical description (prompt) for an external diffusion model to use.

### Prepare Data Embeddings
You can convert raw input texts into rich vector embeddings, which are ready to index in your analytical databases.

### Manage Model Training
The MCP creates custom fine-tuning jobs using a base model and a specific dataset file, and you can track the status of those jobs.

### Discover Available Models
You list all models available on the Together network to find the best engine for your NLP or vision task.

## Use Cases

### Building a Retrieval System
An engineer needs to index thousands of internal documents. Instead of writing a dedicated script, they ask their agent to use `generate_embeddings` on the raw text chunks and pipe those vectors directly into their vector store.

### Creating Content for Marketing
A marketing specialist needs an illustration for a blog post. They prompt their agent, asking it to use `generate_image` with a detailed description (e.g., 'a futuristic cityscape at sunset'), and the image appears instantly.

### Updating a Core Model
A machine learning engineer wants to adapt an open-source LLM for internal jargon. They use `create_finetune_job` with their base model ID and dataset, then monitor progress using `list_finetune_jobs`.

### Testing Model Alternatives
A developer wants to compare Llama 3 against Mixtral for a chat feature. They use the agent's ability to run completions (`chat_completion`) multiple times in one session, comparing outputs side-by-side.

## Benefits

- Stop switching between dashboards. You can generate embeddings or run chat completions using the `generate_embeddings` tool, all from your agent's prompt.
- Manage entire model lifecycles—from initial testing to production fine-tuning. Use `create_finetune_job` and then check status with `list_finetune_jobs` without leaving your workflow.
- Need a visual asset? Simply call `generate_image` by providing a detailed prompt; you get an image file back, not just text.
- Explore the best model for any task. Use `list_available_models` to see hundreds of open-source options before running a single inference.
- The `chat_completion` tool handles complex conversational flow, making your agent feel much more natural than simple prompt/response cycles.

## How It Works

The bottom line is, it lets your agent use advanced LLMs and ML tools without needing to switch environments or write complex boilerplate code.

1. Sign up for this integration and fetch a developer API key from the api.together.xyz control panel.
2. Plug that key into your agent, specifying which models you need access to.
3. Your AI client then executes sub-second serverless inference directly inside your command interface.

## Frequently Asked Questions

**How do I know what models are available using the Together AI MCP?**
You use the `list_available_models` tool. This instantly provides a list of all supported LLMs, letting you pick the best one for your chat or embedding task.

**Can I fine-tune my own model with Together AI MCP?**
Yes. You start by calling `create_finetune_job`, providing a base model and your training data file, and then monitor the progress using `list_finetune_jobs`.

**What is the difference between chat_completion and text_completion?**
Use `chat_completion` when you need multi-turn conversations that require a history of messages. Use `text_completion` for simple, single-shot prompts.

**Does Together AI MCP handle image generation?**
Yes, it handles images using the `generate_image` tool. Just give it a detailed text description and receive an image asset back.

**Is this only for coding tasks?**
No. While great for developers, you can use this MCP for anything that needs complex AI: data vectorization (`generate_embeddings`), content creation, or model training.