Skip to main content
Glama
README.md
# GEO Agent MCP

A lightweight, standalone backend that lets authorized AI agents learn GEO standards, load organization-specific configuration, and follow a reviewed GEO workflow.

## Implemented capabilities

- **Agent access and learning:** bearer-token REST API, MCP stdio tools, versioned GEO Skills and organization/site configuration.
- **Workflow:** persisted standard GEO runs with ordered steps and timestamped submissions.
- **GEO site audit:** optional adapter to the open-source GEO Optimizer package. It audits the configured site only when the workflow is at the audit step and the site's allowed actions include `audit`.
- **Independent review:** a separate reviewer token protects review decisions. The execution agent cannot submit its own review through the workflow API.
- **Feedback:** review history is returned to the agent; NEEDS_REVISION and BLOCKED runs can be resubmitted at the current step.
- **Anomaly review:** agents can report anomalies with evidence; reviewers can confirm, dismiss or resolve them.
- **Recommendations:** agents can create recommendations with evidence and acceptance criteria; reviewers can approve or reject them.
- **Minimal console:** a small operator page at `/` for viewing workflows, feedback, anomalies and recommendations.

## Workflow

`learn → configure → audit → content → independent review → recommend`

The agent executes GEO work and submits results. A separate reviewer identity must approve the content stage before the workflow can proceed to recommendations.

## Quick start

```bash
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev,geo-audit]"
export GEO_AGENT_API_TOKEN="$(python -c 'import secrets; print(secrets.token_urlsafe(32))')"
export GEO_REVIEW_TOKEN="$(python -c 'import secrets; print(secrets.token_urlsafe(32))')"
uvicorn geo_agent.api.app:app --reload
```

Use different random values for agent and reviewer tokens. The default local database is SQLite. Set `DATABASE_URL` to a PostgreSQL DSN for deployment.

Open `http://127.0.0.1:8000/` for the minimal console.

## MCP

Run the stdio MCP server:

```bash
geo-agent-mcp
```

The MCP process is intended to be launched by a trusted local agent host. The REST API uses the agent bearer token. Independent review is intentionally exposed through the separately authenticated REST reviewer endpoint, not the execution-agent MCP tools.

## REST API

Agent token required:
- `GET /api/v1/access`
- `GET /api/v1/skills` and `GET /api/v1/skills/{skill_id}`
- `GET /api/v1/config`, `PUT /api/v1/config`, `POST /api/v1/config/validate`
- `POST /api/v1/workflows`
- `GET /api/v1/workflows/{run_id}`
- `POST /api/v1/workflows/{run_id}/steps/{step_id}`
- `POST /api/v1/site-audits`
- `GET /api/v1/workflows/{run_id}/feedback`
- `POST /api/v1/anomalies`, `GET /api/v1/anomalies`
- `POST /api/v1/recommendations`, `GET /api/v1/recommendations`

Reviewer token required:
- `POST /api/v1/workflows/{run_id}/review`
- `POST /api/v1/anomalies/{anomaly_id}/review`
- `POST /api/v1/recommendations/{recommendation_id}/decision`

All protected endpoints use `Authorization: Bearer <token>`, with `GEO_AGENT_API_TOKEN` for agents and `GEO_REVIEW_TOKEN` for reviewers. The reviewer token must be different from the agent token.

## Scope and limitations

- One configured organization context per deployment in this version; this is not yet a hosted multi-tenant SaaS.
- MCP stdio should only be exposed to a trusted local process.
- Workflow submissions are agent-driven; there is no autonomous scheduler or LLM runtime in this backend.
- Review decisions are separated by credential, but reviewer identities and fine-grained roles are not yet managed individually.
- Recommendations require evidence references but the backend does not independently verify the truth of external evidence.
- The GEO Optimizer adapter runs technical audits; it does not guarantee ChatGPT inclusion, ranking or citations.
- No website publishing is performed.

## Development

```bash
pytest
ruff check .
```

See [docs/architecture.md](docs/architecture.md), [docs/roadmap.md](docs/roadmap.md) and [docs/THIRD_PARTY_NOTICES.md](docs/THIRD_PARTY_NOTICES.md).

TDQS

B3/5.0

Scored across 13 tools

Disambiguation4/5

Most tools map to a distinct resource+action (config get/save, workflow start/get/submit, anomaly report/list, recommendation create/list). Two overlaps soften this: geo_learn combines listing and retrieval in one tool, and geo_get_workflow already returns "review feedback" while geo_get_feedback separately retrieves reviewer feedback for a workflow run, leaving an agent unsure which to call.

Naming Consistency4/5

The geo_ prefix is applied uniformly and most names follow verb_noun (get_config, save_config, start_workflow, run_site_audit, create_recommendation). Minor deviations: geo_access and geo_learn are verb-only without a clear object, and geo_run_site_audit breaks the two-token pattern.

Tool Count5/5

Thirteen tools is comfortably within a well-scoped range and each maps to a recognizable stage of the GEO workflow lifecycle (onboard, learn, configure, run, review, report). No filler or obviously redundant duplicate tools.

Completeness3/5

The create/list/read surface is covered for anomalies and recommendations, and the workflow has start/get/submit, but lifecycle ends are thin: no way to cancel or abandon a workflow run, no tool to list workflow runs, and anomalies/recommendations can only be created and listed with no update or resolve operation (status changes are implied to happen outside this server).

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues