MCP.so
登录

Together.ai Mcp

@Leonfinn

关于 Together.ai Mcp

MCP server exposing Together AI inference endpoints (chat, image, vision, embeddings) as tools for Claude Desktop, Cursor, VS Code, and any other MCP-compatible client. Fixes silent empty-response bug in reasoning models.

基本信息

分类

AI 与智能体

许可证

NOASSERTION

运行时

node

传输方式

stdio

发布者

Leonfinn

提交者

Leonfinn

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "together-ai": {
      "command": "node",
      "args": [
        "/absolute/path/to/together-ai-mcp/index.js"
      ],
      "env": {
        "TOGETHER_API_KEY": "your_api_key_here",
        "IMAGE_OUTPUT_DIR": "/path/to/save/images"
      }
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Together.ai MCP?

Together.ai MCP is a Node.js Model Context Protocol (MCP) server that exposes Together AI's inference endpoints — chat completions, image generation, vision, and embeddings — as tools callable from Claude Desktop, Cursor, VS Code, and any other MCP-compatible client.

How to use Together.ai MCP?

Install Node.js 18+, obtain a Together AI API key, clone the repository, run npm install, copy .env.example to .env, add your API key, then configure the server in your MCP client (e.g., Claude Desktop) by adding a together-ai entry to the JSON config with the path to index.js and required environment variables.

Key features of Together.ai MCP

  • Chat completions with any Together AI text or reasoning model
  • Correctly handles reasoning models that write output to non-standard fields
  • Image generation via FLUX, SDXL models, saved as PNG files
  • Vision analysis using Llama 3.2 Vision or Qwen 2.5 VL
  • Embeddings generation for RAG/retrieval pipelines
  • Uses direct fetch calls for vision and image generation to avoid SDK limitations

Use cases of Together.ai MCP

  • Use Claude Desktop, Cursor, or VS Code to chat with reasoning models like GLM-5, Qwen3.5, or MiniMax M2.5
  • Generate images from text prompts inside your MCP client
  • Ask a vision model questions about an image (public URL or local file)
  • Create text embeddings for semantic search or RAG without leaving your editor

FAQ from Together.ai MCP

What problem does the reasoning model fix solve?

Together AI’s reasoning models write chain-of-thought to non-standard fields (reasoning_content, reasoning) and exhaust the default 2048 token budget. This server raises max_tokens to 8192 and reads all three possible response fields so no model silently returns an empty answer.

Why are vision requests handled differently from chat?

The OpenAI SDK may silently omit stream: false, causing vision requests to fail with an opaque error. This server uses a raw fetch call with explicit stream: false and includes the full API error body in the exception.

What are the runtime and dependency requirements?

Node.js 18+ and a Together AI API key. The server depends on @modelcontextprotocol/sdk and the openai package (used with Together AI’s base URL).

Where are generated images saved?

Images are saved as PNG files to the directory specified by the IMAGE_OUTPUT_DIR environment variable.

Are there any model limitations I should know?

The server works with any model on Together AI’s serverless API. Models that require a dedicated endpoint (e.g., some Llama 4 variants) will return a 400 error. Use the correct tool for each model type: chat/reasoning models via together_chat, image via together_generate_image, vision via together_vision, and embeddings via together_embed.

评论

AI 与智能体 分类下的更多 MCP 服务器