MCP Python Installation Guide
About 2 min
MCP Python Installation Guide
1. Python Environment Installation
Recommended Version: Python 3.9.12 or 3.9.13
Option 1: Install via Anaconda (Recommended)
Use Case: For users requiring a complete scientific computing environment
- Download Links:
Installation Steps:
- Double-click the installer to run it.
- Select the "Just Me" installation mode.
- It is recommended to keep the default installation path (
C:\Users\<Username>\Anaconda3
). - Check "Add Anaconda3 to my PATH environment variable."
- After installation, verify in the Start Menu:
- Open
Anaconda Prompt
. - Execute
python --version
, which should display 3.9.12/3.9.13.
- Open
Option 2: Portable Python (No Installation Required)
Use Case: For quick deployment or restricted environments
- Download Link: Portable Python python.zip
- Usage Steps:
- Unzip the file to any directory (avoid paths with Chinese characters or spaces).
- Configure environment variables:
- Add the directory containing
python.exe
(e.g.,D:\python\
) to the system PATH.
- Add the directory containing
- Verify installation: Run
python --version
in the command line.
2. MCP Environment Configuration
2.1 Obtain the MCP Package
- Download
mcp_excel_xxx.zip
and unzip it.- Obtain the
mcp_excel_xxx.zip
file (Download Link) and unzip it to a suitable directory.
- Obtain the
Note: The installation package already includes Excel and Python programming support.
- Recommended path:
C:\mcp_excel\
or under the user directory.
2.2 Development Environment Configuration
VSCode Configuration
Install VSCode: Official Download Link
Open the Project:
code C:\mcp_excel
Essential Plugins:
- Python extension (ms-python.python)
Environment Configuration:
- Press
Ctrl+Shift+P
→ SelectPython: Select Interpreter
. - Choose Python 3.9.x interpreter.
- Press
PYTHONPATH Setup:
- Modify
.vscode/settings.json
:{ "python.pythonPath": "python", "python.analysis.extraPaths": [ "${workspaceFolder}/lib/X64", "${workspaceFolder}" ] }
Note: For 32-bit systems, replace with
lib/win32
.- Modify
Verify Installation:
- Run
example/calendar/calendar_demo.py
. - There should be no errors, and calendar data should be output.
- Run
PyCharm Configuration
Create a New Project:
- Select the unzipped
mcp_excel
directory. - Choose Python 3.9.x as the interpreter.
- Select the unzipped
Configure Paths:
File → Settings → Project → Python Interpreter
.- Click the gear icon →
Show All...
→ Add the following paths:C:\mcp_excel\lib\X64 C:\mcp_excel
Run Tests:
- Right-click
calendar_demo.py
→Run
. - Check if the output is normal.
- Right-click
3. Common Issues
DLL Load Failure:
- Confirm system architecture (64-bit requires the X64 directory).
- Install VC++ Runtime: Download Link.
Python Version Mismatch:
conda create -n mcp python=3.9.12 conda activate mcp
Path Issues:
- Avoid paths with Chinese characters or spaces.
- Run the IDE with administrator privileges.
4. Verification
# Test in the Python interactive environment
from mcp.tools import McpCalendar, McpVersion
calendar = McpCalendar()
date = calendar.ValueDate('2025-08-11')
version = McpVersion()
print("MCP Python version: ", version)
print("MCP Python calendar works!")
print(date)
Technical Support: For issues, contact the Meridian team at support@meridian.com.cn.