PETSc Claude code generator server#

http://mcp.petsc-ai.org:8083/mcp or https://mcp.petsc-ai.org:8446/mcp

Provides a MCP agent that generates PETSc examples

Purpose#

The purpose of this MCP agent is to enable the implementation of “higher-level” PETSc MCP agents that need to have trustworthy code generated and tested for them.

Usage#

The MCP agent may be tested from the command line using

python petsc_claude_code_generator_mcp_client.py [--stdio] [--url PETSC_MCP_SERVERS_URL] --generate_code request

The client Python file also contains a PetscClaudeCodeGeneratorMCPClient() class that connects to the server and has a (mirror) method for each tool provided by the server.

To start the MCP server locally

python CLAUDE_API_KEY=zzz petsc_claude_coder_generator_mcp_server.py [--stdio]

Limitations#

This is not fully featured, more just a proof of principle, it essentially just asks Claude to generate code and then does some very rundamentary checking of the code.