NetLogo MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| JAVA_HOME | Yes | Path to the Java JDK installation directory | |
| NETLOGO_HOME | Yes | Path to the NetLogo installation directory |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| open_modelB | Open an existing .nlogo model file. |
| commandB | Execute a NetLogo command (e.g. 'setup', 'go', 'create-turtles 10'). |
| reportA | Evaluate a NetLogo reporter expression and return its value. |
| run_simulationB | Run the simulation for N ticks and collect reporter data each tick. |
| watch_simulationA | Run the simulation SLOWLY so a human can watch it in the GUI window. Unlike run_simulation (full speed, returns data), this steps |
| set_parameterB | Set a NetLogo global variable / slider / switch value. |
| get_world_stateA | Get the current world state: tick count, agent counts, world dimensions. Returns JSON with ticks, turtle/patch/link counts, and world bounds. |
| get_patch_dataA | Get patch data as a 2D grid (useful for heatmaps / spatial analysis). |
| get_agent_sampleA | Return a sample of agents with selected variables as a markdown table. Filling the gap between |
| export_viewA | Export the current NetLogo view as a PNG image. Returns the image so Claude can see the model visualization. |
| create_modelA | Create a new NetLogo model from code and load it. |
| update_modelA | Update the currently loaded model's code in place and reload it. Prefer this over create_model when iterating on an existing model: the same .nlogox file is rewritten and reloaded, so the NetLogo window stays on one model and the models directory doesn't grow a new file per iteration. |
| list_modelsA | List all .nlogo model files in the configured models directory. Returns a JSON array of {name, path, size_kb} objects. |
| save_modelA | Save NetLogo model code to a .nlogox file in the models directory. This saves the model so you can open it in the NetLogo desktop app for live visualization with GUI, sliders, and real-time animation. |
| export_worldA | Export the full world state to a CSV file. Saves all turtle, patch, and link data. Useful for checkpointing a simulation or analyzing the complete state offline. Returns the path to the exported CSV file. |
| close_modelA | Unload the currently loaded model and reset the workspace. Useful when you want to discard pending state (mid-run agents, set parameters, pending plots) and start fresh, or before opening a new model file from disk to make sure cached compilation state isn't carried forward. Note: this does NOT shut down the JVM or NetLogo workspace — only the
model. The next |
| server_infoA | Return a snapshot of the running NetLogo MCP server's configuration. Useful as a no-cost health check for the AI / user — returns the server version, configured paths, GUI mode, currently-loaded model, and whether a NetLogo headless launcher is reachable for BehaviorSpace runs. No JVM round-trip; this is a pure config / filesystem inspection so it works even before the workspace is fully initialized. |
| search_comsesC | Search the CoMSES Net computational model library. |
| get_comses_modelC | Get detailed metadata for a specific CoMSES model. |
| download_comses_modelA | Download and safely extract a COMSES model archive. Standalone "fetch but don't open" tool. Most AI flows should use
Safety guarantees:
|
| open_comses_modelA | Download (or reuse cache), then open a COMSES model ready to use. This is the single entry point most AI flows should call. Behavior:
Returns JSON with:
|
| read_comses_filesA | Return text contents of source and documentation files from a downloaded COMSES model. The model MUST already be downloaded by The AI should pass the Behavior:
|
| list_experimentsA | List BehaviorSpace experiments saved inside a NetLogo model file. Reads the Returns JSON: |
| preview_experimentA | Show the run plan for a BehaviorSpace experiment WITHOUT executing it. Use this before
Returns JSON with the resolved spec, |
| run_experimentA | Run a BehaviorSpace experiment headlessly and return summarized results. Two ways to specify the experiment:
Variable shapes (Cartesian product of all expanded values is run for each repetition):: Long-run controls:
- The launcher runs in a SEPARATE JVM, so the GUI workspace this server is hosting is unaffected. Run before calling this only matters insofar as the model file must be saved on disk (it is, after open_model / create_model / open_comses_model). Returns JSON with: |
| generate_audienceA | Generate and save a synthetic audience from a YAML spec. The audience is a frozen, seeded population of personas plus a social network — the same spec always produces the same people, so campaign variants can be tested against an identical audience. |
| list_audiencesB | List saved synthetic audiences. |
| get_audienceA | Show a saved audience: spec summary, archetypes, and sample persona cards. |
| create_campaignA | Create and save a campaign (one audience x one or more ad/email variants). |
| list_campaignsA | List saved campaigns. |
| run_campaignA | Run a saved campaign against its audience and log every reaction. Runs every variant x replicate with a PAIRED design (identical audience, reach and network randomness per replicate across variants), so A/B differences are attributable to the creative. Cognition: personas react via the configured backend — a live local LLM when SYNTH_LLM_MODE=live (Ollama etc.), otherwise the deterministic heuristic model. |
| get_campaign_reportA | Generate the pre-flight report for a campaign that has been run. Includes: funnel with confidence intervals (simulated / calibrated / industry benchmark), segment breakdown, top objections with verbatim quotes, word-of-mouth stats, weak-point diagnosis, and the A/B verdict. Also writes an HTML version with interactive charts. |
| compare_campaign_variantsA | Paired A/B comparison of a campaign's variants (winner, lift, significance). Subset of get_campaign_report for quick checks. |
| interview_personaB | Ask a follow-up question to persona(s) — an on-demand focus group. |
| calibrateA | Calibrate simulated funnel rates to real-world levels. Two modes:
After calibrating, get_campaign_report shows a calibrated column. |
| market_infoA | Status of the market-simulation module: LLM config, saved audiences, campaigns, and where artifacts live. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| analyze_model | Step-by-step guide to understanding an existing NetLogo model. |
| create_abm | Template for building a new agent-based model from scratch. |
| explore_comses | Search CoMSES Net for a topic, pick the best NetLogo match, open it safely, and run a short baseline simulation — without ever fabricating NetLogo commands. |
| behaviorspace_experiment | Drive a BehaviorSpace experiment via headless NetLogo. Use this when the user wants to systematically explore parameters, not just a single run. Unlike a manual `parameter_sweep`, this uses NetLogo's BehaviorSpace via a separate headless JVM, which gives you parallel run scheduling and the canonical table-CSV output. |
| parameter_sweep | Template for systematic parameter exploration. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| primitives_reference | NetLogo primitives quick reference — commands, reporters, and syntax. |
| programming_guide | NetLogo programming guide — contexts, breeds, variables, control flow. |
| transition_guide | NetLogo 6 → 7 porting notes — the breaking changes that come up when loading old models (typically from CoMSES). Read this when an old model errors on a primitive or syntax that used to work. |
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Razee4315/NetLogo-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server