M
Mcpi
by @cachevector
Approximating Pi using Monte Carlo Method
Created 10/14/2025
Updated 2 months ago
README
Repository documentation and setup instructions
Approximating Pi using Monte Carlo Method
A simple c++ project that approximates the value of pi using the Monte Carlo method. It randomly samples points inside a unit square, checks how many fall within a quarter circle, and uses that ratio to estimate π.
The approximation is plotted using gnuplot to show how the value converges over time.
Plot
Here's what the output looks like after running the simulation:

Quick Setup
Installation guide for this server
Installation Command (package not published)
git clone https://github.com/cachevector/mcpi
Manual Installation: Please check the README for detailed setup instructions and any additional dependencies required.
Cursor configuration (mcp.json)
{
"mcpServers": {
"cachevector-mcpi": {
"command": "git",
"args": [
"clone",
"https://github.com/cachevector/mcpi"
]
}
}
}