
akalaric/mcp-wolframalpha 是从 https://github.com/akalaric/mcp-wolframalpha. 导入的 MCP 服务器候选
概览
akalaric/mcp-wolframalpha 是从 https://github.com/akalaric/mcp-wolframalpha. 导入的 MCP 服务器候选
概述(AI 翻译)
无缝将Wolfram Alpha集成到您的聊天应用中。
该项目实现了一个MCP(模型上下文协议)服务器,设计用于与Wolfram Alpha API接口。它使基于聊天的应用程序能够执行计算查询并检索结构化知识,促进了高级对话能力。
其中包含一个通过LangChain使用Gemini的MCP-客户端示例,演示如何将大型语言模型连接到MCP服务器,实现与Wolfram Alpha知识引擎的实时交互。
特色
-
**Wolfram|用于数学、科学和数据查询的Alpha积分。
-
模块化架构 易于扩展以支持更多 API 和功能。
-
多客户端支持 无缝处理多个客户端或接口的交互。
-
MCP-客户端示例,使用Gemini(通过LangChain)。
-
UI 支持 使用 Gradio 提供用户友好的网页界面,与 Google AI 和 Wolfram Alpha MCP 服务器交互。
安装
克隆收回
设置环境变量
基于示例创建一个 .env 文件:
- WOLFRAM_API_KEY=your_wolframalpha_appid
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MCP Wolfram Alpha (Server + Client)
Seamlessly integrate Wolfram Alpha into your chat applications.
This project implements an MCP (Model Context Protocol) server designed to interface with the Wolfram Alpha API. It enables chat-based applications to perform computational queries and retrieve structured knowledge, facilitating advanced conversational capabilities.
Included is an MCP-Client example utilizing Gemini via LangChain, demonstrating how to connect large language models to the MCP server for real-time interactions with Wolfram Alpha’s knowledge engine.
Features
-
Wolfram|Alpha Integration for math, science, and data queries.
-
Modular Architecture Easily extendable to support additional APIs and functionalities.
-
Multi-Client Support Seamlessly handle interactions from multiple clients or interfaces.
-
MCP-Client example using Gemini (via LangChain).
-
UI Support using Gradio for a user-friendly web interface to interact with Google AI and Wolfram Alpha MCP server.
Installation
Clone the Repo
git clone https://github.com/ricocf/mcp-wolframalpha.git
cd mcp-wolframalpha
Set Up Environment Variables
Create a .env file based on the example:
-
WOLFRAM_API_KEY=your_wolframalpha_appid
-
GeminiAPI=your_google_gemini_api_key (Optional if using Client method below.)
Install Requirements
pip install -r requirements.txt
Install the required dependencies with uv:
Ensure uv is installed.
uv sync
Configuration
To use with the VSCode MCP Server:
- Create a configuration file at
.vscode/mcp.jsonin your project root. - Use the example provided in
configs/vscode_mcp.jsonas a template. - For more details, refer to the VSCode MCP Server Guide.
To use with Claude Desktop:
{
"mcpServers": {
"WolframAlphaServer": {
"command": "python3",
"args": [
"/path/to/src/core/server.py"
]
}
}
}
Client Usage Example
This project includes an LLM client that communicates with the MCP server.
Run with Gradio UI
- Required: GeminiAPI
- Provides a local web interface to interact with Google AI and Wolfram Alpha.
- To run the client directly from the command line:
python main.py --ui
Docker
To build and run the client inside a Docker container:
docker build -t wolframalphaui -f .devops/ui.Dockerfile .
docker run wolframalphaui
UI
- Intuitive interface built with Gradio to interact with both Google AI (Gemini) and the Wolfram Alpha MCP server.
- Allows users to switch between Wolfram Alpha, Google AI (Gemini), and query history.
Run as CLI Tool
- Required: GeminiAPI
安装
docker run wolframalphaui配置
{
"mcpServers": {
"WolframAlphaServer": {
"command": "python3",
"args": [
"/path/to/src/core/server.py"
]
}
}
}