How to Use the Gainsight CS MCP in Pydantic AI
Build correct and type-safe Gainsight CS agents with Pydantic AI. Stop guessing and get validated data structures for every API call.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Gainsight CS MCP to Pydantic AI
Create your Vinkius account to connect Gainsight CS to Pydantic AI and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Enforce Correctness at Runtime
This is for developers who hate silent failures. When your agent calls `get_company_health`, Pydantic AI validates the response against a strict Pydantic model. If the API returns an unexpected field or the wrong data type, your code will raise a `ValidationError` immediately. No more defensive coding or checking if a key exists. You know the data shape is correct because the framework guarantees it. This lets you build internal tools that are predictable and far easier to maintain.
Build Reliable CS Workflows with Pydantic AI
Create agents that operate on data you can trust. An agent can `list_timeline_events` for a customer, and you know for a fact that every event in the list will have the fields you expect. This reliability is critical for chained operations. For example, an agent can confidently pull an ID from a `list_calls_to_action` call and pass it to `get_cta_metadata`. The strict typing means you won't get halfway through a workflow only to have it crash because of a missing ID or a null value where you expected a string.
A Model-Agnostic MCP Connection
Pydantic AI doesn't lock you into one LLM provider. You can use this Gainsight CS MCP server with OpenAI, Anthropic, Gemini, or a local model. The `MCPToolset` provides a unified interface that just works. This setup gives you the freedom to choose the right model for the job—maybe a fast one for simple tasks like `get_my_identity` and a more powerful one for summarizing data from `list_timeline_events`. The MCP integration remains the same.
Set up Gainsight CS MCP in Pydantic AI
Prerequisites
- Python 3.10+ installed
-
pydantic-ai-slim[fastmcp]package - Active Vinkius subscription with a valid endpoint token
- 1
Install Pydantic AI with FastMCP
Run
pip install "pydantic-ai-slim[fastmcp]". The FastMCP toolset replaces the deprecatedMCPServerHTTPclass with full protocol support. - 2
Configure the FastMCPToolset
Pass a JSON-style config dict to
FastMCPToolsetwith your Vinkius URL. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. Supports Streamable HTTP, SSE, and Stdio transports. - 3
Create and run your agent
Pass the toolset to
Agent(toolsets=[toolset])and callagent.run(). Swapopenai:gpt-4ofor any supported model — Anthropic, Google, Mistral, or Groq.
from pydantic_ai import Agent
from pydantic_ai.toolsets.fastmcp import FastMCPToolset
toolset = FastMCPToolset({
"mcpServers": {
"gainsight-cs-mcp": {
"url": "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
}
}
})
agent = Agent(
"openai:gpt-4o",
toolsets=[toolset],
system_prompt="You have access to Gainsight CS tools.",
)
result = await agent.run("List recent Gainsight CS transactions")
print(result.output) Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Gainsight CS. 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 Gainsight CS MCP in Pydantic AI
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Gainsight CS MCP today
We host it, we monitor it, we maintain it. You just paste one token.