Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

MCPClient

Guides

  • Thin MCP Client

Tech Notes

  • Client for a Python-made MCP server
  • Client for Docker MCP Toolkit

Symbols

  • MCPInitialize
  • MCPKill
  • MCPListTools
  • MCPStart
  • MCPToLLMTool
Client for Docker MCP Toolkit
Introduction
LLM invocations
MCP Setup and initialization
Stopping the MCP server process
Tools discovery and creation
​
Introduction
This notebook has a complete usage example of a thin Model Context Protocol (MCP) client of the Raku paclet "MCPClient".
The MCP server run in Docker -- see
Docker MCP Toolkit
.
"MCPClient" provides a set of functions for using MCP server's methods by converting them to
LLMTool
objects. Those objects can be used with Wolfram Language's Large Language Model (LLM) framework. (
LLMSynthesize
,
LLMFunction
,
LLMConfiguration
.)
MCP default profile in Docker's dashboard
In[1]:=
Install the paclet and load it
In[5]:=
PacletInstall["AntonAntonov/MCPClient"];​​Needs["AntonAntonov`MCPClient`"];
MCP Setup and initialization
Get a Docker profile file
In[7]:=
profileFile=FileNameJoin[{PacletFind["AntonAntonov/MCPClient"]〚1〛["Location"],"Resources","default_docker_profile.json"}];
Import the profile
In[8]:=
RunProcess[{"/usr/local/bin/docker","mcp","profile","import",profileFile}]
Out[8]=
ExitCode0,StandardOutputImported profile default-docker-profile,StandardError
Set the PATH variable (MacOSX in this example)
In[10]:=
SetEnvironment["PATH""/usr/local/bin:/usr/local/share/bin:/usr/local/sbin:"<>("PATH"/.GetEnvironment[])];​​"PATH"/.GetEnvironment[]
Out[11]=
/usr/local/bin:/usr/local/share/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
Setup MCP server process creation command elements
In[9]:=
cmd={"/usr/local/bin/docker","mcp","gateway","run","--profile","default-docker-profile"};
Create the MCP client object
In[12]:=
client=
MCPStart
[cmd,ProcessEnvironmentGetEnvironment[]];​​
Function[
][
]
Out[13]=
Initialize the client
In[14]:=
r=
MCPInitialize
[client,"Pause"10];​​
Function[
][
]
Out[15]=
Tools discovery and creation
Get the MCP server tools list
In[23]:=
mcpTools=
MCPListTools
[client,"Pause"8];​​Length[mcpTools]
Out[24]=
75
Make a table of the tool records (only using names and descriptions)
In[40]:=
tblTools=mcpTools//​​Map[KeyTake[#,{"name","description"}]&,#]&//​​Tabular;​​Dimensions[tblTools]​​RandomSample[tblTools,5]//SortBy[#,#name&]&
Out[41]=
{75,2}
Out[42]=
Tabular
Row count: 5
Column count: 2

Show tools for official GitHub MCP server
In[43]:=
Select[tblTools,StringContainsQ[#description,"GitHub"]&]
Out[43]=
Tabular
Row count: 33
Column count: 2

Make LLMTool objects
In[44]:=
tools=
MCPToLLMTool
[client,mcpTools];​​Short@tools
Out[45]//Short=
Make a configuration with the tools
In[46]:=
conf=LLMConfiguration["Model"{"OpenAI","gpt-5.3-chat-latest"},"MaxTokens"8192,"Tools"tools];
In[57]:=
conf=LLMConfiguration["Model"{"OpenAI","gpt-5.4-mini"},"MaxTokens"8192,"Tools"tools];
LLM invocations
Find the unaccepted GitHub Pull Requests (PRs) -- using the tool "list_pull_requests"
In[47]:=
LLMSynthesize["Which of my -- antononcube -- GitHub pull requests are pending?",LLMEvaluatorconf]
Out[47]=
You currently have **1 open (pending) pull request** on GitHub:​- Repo: ollama/ollama PR #13778 — “Request to add community integration: Raku's ‘WWW::Ollama’” Created: 2026-01-19 Link: https://github.com/ollama/ollama/pull/13778 ​That’s the only open PR under your username right now. If you expected more, they’re likely already merged, closed, or opened under a different account/org.
Create an LLM function that is assumed to invoke the GitHub MCP server tool "list_branches"
In[101]:=
fGHB=LLMFunction[{​​"Give the branches of the Repo: `1`.",​​"Separate feature from bugfix branches.",​​LLMPrompt["NothingElse"]["JSON"]​​},​​"JSON",​​LLMEvaluatorconf];
Get branches data of a repository
Process the result and make a corresponding graph
Stopping the MCP server process
Kill the MCP client process
In[102]:=
MCPKill[client]

© 2026 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com