Quick Start for AI Coding Applications
Quick Start for AI Coding Applications
| Recommended Server | Best Practices for AI-Assisted Development |
| Installation | Security Considerations |
| Configuring AI Guidance with AGENTS.md | Troubleshooting |
This guide walks you through setting up the Wolfram MCP Server with AI coding applications like Claude Code, Cursor, Visual Studio Code, and others. By the end, your AI coding assistant will be able to evaluate Wolfram Language code, search documentation, read and write notebooks, run tests, and inspect code.
For Wolfram Language development, it's recommended to use the WolframLanguage server. It gives the AI the ability to:
All installation methods use the InstallMCPServer function. Open a Wolfram Language session and run the appropriate command for your application.
Claude Code
Choose whether to install the server globally or project-level. Global installation is available in all projects, while project-level installation is available only in a specific project directory.
InstallMCPServer["ClaudeCode", "WolframLanguage"]InstallMCPServer[{"ClaudeCode", "/path/to/project"}, "WolframLanguage"]Cline
InstallMCPServer["Cline", "WolframLanguage"]Copilot CLI
InstallMCPServer["CopilotCLI", "WolframLanguage"]Cursor
InstallMCPServer["Cursor", "WolframLanguage"]Gemini CLI
InstallMCPServer["GeminiCLI", "WolframLanguage"]Google Antigravity
InstallMCPServer["Antigravity", "WolframLanguage"]Kiro
InstallMCPServer["Kiro", "WolframLanguage"]InstallMCPServer[{"Kiro", "/path/to/project"}, "WolframLanguage"]OpenAI Codex
InstallMCPServer["Codex", "WolframLanguage"]OpenCode
Choose whether to install the server globally or project-level. Global installation is available in all projects, while project-level installation is available only in a specific project directory.
InstallMCPServer["OpenCode", "WolframLanguage"]InstallMCPServer[{"OpenCode", "/path/to/project"}, "WolframLanguage"]Visual Studio Code
Choose whether to install the server globally or project-level. Global installation is available in all projects, while project-level installation is available only in a specific project directory.
InstallMCPServer["VisualStudioCode", "WolframLanguage"]InstallMCPServer[{"VisualStudioCode", "/path/to/project"}, "WolframLanguage"]Windsurf
InstallMCPServer["Windsurf", "WolframLanguage"]Zed
InstallMCPServer["Zed", "WolframLanguage"]Other Clients
For other MCP-compatible clients, you can generate the raw JSON configuration and adapt it manually:
MCPServerObject["WolframLanguage"]["JSONConfiguration"]Verifying the Installation
After installing, restart your coding tool and confirm the Wolfram tools are available. Most applications have a way to list configured MCP servers and their status. If you're unsure, you can always just ask the AI:
AI coding tools start each session with no memory of previous conversations. An
file (or similar project-level instructions file) at the root of your project gives the AI essential context about your codebase, conventions, and how to use the Wolfram Language tools effectively.
Note for Claude Code users: Claude Code uses a
file for project instructions rather than
. If your project only uses Claude Code, you can name your instructions file
instead. If you use multiple AI coding tools and want to maintain a single source of truth, you have two options:
Why AGENTS.md Matters
What to Include
Available Tools
| WolframLanguageContext |
Semantic search across Wolfram resources (documentation, function repository, data repository, neural net repository, and more)
|
| WolframLanguageEvaluator | Execute Wolfram Language code |
| ReadNotebook |
Read Wolfram notebooks (.nb) as markdown
|
| WriteNotebook | Convert markdown to Wolfram notebooks |
| SymbolDefinition | Look up symbol definitions in readable format |
| CodeInspector | Inspect code for issues and return a formatted report |
| TestReport |
Run Wolfram Language test files (.wlt)
|
AGENTS.md Template
# AGENTS.md
## Overview
Brief description of what your project does.
## Development
Always use the WolframLanguageContext tool when working with Wolfram Language code
to look up documentation and find relevant functions before writing code.
When you make changes to source code, write and run tests using the TestReport tool
and check your work with the CodeInspector tool.
## Project Structure
- `Kernel/` - Main source files
- `MyPaclet.wl` - Entry point
- `Utilities.wl` - Helper functions
- `Tests/` - Test files (.wlt)
- `Documentation/` - Notebooks and docs
## Code Style
- Use `UpperCamelCase` for public function names
- Use `lowerCamelCase` for internal function names
- Use `Enclose`/`Confirm` for error handling:
```wl
myFunction[arg_] := Enclose[
Module[{result},
result = ConfirmBy[computation[arg], StringQ];
result
]
];
```
## Writing Tests
Write tests in this format:
```wl
VerificationTest[
input,
expected,
TestID -> "DescriptiveTestID"
]
```
Test files go in the `Tests/` directory with a `.wlt` extension.
## Key Patterns
Describe any project-specific patterns, conventions, or architectural decisions
that the AI should follow.
Import[PacletObject["Wolfram/AgentTools"]["AssetLocation", "AGENTS.md"], "Text"]Keeping AGENTS.md Up to Date
A few minutes spent updating
after significant changes saves time in future sessions by preventing the AI from making outdated assumptions.
Test-Driven Development
Use Planning Mode
This lets the AI explore the codebase, understand existing patterns, and propose an approach for your review before making changes.
Note: Many applications support a built-in "planning mode" that switches it into a mode that is optimized for this type of work. If your application supports this, you should use it to plan the implementation before writing code.
Avoiding "Context Rot" in Large Tasks
AI coding tools have finite context windows. When implementing large features, accumulated context can degrade performance as the conversation grows. Many tools offer mitigation strategies—context compression, sub-agents, task management—but these rely on AI deciding what information matters. Mistakes compound over time, leading to progressively worse results.
For complex features spanning multiple sessions, a manual approach to context management often works better. Here we'll describe an example workflow that efficiently manages context. The core idea: instead of continuing one long conversation, start fresh sessions with carefully curated context.
The Workflow
| Specs/FeatureName.md |
What to build (requirements, API, edge cases)
|
| TODO/FeatureName.md |
Tasks to complete (checklist)
|
| Progress/FeatureName.md |
What's been done (session summaries)
|
Each session, you provide these three files as context along with instructions to complete one task. After completing a task, the AI updates the progress log and task list, then you start a fresh session for the next task.
Create a Specifications Document
# Feature: CSV Import with Schema Validation
## Requirements
- Parse CSV files into lists of Associations
- Support custom column type specifications
- Validate data against provided schema
- Return Failure objects for invalid data
## API Design
```wl
CSVImportValidated[file, schema] (* returns {<|...|>, ...} or Failure *)
```
## Schema Format
```wl
<|"Name" -> "String", "Age" -> "Integer", "Score" -> "Real"|>
```
## Edge Cases
- Empty files return {}
- Missing columns return Failure["MissingColumn", ...]
- Type mismatches return Failure["TypeError", ...]
AI assistants can help draft this spec—ask them to propose an API design or identify edge cases you might have missed. However, iterate until every detail is correct. This spec becomes the source of truth for all implementation work, so inaccuracies here will propagate into the code.
Click here to view a real example used to implement a feature for the AgentTools paclet.
Generate a Task List
# TODO: CSVImportValidated
- [ ] Implement CSVImportValidated with basic parsing
- [ ] Add schema validation for String, Integer, Real types
- [ ] Write 12 tests, all passing
- [ ] Add support for DateObject columns
- [ ] Handle quoted strings with commas
- [ ] Add Options for delimiter and header row
- [ ] Verify all tests pass
- [ ] Update documentation
- [ ] Perform final review
Write Progress Reports
This log captures institutional knowledge that would otherwise be lost between sessions. After the first session:
# Progress: CSVImportValidated
## Session 1
Task: Implement CSVImportValidated with basic parsing
Status: Completed
Work completed:
- Created Kernel/CSVImportValidated.wl with basic parsing implementation
- CSVImportValidated currently returns a list of associations with no validation yet
...
Things learned:
- `FileFormatQ["path/to/file.csv", "CSV"]` can check if a file is a valid CSV file without fully importing it
Iteratively Implement Tasks
For each session, provide the three context files with instructions to complete one task. Save this as a reusable prompt file (e.g.,
):
## Context
@TODO/CSVImportValidated.md
@Specs/CSVImportValidated.md
@Progress/CSVImportValidated.md
## Instructions
1. Choose the next incomplete task from the task list
2. Study the specification requirements for that task
3. Implement the task
4. Append a progress report to Progress/CSVImportValidated.md
5. Mark the task complete in TODO/CSVImportValidated.md
6. Commit your changes
7. Stop and wait for user input
IMPORTANT: Complete only ONE task per session.
Best Practices
Start fresh sessions: After completing a task, start a new session with the same prompt rather than continuing. This prevents context accumulation.
Monitor and edit: Review changes to the progress file. When necessary, manually edit it to ensure good context for the next session—the AI may miss important details or include irrelevant information.
Stay involved: This approach works best when you're actively reviewing changes, not running unattended. Your judgment about what context matters is what prevents "context rot."
Automation: You can script this as a loop that runs until all tasks are checked off, but monitor the results carefully.
The WolframLanguageEvaluator and TestReport tools execute arbitrary Wolfram Language code. This means they can perform any action that a Wolfram kernel can perform, including:
Most AI coding applications support approval-based permissions that prompt you before the AI executes potentially dangerous tools. You should configure your application to require approval for these tools:
| WolframLanguageEvaluator | Executes arbitrary code |
| TestReport |
Runs test files (which execute code)
|
| WriteNotebook |
Writes notebook files, potentially overwriting
|
| CodeInspector |
Read-only, but reads file contents
|
| ReadNotebook |
Read-only, but reads file contents
|
| WolframLanguageContext | Read-only documentation search |
| SymbolDefinition | Read-only symbol definitions |
CodeInspector and ReadNotebook read file contents that are sent to your LLM provider. If your project contains sensitive information you wouldn't want included in LLM context, consider requiring approval for these tools as well. Note that these tools are designed for Wolfram Language files and notebooks respectively, so they will likely fail on other file types.
Prompt Injection Considerations
If your AI coding application has access to tools that fetch content from the web or other untrusted sources, be aware of prompt injection risks. Malicious content could instruct the AI to use other tools in unintended ways.
For example, SymbolDefinition is generally safe, but if the AI previously used WolframLanguageEvaluator to connect to a service (storing API keys in memory), a prompt injection attack could potentially instruct the AI to use SymbolDefinition to extract those values.
As a general rule: if you auto-approve any tools that read untrusted external content, consider requiring approval for all other tools that could expose sensitive information.
Server not connecting
- Fully restart your coding application after installation (closing the window often just minimizes it to the system tray)
- Manually inspect the configuration file returned by InstallMCPServer to ensure the server is configured correctly
- Check your client's documentation for location of log files or other diagnostic information to check for errors
WolframLanguageContext not working as expected
The WolframLanguageContext tool requires an LLM Kit subscription for best results. Without it, documentation search will be less accurate. Code execution (WolframLanguageEvaluator) and other tools work without LLM Kit.
Server is using the wrong version of Wolfram Language
The installed MCP server will use the same version of Wolfram Language as the session it was installed from. If you want to use a different version of Wolfram Language, you need to install the MCP server in a session of that version or manually edit the configuration file to point to a different Wolfram kernel.




