MCP HubMCP Hub
SecretiveShell

MCP-wolfram-alpha

by: SecretiveShell

Connect your chat repl to wolfram alpha computational intelligence

23created 20/12/2024
Visit
Wolfram
chatbot

📌Overview

Purpose: The MCP-wolfram-alpha framework is designed to enable seamless interaction with the Wolfram Alpha API, providing enhanced query capabilities for data retrieval.

Overview: This framework serves as a middleware between user queries and the Wolfram Alpha API, allowing users to easily retrieve answers to their questions through simple function calls. With a user-friendly setup and essential configuration steps, it ensures that developers can integrate Wolfram Alpha's computational knowledge directly into their applications.

Key Features:

  • Prompt Functionality: Allows users to format their queries for the Wolfram Alpha API effectively, making it easy to invoke the service with natural language input.

  • API Query Tool: Provides a straightforward function to handle queries to the Wolfram Alpha API, streamlining the process of retrieving information and facilitating quick responses to user inquiries.


MCP-wolfram-alpha

A MCP server to connect to Wolfram Alpha API.

Components

Prompts

This is analogous to the !wa bang in DuckDuckGo search.

def wa(query: str) -> f"Use wolfram alpha to answer the following question: {query}"

Tools

Query Wolfram Alpha API.

def query_wolfram_alpha(query: str) -> str

Configuration

You must set the WOLFRAM_API_KEY environment variable. Get an API key from Wolfram Alpha.

This was tested with the full results API, but it might not be required.

{
    "mcpServers": {
        "MCP-wolfram-alpha": {
            "command": "uv",
            "args": [
                "--directory",
                "C:\\Users\\root\\Documents\\MCP-wolfram-alpha",
                "run",
                "MCP-wolfram-alpha"
            ],
            "env": {
                "WOLFRAM_API_KEY": "your-app-id"
            }
        }
    }
}

Development

Debugging

Since the official MCP inspector does not have good environment support, it is recommended to use wong2's mcp-cli-inspector.

Create a config.json file in the same style as Claude desktop.

{
    "mcpServers": {
        "MCP-wolfram-alpha": {
            "command": "uv",
            "args": [
                "--directory",
                "/full/path/to/MCP-wolfram-alpha",
                "run",
                "MCP-wolfram-alpha"
            ],
            "env": {
                "WOLFRAM_API_KEY": "your-app-id"
            }
        }
    }
}

Then run:

npx @wong2/mcp-cli -c .\config.json