# PETSc MCP Servers To improve the usefulness of AI assistants, LLMs, Agentic systems, etc for PETSc users and developers we are providing multiple PETSc-specific MCP (Module-Context-Protocal) servers. See . These MCP servers can be easily connected to your AI development tools to (hopefully) make the tools more powerful, more efficient, and far less error prone. We currently provide four servers. These - {any}`compile and run PETSc programs `, , - {any}`serve PETSc documentation `, , - {any}`provide RAG context for PETSc users and developers `, , - {any}`generate and tests PETSc examples (using Claude) `, . The servers can also be run locally on your machine by cloning `git@gitlab.com/petsc/petsc_mcp_servers` and installing some Python modules. These servers are experimental, we would love to hear feedback on them, suggestions for new features, and contributions at ## Quick-start for using with developer tools If running the MCP servers locally use `localhost` instead of `mcp.petsc-ai.org`. For Claude CLI: ``` claude mcp add-json PETSc-compile-run-MCP-server '{"type":"http","url":"http://mcp.petsc-ai.org:8080/mcp"}' claude mcp add-json PETSc-documentation-MCP-server '{"type":"http","url":"http://mcp.petsc-ai.org:8081/mcp"}' claude mcp add-json PETSc-RAG-MCP-server '{"type":"http","url":"http://mcp.petsc-ai.org:8082/mcp"} claude mcp add-json PETSc-Claude-code-generator-MCP-server '{"type":"http","url":"http://mcp.petsc-ai.org:8083/mcp"}' ``` For VSCode: - Run the **MCP: Open User Configuration** command from the **Command Palette**. - Paste the following snippet into the file. ``` { "servers": { "PETSc compile-run": { "type": "http", "url": "http://mcp.petsc-ai.org:8080/mcp" }, "PETSc documentation": { "type": "http", "url": "http://mcp.petsc-ai.org:8081/mcp" }, "PETSc RAG: { "type": "http", "url": "http://mcp.petsc-ai.org:8082/mcp" }, "PETSc Claude Code Generator: { "type": "http", "url": "http://mcp.petsc-ai.org:8083/mcp" } } ``` For Gemini CLI, add the following to ~/.gemini/settings.json file. ``` "mcpServers": { "PETSc compile-run MCP server": { "httpUrl": "http://mcp.petsc-ai.org:8080/mcp", "trust": true }, "PETSc documentation MCP server": { "httpUrl": "http://mcp.petsc-ai.org:8081/mcp", "trust": true }, "PETSc RAG MCP server": { "httpUrl": "http://mcp.petsc-ai.org:8082/mcp", "trust": true } "PETSc Claude code generator server": { "httpUrl": "http://mcp.petsc-ai.org:8083/mcp", "trust": true } ``` For Warp, use the Warp GUI "MCP Servers" option on the left panel ``` { "PETSc compile-run MCP server": { "url": "http://mcp.petsc-ai.org:8080/mcp" } } { "PETSc documentation MCP server": { "url": "http://mcp.petsc-ai.org:8081/mcp" } } { "PETSc RAG MCP server": { "url": "http://mcp.petsc-ai.org:8082/mcp" } { "PETSc Claude code generator server": { "url": "http://mcp.petsc-ai.org:8083/mcp" } } ```