How to Use the Capacities MCP in Mastra AI
Build resilient backend agents that manage your Capacities knowledge base using Mastra AI's workflow engine.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Capacities MCP to Mastra AI
Create your Vinkius account to connect Capacities to Mastra AI and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Automate knowledge graph creation
The `create_object` tool lets your Mastra agent systematically add new items to Capacities. You can build workflows that pull from other data sources—like a CRM or a database—and automatically populate your knowledge graph. Because you're using Mastra, your agent can handle failures. If the `create_object` call fails, the workflow engine can retry it or branch to a different logic path, like logging the error and notifying an admin.
Sync external data with Capacities
Use the `lookup` and `get_object` tools to check if data already exists before you create it. Your agent can search for an item by its title, and if it's not found, use `save_weblink` or `create_object` to add it. This is perfect for building sync jobs with this MCP Server. A workflow could run daily, find new articles from an RSS feed, and use `save_weblink` to add each one to a specific Capacities space, tagging them with `add_tag`.
Build intelligent reporting with Mastra AI
Your agent can inspect the structure of a knowledge base before acting. The `get_space_info` tool gives you a complete picture of a space's object types and their properties. A workflow could use `get_structures` to understand the data model, then use `lookup` to fetch all objects of a certain type. Finally, it could format a report and append it to a specific note using `save_to_daily_note`.
Set up Capacities MCP in Mastra AI
Prerequisites
- Node.js 18+ and a TypeScript project
-
@mastra/mcp+@mastra/corepackages - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
npm install @mastra/mcp @mastra/coreplus your preferred model provider (e.g.@ai-sdk/openai). - 2
Configure the MCPClient
Create an
MCPClientwith your Vinkius endpoint as aURLobject. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. - 3
Discover and inject tools
Call
mcpClient.listTools()and spread the result into your agent'stoolsobject. All Capacities tools become native Mastra tools. - 4
Run with any model
Swap
openai("gpt-4o")for any AI SDK-compatible provider. Callagent.generate()and the agent routes tool calls through MCP automatically.
import { MCPClient } from "@mastra/mcp";
import { Agent } from "@mastra/core/agent";
import { openai } from "@ai-sdk/openai";
const mcpClient = new MCPClient({
id: "capacities-mcp-client",
servers: {
"capacities-mcp": {
url: new URL(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
),
},
},
});
const agent = new Agent({
name: "Capacities Agent",
model: openai("gpt-4o"),
instructions: "You have access to Capacities tools.",
tools: {
...(await mcpClient.listTools()),
},
});
const result = await agent.generate(
"List recent Capacities transactions"
);
console.log(result.text); Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Capacities. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about Capacities MCP in Mastra AI
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Capacities MCP today
We host it, we monitor it, we maintain it. You just paste one token.