Warning
Please note that this is not officially supported by Arista.
You might not want to do this in your production environment as it is not using a local LLM.
The free plan of Claude might cause anxiety!
Kudos to @burnyd for the inspiriation and for writing this blog post: https://danielhertzberg.net/posts/mcp-servers/
Expanding on that, I've added a few more API calls to be able to ask Claude to get connectivity monitor data, and create tags for Studios and dashboards, but obviously any API call can be added very easy with the @mcp.tool()
decorator.
To learn more about MCP please visit https://modelcontextprotocol.io/introduction.
1. Create a .env file like the following.
CVPTOKEN="Insert CloudVision Service account token here"
CVP="www.arista.io"
2. Download Claude Desktop
3. In Claude's developer settings update the claude_desktop_config.json and tell it to run your script like below:
{
"mcpServers": {
"CVP MCP Server": {
"command": "uv",
"args": [
"run",
"--with",
"fastmcp",
"fastmcp",
"run",
"/home/ansible/mcp-cvp-fun/mcp_server_rest.py"
]
}
}
}
4. Reload Claude and start prompting
Service accounts can be created from the Settings page where a service token can be generated as seen below: