3,400+ MCP servers ready to use
Vinkius
M

Bring Ai21
to Mastra AI

Learn how to connect AI21 Labs to Mastra AI and start using 10 AI agent tools in minutes. Fully managed, enterprise secure, and ready to use without writing a single line of code.

Ai21 Chat CompletionAi21 Contextual AnswersAi21 Delete FileAi21 Get FileAi21 Grammar CorrectionAi21 List FilesAi21 Paraphrase TextAi21 Segment TextAi21 Summarize TextAi21 Text Improvements

What is the AI21 Labs MCP Server?

Connect your AI agent to the AI21 Studio API and take full control of state-of-the-art Natural Language Processing (NLP) workflows through natural conversation.

What you can do

  • Chat Orchestration — Leverage the blazing-fast Jamba models (e.g., jamba-1.5-mini) to generate high-fidelity conversational responses and structured text programmatically
  • Task-Specific NLP Intelligence — Access pre-trained specific endpoints to summarize long texts, correct grammar, paraphrase styles, and segment topics without complex prompting
  • Document Intelligence & RAG — Programmatically manage your AI21 workspace library and extract high-fidelity contextual answers based strictly on provided documents
  • Stylistic Optimization — Use specialized tools for text improvements and paraphrasing to coordinate your brand's digital voice across multiple languages
  • Infrastructure Monitoring — Manage uploaded files and verify account-level API connectivity directly through your agent for instant performance reporting

How it works

1. Subscribe to this server
2. Retrieve your API Key from the AI21 Studio dashboard
3. Start orchestrating your language intelligence from Claude, Cursor, or any MCP client

No more manual toggling between writing tools or guessing complex prompt instructions. Your AI acts as your dedicated linguistic engineer and document architect.

Who is this for?

  • Writers & Editors — instantly improve fluency and correct grammar of raw drafts using natural language commands
  • Researchers — summarize lengthy document chunks and segment specific topics without leaving your creative workspace
  • Developers — integrate high-speed Jamba models and RAG capabilities into custom workflows through simple AI queries

Built-in capabilities (10)

ai21_chat_completion

g. jamba-1.5-mini) to generate a conversational response. Generate chat completions

ai21_contextual_answers

Answer questions based on context

ai21_delete_file

Delete a file

ai21_get_file

Get file details

ai21_grammar_correction

Grammatical error correction

ai21_list_files

List uploaded files

ai21_paraphrase_text

Paraphrase text

ai21_segment_text

Segment text by topic

ai21_summarize_text

Summarize text

ai21_text_improvements

Suggest stylistic improvements

Why Mastra AI?

Mastra's agent abstraction provides a clean separation between LLM logic and AI21 Labs tool infrastructure. Connect 10 tools through Vinkius and use Mastra's built-in workflow engine to chain tool calls with conditional logic, retries, and parallel execution. deployable to any Node.js host in one command.

  • Mastra's agent abstraction provides a clean separation between LLM logic and tool infrastructure. add AI21 Labs without touching business code

  • Built-in workflow engine chains MCP tool calls with conditional logic, retries, and parallel execution for complex automation

  • TypeScript-native: full type inference for every AI21 Labs tool response with IDE autocomplete and compile-time checks

  • One-command deployment to any Node.js host. Vercel, Railway, Fly.io, or your own infrastructure

M
See it in action

AI21 Labs in Mastra AI

AI AgentVinkius
High Security·Kill Switch·Plug and Play
Why Vinkius

AI21 Labs and 3,400+ other MCP servers. One platform. One governance layer.

Teams that connect AI21 Labs to Mastra AI through Vinkius don't need to source, host, or maintain individual MCP servers. Every tool call runs inside a hardened runtime with credential isolation, DLP, and a signed audit chain.

3,400+MCP Servers ready
<40msCold start
60%Token savings
Raw MCP
Vinkius
Server catalogFind and host yourself3,400+ managed
InfrastructureSelf-hostedSandboxed V8 isolates
Credential handlingPlaintext in configVault + runtime injection
Data loss preventionNoneConfigurable DLP policies
Kill switchNoneGlobal instant shutdown
Financial circuit breakersNonePer-server limits + alerts
Audit trailNoneEd25519 signed logs
SIEM log streamingNoneSplunk, Datadog, Webhook
HoneytokensNoneCanary alerts on leak
Custom domainsNot applicableDNS challenge verified
GDPR complianceManual effortAutomated purge + export
Enterprise Security

Why teams choose Vinkius for AI21 Labs in Mastra AI

The AI21 Labs MCP Server runs on Vinkius-managed infrastructure inside AWS — a purpose-built runtime with per-request V8 isolates, Ed25519 signed audit chains, and sub-40ms cold starts. All 10 tools execute in hardened sandboxes optimized for native MCP execution.

Your AI agents in Mastra AI only access the data you authorize, with DLP that blocks sensitive information from ever reaching the model, kill switch for instant shutdown, and up to 60% token savings. Enterprise-grade infrastructure, zero maintenance.

AI21 Labs
Fully ManagedVinkius Servers
60%Token savings
High SecurityEnterprise-grade
IAMAccess control
EU AI ActCompliant
DLPData protection
V8 IsolateSandboxed
Ed25519Audit chain
<40msKill switch
Stream every event to Splunk, Datadog, or your own webhook in real-time

* Every MCP server runs on Vinkius-managed infrastructure inside AWS - a purpose-built runtime with per-request V8 isolates, Ed25519 signed audit chains, and sub-40ms cold starts optimized for native MCP execution. See our infrastructure

The Vinkius Advantage

How Vinkius secures AI21 Labs for Mastra AI

Every tool call from Mastra AI to the AI21 Labs MCP Server is protected by DLP redaction, cryptographic audit chains, V8 sandbox isolation, kill switch, and financial circuit breakers.

< 40msCold start
Ed25519Signed audit chain
60%Token savings
FAQ

Frequently asked questions

01

How do I find my AI21 API Key?

Log in to the AI21 Studio Dashboard, click on your profile (top right), and navigate to API Keys to copy your token.

02

Can I use AI21 for RAG via AI?

Yes! The contextual_answers tool allows your agent to extract precise information from provided text context using high-fidelity RAG technology.

03

Does it support grammar correction?

Absolutely. Use the grammar_correction tool to fix spelling, syntax, and phrasing in your text programmatically.

04

How does Mastra AI connect to MCP servers?

Create an MCPClient with the server URL and pass it to your agent. Mastra discovers all tools and makes them available with full TypeScript types.

05

Can Mastra agents use tools from multiple servers?

Yes. Pass multiple MCP clients to the agent constructor. Mastra merges all tool schemas and the agent can call any tool from any server.

06

Does Mastra support workflow orchestration?

Yes. Mastra has a built-in workflow engine that lets you chain MCP tool calls with branching logic, error handling, and parallel execution.

07

createMCPClient not exported

Install: npm install @mastra/mcp