Skip to content

rhennigan/MCPServer

Repository files navigation

GitHub license Wolfram Version

Implements a Model Context Protocol (MCP) server using Wolfram Language, enabling LLMs to access Wolfram Language computation capabilities.

Features

  • Create custom MCP servers with tailored tools
  • Easily integrate with popular AI assistants like Claude and Cursor
  • Use Wolfram Language's computational power directly in AI conversations
  • Pre-configured servers for common use cases

Requirements

  • Wolfram Language 14.2 or higher
  • Claude Desktop, Cursor, or other MCP-compatible client applications

Installation

Install the Paclet

PacletInstall["Wolfram/MCPServer"]

Load the Package

Needs["Wolfram`MCPServer`"]

Quick Start

Using Pre-configured Servers

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

Creating Custom Servers

  1. Create an MCP server with custom tools using LLMConfiguration:
config = LLMConfiguration[<|
    "Tools" -> {LLMTool["PrimeFinder", {"n" -> "Integer"}, Prime[#n]&]}
|>];

server = CreateMCPServer["My MCP Server", config]
(* Out: MCPServerObject[...] *)
  1. 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

Supported Clients

Claude Desktop

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

Cursor

Install an MCP server for use in Cursor:

InstallMCPServer["Cursor", server]
(* 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

Advanced Usage

For more details on creating custom MCP servers, configuring tools, and advanced options, please refer to the documentation.

Development

See CLAUDE.md for development guidelines and commands.

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

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •