Gravitas-Core-MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Gravitas-Core-MCP Start a new task to refactor the authentication module"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Gravitas-Core-MCP
Version: 0.1.0
Role: Core System Blueprint / Autonomous AI Control Plane
Target Platforms: VS Code (Cline / Claude Dev), Cursor, Windsurf, Claude Desktop
Production-grade, autonomous Model Context Protocol (MCP) server that elevates AI models from stateless code generators into persistent, self-verifying software engineers.
Features
Persistent memory — SQLite-backed task ledger, context snapshots, canonical state, failure memory, tool usage patterns
Cognitive control — Deterministic task state machine (PLANNING → CODING → EXECUTING → VERIFYING → COMPLETED / FAILED_RETRY / ROLLBACK), retry policies, rollback on repeated failures
Terminal engine — Shell execution with timeout, cwd isolation, allowlist/denylist, background process management
Browser engine — Playwright-based navigation, DOM snapshot, screenshots, console error streaming
Project intelligence — Recursive structure analysis with noise filtering (
.git,node_modules, build artifacts)Model handover — Auto-generated Model Resume Package (goal, task, constraints, failures, safe/do-not-touch files) for model swap, editor restart, or crash recovery
Related MCP server: trw-mcp
Requirements
Python 3.10+
UV (Astral) for install/run
Browser: Uses existing Chrome or Edge on your machine when available — no
playwright installrequired. If you have neither, runplaywright install chromiumonce.
Installation
No local install needed — run directly from GitHub (see Use it from GitHub below):
uvx run git+https://github.com/ahmed-coding/Gravitas-Core.gitOr install from PyPI:
# Install and run via uvx (no global install)
uvx Gravitas-Core-MCPOr install into a project:
uv add Gravitas-Core-MCP
# Then run: uv run Gravitas-Core-MCPBrowser tools: If you already have Chrome or Edge installed, nothing else is needed. Otherwise, run once: uv run playwright install chromium.
Use it from GitHub (direct configuration)
Run the server directly from this repository with no local installation — UV fetches the repo and runs it. Repository: ahmed-coding/Gravitas-Core.
The repo includes a GitHub Action (.github/workflows/ci.yml) that runs tests and verifies the server starts; you can see it in the Actions tab after push.
Run from GitHub with uvx
uvx run git+https://github.com/ahmed-coding/Gravitas-Core.gitOr pin a branch/tag:
uvx run "git+https://github.com/ahmed-coding/Gravitas-Core.git@main"
uvx run "git+https://github.com/ahmed-coding/Gravitas-Core.git@v1.1.0"MCP client config (GitHub direct)
Requires UV to be installed and uvx in your PATH. If you see spawn uvx ENOENT, use the localhost config below instead (no uv/uvx needed).
Cursor — e.g. ~/.cursor/mcp.json or .cursor/mcp.json:
{
"mcpServers": {
"gravitas-mcp": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/ahmed-coding/Gravitas-Core.git",
"Gravitas-Core-MCP"
]
}
}
}With a specific ref (branch or tag):
{
"mcpServers": {
"gravitas-mcp": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/ahmed-coding/Gravitas-Core.git@main",
"Gravitas-Core-MCP"
]
}
}
}Cloned repo (run from local path):
{
"mcpServers": {
"gravitas-mcp": {
"command": "/path/to/Gravitas-Core/.venv/bin/python",
"args": ["-m", "gravitas_mcp.server"]
}
}
}(Create the venv first: cd /path/to/Gravitas-Core && uv venv && uv sync, then use .venv/bin/python in command.)
Run from localhost (local clone)
Use the server from a clone on your machine so you can develop and test without GitHub.
1. Clone and install (one time)
git clone https://github.com/ahmed-coding/Gravitas-Core.git
cd Gravitas-Core
uv sync(If you don’t have UV: pip install uv or use python -m venv .venv && .venv/bin/pip install -e . and then use .venv/bin/python in the configs below.)
2. Run the server in a terminal (optional)
cd /path/to/Gravitas-Core
uv run python -m gravitas_mcp.serverOR with uvicorn
cd /path/to/Gravitas-Core
uv run python -m gravitas_mcp.mcp_webappThe server uses stdio; your MCP client (Cursor, etc.) will start it automatically when configured.
3. MCP config for localhost
Option A — Use this repo as the Cursor project (recommended)
Open the Gravitas-Core folder in Cursor. The project already includes .cursor/mcp.json so the gravitas MCP server runs from your local clone (no GitHub needed).
Option B — Use from any project (user-level config)
Copy this into ~/.cursor/mcp.json and replace YOUR_PATH with the full path to your clone (e.g. /home/ahmed/Desktop/Gravitas-MCP-Core or C:\Users\You\Gravitas-Core):
{
"mcpServers": {
"gravitas-mcp": {
"command": "YOUR_PATH/.venv/bin/python",
"args": ["-m", "gravitas_mcp.server"]
}
}
}On Windows use YOUR_PATH\\.venv\\Scripts\\python.exe and "args": ["-m", "gravitas_mcp.server"].
Option C — Use uv with project path (no venv path)
If Cursor runs the command with a fixed cwd, you can use:
{
"mcpServers": {
"gravitas-mcp": {
"command": "uv",
"args": ["run", "--project", "/path/to/Gravitas-Core", "python", "-m", "gravitas_mcp.server"]
}
}
}Replace /path/to/Gravitas-Core with your actual clone path.
Troubleshooting
Error | Fix |
| Cursor can’t find |
Server not starting | Ensure |
MCP client configuration
Blackbox / Cursor (user-level config)
Add to ~/.config/Code/User/globalStorage/blackboxapp.blackboxagent/settings/blackbox_mcp_settings.json:
{
"mcpServers": {
"gravitas-mcp": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/ahmed-coding/Gravitas-Core.git",
"Gravitas-Core-MCP"
]
}
}
}With a specific ref (branch or tag):
{
"mcpServers": {
"gravitas-mcp": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/ahmed-coding/Gravitas-Core.git@v1.1.0",
"Gravitas-Core-MCP"
]
}
}
}From local clone:
{
"mcpServers": {
"gravitas-mcp": {
"command": "/path/to/Gravitas-Core/.venv/bin/python",
"args": ["-m", "gravitas_mcp.server"],
"env": {
"PYTHONPATH": "/path/to/Gravitas-Core"
},
"type": "stdio"
}
}
}Cursor (project-level config)
Add to .cursor/mcp.json or .vscode/mcp.json:
{
"mcpServers": {
"gravitas-mcp": {
"command": "uvx",
"args": ["Gravitas-Core-MCP"]
}
}
}Repository structure
Gravitas-Core-MCP/
├── gravitas_mcp/
│ ├── __init__.py
│ ├── server.py # MCP entrypoint, tool wiring
│ ├── memory.py # SQLite persistence, task ledger, state APIs
│ ├── controller.py # State machine, retry/rollback
│ ├── terminal.py # Subprocess execution, allowlist/denylist
│ ├── browser.py # Playwright automation
│ └── project_intel.py # Structure analysis, noise filtering
├── pyproject.toml
├── README.md
├── LICENSE
└── .gitignoreTool contract
All tools return deterministic JSON:
{
"status": "success | failure",
"observations": {},
"errors": [],
"next_recommended_action": ""
}Mandatory tools (PRD)
Tool | Description |
| Last known state (snapshot + active task) |
| Last verified immutable state (rollback/recovery) |
| Record failed strategy/command |
| Load task context for resumption |
| Create task, state PLANNING |
| Move task to PLANNING/CODING/EXECUTING/VERIFYING/FAILED_RETRY/ROLLBACK/COMPLETED |
| Record step failure (may trigger rollback) |
| Run shell command with timeout |
| UI verification |
| Project structure with noise filtering |
| Model handover package |
Brain database
State is stored in .gravitas_brain.db in the project root (or cwd). Optional: add .gravitas_brain.db to .gitignore if you do not want to commit it.
License
MIT — Local-first, user-sovereign, safe by default.
Available Tools
21 toolsbrowser_get_console_errorsA
Return collected JS console errors since last navigate.
Inputs: no named parameters.
browser_hoverB
Hover over an element by CSS selector.
Inputs: selector (required).
browser_screenshotB
Take screenshot; optional path to save file.
Inputs: path.
browser_snapshotB
Capture DOM accessibility tree and console errors.
Inputs: no named parameters.
controller_create_taskC
Create a new task and set state to PLANNING.
Inputs: goal (required), task_id.
controller_get_stateC
Return current task state and policy info.
Inputs: task_id (required).
controller_record_step_failureB
Record a step failure; may trigger FAILED_RETRY or ROLLBACK.
Inputs: reason (required), task_id (required).
controller_transitionC
Transition task to a new state (PLANNING, CODING, EXECUTING, VERIFYING, FAILED_RETRY, ROLLBACK, COMPLETED).
Inputs: task_id (required), new_state (required).
get_canonical_stateA
Return the last verified, immutable working state for rollback/recovery.
Inputs: no named parameters.
get_last_stateA
Return the last known state (most recent snapshot + active task). Authoritative memory.
Inputs: no named parameters.
get_model_resume_packageB
Generate Model Resume Package for model swap/editor restart/crash recovery: goal, task, constraints, failures, safe/do-not-touch files.
Inputs: task_id.
memory_save_snapshotC
Save a context snapshot for current task (internal use).
Inputs: task_id (required), project_map (required), snapshot_id (required), do_not_touch (required), +1 more.
memory_set_canonicalC
Set the canonical (immutable) state to a snapshot (after verification).
Inputs: snapshot_id (required).
project_get_mapC
Recursive project structure with noise filtering.
Inputs: max_depth, max_entries, project_root.
record_failureC
Record a failed strategy/command to prevent repetition.
Inputs: reason (required), context (required).
resume_taskB
Load task and its context for resumption (model handover/restart).
Inputs: task_id (required).
terminal_executeB
Execute a shell command with timeout and cwd. Returns stdout, stderr, exit_code.
Inputs: command (required), cwd, timeout_sec.
terminal_list_backgroundA
List active background process ids.
Inputs: no named parameters.
terminal_start_backgroundC
Start a background process; use process_id to stop later.
Inputs: command (required), process_id (required), cwd.
terminal_stop_backgroundC
Terminate a background process by process_id.
Inputs: process_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Most tools have distinct purposes within their domains (browser, controller, terminal, state). However, `record_failure` and `controller_record_step_failure` overlap in concept, potentially causing confusion. The state retrieval tools (`get_canonical_state`, `get_last_state`, `get_model_resume_package`) are distinct but require careful reading of descriptions.
Naming is consistent within domains: browser_*, controller_*, terminal_*. However, across domains, there is inconsistency: some tools use verb_noun order (e.g., `browser_get_console_errors`) while others use noun_verb (e.g., `get_canonical_state`). The pattern is mostly predictable but not uniform.
21 tools is on the higher side but still reasonable for the server's scope, which includes browser automation, task management, terminal execution, and state persistence. Each tool has a clear role, and no tool feels redundant or out of place.
The tool set covers the core workflows: browser interaction, task lifecycle, terminal commands, and state recovery. Minor gaps exist (e.g., no file read/edit tool), but the server is focused on orchestration rather than full development, so these omissions are acceptable.
Maintenance
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Real-time planetary signal engine and Model Context Protocol (MCP) server for autonomous AI agents.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that turns multiple AI coding agents into a coordinated team that chats, debates, remembers, audits security, and works in parallel on the same project.MIT
- AlicenseBqualityBmaintenanceMCP server providing persistent engineering memory and spec-driven development workflows for AI coding agents, preserving learnings across sessions.41Business Source 1.1
- AlicenseNot gradedqualityDmaintenanceMCP server that provides persistent memory and contextual awareness to language models, enabling project onboarding, recall of architectural rules, and code consistency across sessions.32MIT
- AlicenseNot gradedqualityBmaintenanceProduction-ready MCP server providing RAG, hierarchical memory, and 8+ tools for AI agents via the Model Context Protocol.51Apache 2.0