- Home
- MCP servers
- Antigravity GLM
Antigravity GLM
- python
0
GitHub Stars
python
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"coreline-ai-antigravity_glm_mcp": {
"command": "/path/to/.venv/bin/python",
"args": [
"/path/to/antigravity_glm_mcp/src/server.py"
],
"env": {
"GLM_MODEL": "GLM-4.5",
"PYTHONPATH": "/path/to/antigravity_glm_mcp",
"GLM_BASE_URL": "https://api.z.ai/api/coding/paas/v4",
"PROJECT_ROOT": "/your/workspace",
"ZHIPU_API_KEY": "your-api-key"
}
}
}
}You can run the Antigravity GLM MCP server to bridge Gemini with the GLM-4.5 model, enabling automated, tool-driven workflows with strong security and reliability features. This MCP server lets you delegate complex tasks to GLM, manage memory and backups, and limit risky shell commands while exposing a powerful set of 25 tools for seamless automation.
How to use
Set up the MCP server to run locally or in your environment, then connect your MCP client to the local server using the standard MCP protocol configured for stdio in your environment. Start the server from your virtual environment and point your client to localhost or the appropriate host:port if you expose the MCP server over the network. The server exposes 25 tools that you can invoke from your MCP client to delegate tasks to GLM-4.5, perform file operations, run code in a sandbox, query memory, and manage data with automatic backups and secure execution.
How to install
Prerequisites: ensure you have Python 3.11 or newer installed. Create and activate a virtual environment for isolation.
Steps to install and run the MCP server locally are provided below. Follow these steps in order to get the server up and running quickly.
Install steps
# 1. Clone the project repository
git clone https://github.com/coreline-ai/antigravity_glm_mcp.git
cd antigravity_glm_mcp
# 2. Create and activate a virtual environment
python3.11 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# 3. Automated installation (recommended)
python scripts/install.py
Manual installation (alternative)
# Install dependencies
pip install -r requirements.txt
# MCP configuration file placement (example path)
# Add the following to your MCP settings file (e.g., ~/.gemini/settings.json)
The following example shows how to configure the MCP entry directly in a settings file. This is tailored for a local stdio-based run using a Python interpreter from a virtual environment and the main server script.
{
"mcpServers": {
"antigravity_glm_mcp": {
"command": "/path/to/.venv/bin/python",
"args": ["/path/to/antigravity_glm_mcp/src/server.py"],
"env": {
"PROJECT_ROOT": "/your/workspace",
"ZHIPU_API_KEY": "your-api-key",
"GLM_MODEL": "GLM-4.5",
"GLM_BASE_URL": "https://api.z.ai/api/coding/paas/v4",
"PYTHONPATH": "/path/to/antigravity_glm_mcp"
}
}
}
}
Security and usage notes
The server enforces a multi-layer security approach. Only commands registered in the whitelist can be executed, and sensitive environment variables are isolated to prevent leakage. Backups are automatically created before modifications, and a permanent memory store preserves context across sessions.
Environment and troubleshooting
Ensure your environment variables are set as shown in the example configuration. If you encounter startup issues, verify the virtual environment is active, and the Python path in the command matches your setup. Check that the API key and model settings are correct, and that the base URL points to the GLM service you intend to use.
Available tools
glm_cmd
Delegates complex tasks to GLM with context and task instructions. Enables structured prompting and controlled delegation.
glm_bypass
Sends raw prompts directly to GLM, bypassing higher-level abstractions for specialized use cases.
glm_image_analyze
Performs image analysis using Vision capabilities with image_path and prompt parameters.
glm_file_read
Reads file contents with path and encoding options.
glm_file_create
Creates a new file with specified content and overwrite behavior.
glm_file_edit
Edits a file by replacing old_string with new_string.
glm_file_delete
Deletes a file and preserves a backup.
glm_file_rollback
Restores a previous version of a file by path and version.
glm_dir_list
Lists directory contents with path and optional recursive traversal.
glm_grep
Searches files using a regular expression pattern.
glm_code_run
Executes Python code in a sandbox with a timeout.
glm_shell_exec
Runs whitelisted shell commands from a controlled whitelist.
glm_git_status
Shows the status of a Git repository at a given path.
glm_git_commit
Commits changes with a message and optional add_all flag.
glm_git_log
Displays Git commit history with options for count and formatting.
glm_git_diff
Shows differences between working tree states with options.
glm_http_request
Performs HTTP requests with SSRF protection and method/body controls.
glm_web_search
Executes web searches via DuckDuckGo with query and result limits.
glm_memory_save
Saves persistent memory under a key with category tagging.
glm_memory_get
Retrieves a memory value by key.
glm_memory_list
Lists memory entries by category with limit control.
glm_memory_delete
Deletes a memory entry by key.
glm_db_query
Runs SQLite queries against a specified database path.
glm_schedule_task
Schedules a task with cron-like expressions and actions.
glm_action_log
Provides logs of agent actions with filters for limit and type.