Skip to content

WolframResearch/AgentTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,180 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub license Wolfram Version

A Wolfram Language toolkit for integrating with AI agents and LLMs — providing MCP servers, agent skills, and other standard interfaces that give AI systems access to Wolfram's computational capabilities.

Table of Contents

Features

  • Predefined servers for common use cases (general computation, Wolfram|Alpha queries, development)
  • Semantic search across Wolfram documentation and Wolfram|Alpha results
  • Code evaluation with Wolfram Language directly in AI conversations
  • Notebook support for reading and writing Wolfram notebooks
  • Custom servers with tailored tools for specific needs
  • Wide client support including Claude Desktop, Cursor, VS Code, and more
  • MCP prompts for enhanced context and workflows
  • MCP Apps for interactive UI resources in supported clients (e.g., embedded notebook viewers, Wolfram|Alpha result displays)
  • MCP Roots support so the server, evaluator, and external tools (TestReport and similar) resolve relative paths against the client's project directory
  • Agent Skills for distributing Wolfram tools as portable skills to AI coding agents (Claude Code, Cursor, Gemini CLI, VS Code, and more)
  • Paclet extensions allowing third-party paclets to contribute MCP tools, prompts, and servers via the "AgentTools" extension
  • Docker image for running the MCP server in a container without a local Wolfram Engine installation

Requirements

Installation

Install the Paclet

PacletInstall["Wolfram/AgentTools"]

Load the Package

Needs["Wolfram`AgentTools`"]

Docker Image

A prebuilt Docker image is available as an alternative to a local Wolfram Engine installation. See Docker documentation for setup and MCP client configuration examples.

docker pull ghcr.io/wolframresearch/mcpserver:latest

Quick Start

Install a Wolfram MCP server for Claude Desktop:

InstallMCPServer["ClaudeDesktop"]
(* Out: Success["InstallMCPServer", <|...|>] *)

After restarting Claude Desktop, it will have access to Wolfram knowledge and tools:

Claude Desktop Screenshot

To install a specific server type:

InstallMCPServer["ClaudeDesktop", "WolframLanguage"]

To uninstall:

UninstallMCPServer["ClaudeDesktop"]              (* Remove all servers *)
UninstallMCPServer["ClaudeDesktop", "Wolfram"]   (* Remove specific server *)

Predefined Servers

AgentTools includes four predefined server configurations, each optimized for different use cases:

Server Best For Tools
Wolfram (default) General-purpose use combining computational power with natural language WolframContext, WolframLanguageEvaluator, WolframAlpha
WolframAlpha Natural language queries without code execution WolframAlphaContext*, WolframAlpha
WolframLanguage Wolfram Language development and learning WolframLanguageContext, WolframLanguageEvaluator, ReadNotebook, WriteNotebook, SymbolDefinition, CodeInspector, TestReport
WolframPacletDevelopment Developing and maintaining Wolfram paclets All WolframLanguage tools plus documentation tools (CreateSymbolDoc, EditSymbolDoc, EditSymbolDocExamples) and paclet release tools (CheckPaclet, BuildPaclet, SubmitPaclet)

*Requires LLMKit subscription

Install a specific server:

InstallMCPServer["ClaudeDesktop", "WolframLanguage"]

See docs/servers.md for detailed information about each server and guidance on choosing the right one.

Supported Clients

AgentTools can be installed into the following MCP client applications:

Client Name Project Support
Claude Code "ClaudeCode" Yes
Claude Desktop "ClaudeDesktop" No
Cline "Cline" No
Copilot CLI "CopilotCLI" No
Cursor "Cursor" No
Gemini CLI "GeminiCLI" No
Goose "Goose" No
Google Antigravity "Antigravity" No
OpenAI Codex "Codex" Yes
OpenCode "OpenCode" Yes
Visual Studio Code "VisualStudioCode" Yes
Windsurf "Windsurf" No
Zed "Zed" Yes

Project-Level Installation

Clients with project support can have servers installed for specific projects:

InstallMCPServer[{"ClaudeCode", "/path/to/project"}, "WolframLanguage"]

Claude Desktop

Claude Desktop offers an excellent integration experience with AgentTools, providing seamless access to Wolfram Language's computational capabilities.

Cursor

Install an MCP server for use in Cursor:

InstallMCPServer["Cursor"]
(* Out: Success["InstallMCPServer", <|...|>] *)

Check the MCP tab in Cursor settings to verify the server connection:

Cursor MCP Settings Screenshot

Your Wolfram tools will now be available in Cursor agent chat:

Cursor MCP Chat Screenshot

Other Clients

AgentTools works with any stdio-based MCP client. See docs/mcp-clients.md for manual configuration instructions.

Available Tools

AgentTools provides a variety of tools organized by category:

Context Tools (Semantic Search)

Search Wolfram resources using semantic similarity:

  • WolframContext - Combines the functionality of WolframLanguageContext and WolframAlphaContext in a single tool
  • WolframAlphaContext - Semantic search of Wolfram|Alpha results (requires LLMKit)
  • WolframLanguageContext - Semantic search of Wolfram Language documentation and other resources

Note: Since WolframContext combines the other two, a server should only include one of these three tools. Without LLMKit, WolframContext is effectively the same as WolframLanguageContext since the Wolfram|Alpha semantic search functionality is disabled.

Documentation search includes the Function Repository, Data Repository, Neural Net Repository, Paclet Repository, and more.

While only WolframAlphaContext requires an LLMKit subscription, having LLMKit greatly improves search results for all context tools by enabling reranking and filtering.

Code Execution Tools

  • WolframLanguageEvaluator - Execute Wolfram Language code with time constraints
  • WolframAlpha - Natural language queries to Wolfram|Alpha
  • SymbolDefinition - Retrieve symbol definitions in readable markdown format

Notebook Tools

  • ReadNotebook - Read Wolfram notebooks (.nb) as markdown text
  • WriteNotebook - Convert markdown to Wolfram notebooks

Testing Tools

  • TestReport - Run Wolfram Language test files (.wlt) and return reports

Code Analysis Tools

  • CodeInspector - Inspect Wolfram Language code for issues and return formatted reports

Documentation Tools (Paclet Development)

  • CreateSymbolDoc - Create new symbol documentation pages
  • EditSymbolDoc - Edit existing symbol documentation pages
  • EditSymbolDocExamples - Edit example sections of documentation

Paclet Release Tools (Paclet Development)

  • CheckPaclet - Check a paclet for issues before building or submission
  • BuildPaclet - Build a .paclet archive for distribution
  • SubmitPaclet - Submit a paclet to the Wolfram Language Paclet Repository

MCP Apps Tools

  • NotebookViewer - Embed interactive Wolfram Cloud notebooks inline
  • MCPAppsTest - Diagnostic tool for testing the MCP Apps pipeline

Note: MCP Apps tools require a client that supports the io.modelcontextprotocol/ui extension. When UI support is available, the WolframAlpha and WolframLanguageEvaluator tools are automatically enhanced with interactive notebook viewers. See docs/mcp-apps.md for details.

See docs/tools.md for detailed information about each tool.

Creating Custom Servers

Create custom MCP servers with your own tools using LLMConfiguration:

config = LLMConfiguration[<|
    "Tools" -> {LLMTool["PrimeFinder", {"n" -> "Integer"}, Prime[#n]&]}
|>];

server = CreateMCPServer["My MCP Server", config]
(* Out: MCPServerObject[...] *)

Install for use in Claude Desktop:

InstallMCPServer["ClaudeDesktop", server]
(* Out: Success["InstallMCPServer", <|...|>] *)

After restarting Claude Desktop, your custom tools will be available:

Claude Desktop Screenshot

You can also mix predefined tools with custom tools:

CreateMCPServer["My MCP Server", <|
    "Tools" -> {
        "WolframLanguageEvaluator",  (* Predefined tool *)
        "WolframAlpha",               (* Predefined tool *)
        LLMTool["MyCustomTool", ...]  (* Custom tool *)
    }
|>];

API Reference

Core Functions

Function Description
CreateMCPServer[name, config] Create a custom MCP server
InstallMCPServer[client] Install the default server for a client
InstallMCPServer[client, server] Install a specific server for a client
UninstallMCPServer[client] Remove all servers from a client
UninstallMCPServer[client, name] Remove a specific server from a client
DeployAgentTools[target] Deploy tools to a client with tracked deployment management
ValidateAgentToolsPacletExtension[paclet] Validate an "AgentTools" paclet extension
DeployedAgentTools[] List all tracked deployments
CreatePreferencesContent[] Build the preferences panel UI for managing deployed Wolfram toolsets (see docs/preferences-content.md)

Deployment Objects

Symbol Description
AgentToolsDeployment[...] Data structure representing a tracked tool deployment
DeployedAgentTools[] List all deployments
DeployedAgentTools[client] List deployments for a specific client

Server Objects

Symbol Description
MCPServerObject[...] Data structure representing an MCP server
MCPServerObjectQ[expr] Test if an expression is a valid server object
MCPServerObjects[] List all created server objects (includes paclet-backed servers)

Predefined Resources

Symbol Description
$DefaultMCPServers Association of predefined server configurations
$DefaultMCPTools Association of available tool definitions
$DefaultMCPToolOptions Association of default tool option values
$DefaultMCPPrompts Association of available prompt definitions

Options

CreateMCPServer

Option Default Description
OverwriteTarget False Overwrite an existing server with the same name
IncludeDefinitions True Include function definitions in the serialized server
Initialization None Code to evaluate when the server starts

InstallMCPServer

Option Default Description
"EnableMCPApps" True Enable or disable MCP Apps UI resources
"DevelopmentMode" False Use local source files instead of installed paclet
"MCPServerName" Automatic Override the config file key for the server entry
"ToolOptions" <||> Customize built-in tool behavior (see docs/tools.md)
"VerifyLLMKit" True Check LLMKit subscription requirements

Development

See the developer documentation for information on:

For AI agents working on this codebase, see AGENTS.md.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Richard Hennigan (Wolfram Research)

About

Implements a model context protocol server using Wolfram Language

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors