KosmoKrator

other

Mistralai MCP Integration for Vercel AI SDK

Connect Mistralai to Vercel AI SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.

7 functions 3 read 4 write API key auth

Connect Mistralai to Vercel AI SDK

Use KosmoKrator as a local integration gateway for Vercel AI SDK agents and scripts.

Create an MCP client that starts or connects to the KosmoKrator gateway for the selected integration. The gateway is local, scoped to this integration, and starts with --write=deny so Vercel AI SDK can inspect read-capable tools without receiving write access by default.

Mistralai MCP Config for Vercel AI SDK

Prefer CLI JSON calls when a workflow only needs one deterministic integration operation.

{
  "mcpServers": {
    "kosmokrator-mistralai": {
      "type": "stdio",
      "command": "kosmo",
      "args": [
        "mcp:serve",
        "--integration=mistralai",
        "--write=deny"
      ]
    }
  }
}

Run the Gateway Manually

kosmokrator mcp:serve --integration=mistralai --write=deny

Why Use KosmoKrator Here

Scoped tools

Expose only Mistralai instead of a broad multi-service tool list.

Local credentials

Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.

Write policy

Start read-only, then opt into ask or allow for trusted workspaces.

Mistralai Tools Visible to Vercel AI SDK

Vercel AI SDK sees stable MCP tool names generated from the Mistralai integration catalog.

MCP toolSource functionTypeDescription
integration__mistralai__mistralai_chat mistralai.mistralai_chat Write Generate a chat completion using a MistralAI model. Send a list of messages (with roles "system", "user", or "assistant") and receive a model-generated response. Use temperature to control creativity (0 = deterministic, 1 = creative).
integration__mistralai__mistralai_create_embedding mistralai.mistralai_create_embedding Write Generate text embeddings using a MistralAI embedding model. Converts text into numerical vectors for semantic search, similarity comparison, or clustering. Supports single strings or arrays of strings.
integration__mistralai__mistralai_list_models mistralai.mistralai_list_models Read List all models available in your MistralAI account. Returns model IDs, creation timestamps, and capabilities. Use this to discover which models you can use for chat completions or embeddings.
integration__mistralai__mistralai_finetune mistralai.mistralai_finetune Write Create a fine-tuning job on MistralAI. Upload training data and select a base model to create a custom fine-tuned model. The job runs asynchronously — check the returned job ID for status updates.
integration__mistralai__mistralai_list_agents mistralai.mistralai_list_agents Read List all MistralAI agents in your account. Returns agent IDs, names, models, and descriptions. Agents are AI assistants with custom instructions and tools.
integration__mistralai__mistralai_create_agent mistralai.mistralai_create_agent Write Create a new MistralAI agent. Specify a name, model, and instructions to define how the agent should behave. Agents are persistent AI assistants that can be used for conversations with custom personalities and capabilities.
integration__mistralai__mistralai_get_current_user mistralai.mistralai_get_current_user Read Get information about the currently authenticated MistralAI user. Returns account details, subscription tier, and usage information.

Related Mistralai Pages