How to Use the NAICS/SIC Classification API MCP in Pydantic AI
Get type-safe industry classifications for your Pydantic AI agents. Stop worrying about bad data from API calls.
Works with every AI agent you already use
…and any MCP-compatible client
Connect NAICS/SIC Classification API MCP to Pydantic AI
Create your Vinkius account to connect NAICS/SIC Classification API 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.
Get Validated Data Structures, Every Time
The main reason to use this server with Pydantic AI is correctness. When your agent calls `get_classification_details`, the JSON response is automatically parsed and validated against a Pydantic model. You get a clean, typed object to work with. If the API ever returns an unexpected field or a malformed code, your agent won't silently fail or pollute your database. Instead, it will raise a `ValidationError` immediately. This forces you to handle data integrity issues head-on, which is exactly what you want for financial or compliance applications.
Search NAICS/SIC with Any LLM
This MCP server gives your agent direct access to `search_naics_codes` and `search_sic_codes`. Your agent can find industry classifications based on plain text descriptions. The tools are simple, focused, and do one thing well. Pydantic AI is model-agnostic, so you can pair this server with OpenAI, Anthropic, Gemini, or a local model. The tool-calling and validation logic works the same way everywhere. You get the safety of Pydantic without being locked into a specific AI provider.
Simple and Direct Integration
There's no complex setup here. You point the `MCPToolset` to the server's URL, and Pydantic AI handles the rest. It fetches the tool definitions and makes them available to your agent. All the messy parts of function calling are abstracted away. Your agent's code becomes much cleaner. You just tell it what you want—for instance, "Find the NAICS code for 'Custom Computer Programming Services'"—and it knows to call the `search_naics_codes` tool. The framework handles the API call, the response parsing, and the validation.
Set up NAICS/SIC Classification API 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": {
"naicssic-classification-api-mcp": {
"url": "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
}
}
})
agent = Agent(
"openai:gpt-4o",
toolsets=[toolset],
system_prompt="You have access to NAICS/SIC Classification API tools.",
)
result = await agent.run("List recent NAICS/SIC Classification API 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 Brand.dev. 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 NAICS/SIC Classification API MCP in Pydantic AI
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the NAICS/SIC Classification API MCP today
We host it, we monitor it, we maintain it. You just paste one token.