ProfyGlitch — Leverage every capability: MCPs, CLI, REST API, . It turns your free chatbots into ai agents
ProfyGlitch is a local-first AI gateway that helps developers and teams transform browser-based chat models into practical agents for coding, testing, and automation. Rather than paying for closed APIs, ProfyGlitch lets you leverage existing browser chat sessions, run agents against local repositories, and extend capabilities with modular components.
This article covers everything: the Model Context Protocol servers (MCPs) ProfyGlitch supports, the built-in CLI, the REST API, extension points, security model, and real-world examples you can run today.
Overview: components and goals
- Local Gateway: runs on your machine, proxies browser chat sessions, and exposes agent endpoints for your tooling.
- MCPs (Model Context Protocol servers): adapters that standardize different model providers into a single runtime interface so agents can switch providers transparently.
- CLI: developer-facing commands to bootstrap agents, run tests, and manage sessions.
- REST API: programmatic surface for automation, CI integration, and remote orchestration.
- Plugin/Connector system: easily add new model providers, analytics hooks, and agent behaviors.
Model Context Protocols (MCPs)
MCPs are the glue that let ProfyGlitch “speak” to many models in a uniform way. An MCP adapter translates provider-specific interactions (web chat DOM flows, websocket messages, or official APIs) into a consistent agent-level API:
- Context / state: maintain conversation history, tool calls, and local file references.
- Streaming: handle incremental model outputs for live previews and progressive actions.
- Tool-calls: models can request running shell commands, reading files, or executing tests via safe, auditable hooks.
ProfyGlitch ships with MCP adapters for browser-based chat flows (browser DOM-driven connectors), and a pluggable MCP layer to add official APIs when available. The MCP abstraction makes it easy to swap providers or run fallback providers without changing your agents.
CLI — commands developers use everyday
The ProfyGlitch CLI is the fastest path from repo to agent. Common commands:
pg start— start the local gateway and load configured MCP adapters.pg stop— stop the gateway gracefully.pg ls— list active agents, MCPs, and sessions.pg run <agent> [--repo=path]— run an agent against a repo path and stream results.pg proxy --port 8080— forward browser chat sessions through the local gateway (for browser-based connectors).pg token renew|revoke— manage local session tokens for integrations.
CLI usage examples
Start the gateway and run a quick lint agent:
pg start
pg run lint-agent --repo=.
pg stop
REST API — automating agents and integrations
ProfyGlitch exposes a small REST API for automation and CI integration. Key endpoints (example surface):
POST /api/agents— create or run an agent with a specified MCP and behavior.GET /api/agents/{id}/status— check an agent’s status and last run metadata.POST /api/agents/{id}/invoke— invoke the agent against a repo snapshot or a code diff.GET /api/logs?agent={id}— stream agent logs for debugging.POST /api/webhooks— register webhooks for agent events (run.completed, run.failed, action.request).
Authentication & security: local-first, auditable, session-bound
Security is central. ProfyGlitch operates locally and respects your browser sessions:
- Session-bound connectors: browser-based MCPs use your active authenticated sessions; ProfyGlitch does not collect or transmit credentials centrally.
- Least-privilege tool-calls: agents request file access or command execution via auditable hooks; you approve or automate approvals for CI.
- Encrypted local storage: tokens and session metadata are encrypted at rest by default.
- Audit logs: every agent action (read, write, exec) is logged with a timestamp and session id for review.
Extensibility: plugins, connectors, and SDKs
ProfyGlitch is intentionally modular:
- MCP connectors: implement a small adapter interface to support a new model provider (browser or API-based).
- Agent behaviors: write reusable agent behaviors that implement common flows (lint, migrate, test, PR-summarize).
- REST/CLI hooks: use the REST API or CLI to integrate ProfyGlitch into CI pipelines and automation.
Example: agent that creates a PR from a bug description
- Developer opens a browser chat with a model and asks: “Fix failing tests in module X; create a PR.”
- ProfyGlitch’s MCP captures the request and creates an agent run via
POST /api/agents. - Agent runs tests locally, opens failing files, applies fixes in a sandbox branch, and produces a patch.
- Agent opens a draft PR and posts a summary back to the chat session. All steps are logged and can be replayed.
Architecture (high-level)
- Browser <-> Local Gateway (ProfyGlitch) — browser connectors forward chat streams to the gateway.
- Local Gateway <-> MCPs — MCP adapters normalize providers into a single runtime.
- Gateway <-> CLI / REST API — developer tools and automation surfaces.
- Gateway <-> Local FS / CI — agents run tool-calls (tests, linters) via sandboxed executors.
Quickstart (developers)
# clone
git clone https://github.com/Profy256/ProfyGlitch
cd ProfyGlitch
# run locally (requires node >= 18)
npm install
pg start
# proxy your browser chat session (follow README for browser setup)
pg proxy --port 8080
# run a sample agent
pg run summarize-pr --repo=../my-repo
Best practices and caveats
- Always review agent-produced patches before merging; agents accelerate iteration but human review prevents regressions.
- Use sandboxed environments in CI for automated runs that modify code.
- Keep sensitive tokens in secure storage; ProfyGlitch minimizes central collection but connector setup can create local tokens.
Contributing and roadmap
ProfyGlitch is designed to grow via community contributions: MCP connectors, agent templates, and integrations. Roadmap priorities include improved GUI for agent orchestration, official adapters for common cloud-based models, and tighter CI integrations.
Repository and resources
Code, issues, and installation instructions: https://github.com/Profy256/ProfyGlitch
Showcasing ProfyGlitch — Exploit everything: MCPs, CLI, REST API, and local agent orchestration. Try it: https://github.com/Profy256/ProfyGlitch #opensource #javascript #developer #ai


