Skip to content

Ogma MCP Server Setup ​

The Ogma MCP server (ogma-mcp) lets compatible AI assistants inspect project context and, when enabled, drive the embedded browser, send requests, run workflows, and collect evidence. Its note/todo tools are an in-memory MCP-session scratchpad, separate from the app's persistent Notes page.

MCP is for external tools such as Codex, Claude Code, Cursor, and other Model Context Protocol clients. It is not the same feature as the in-app Workspace AI assistant.

MCP settings in dark modeMCP settings in light mode

For the full resource and tool list, see MCP resources and tools.

Quick Start: Desktop App ​

  1. Start Ogma and open the project the agent should inspect.
  2. Open Settings > MCP, choose the required permissions, and save. Browser interaction requires Replay send.
  3. Click Start and copy the displayed endpoint, normally http://127.0.0.1:3000/mcp.
  4. Add it to your MCP client as a Streamable HTTP server.
  5. Ask the agent to call ogma_explain_capabilities and read ogma://project/current to check the connection and active project.

No separate binary build is needed for this route. For page navigation, forms, login journeys, and troubleshooting, see Browser automation with MCP.

Connection Addresses ​

SurfaceDefault addressPurpose
MCP transporthttp://127.0.0.1:3000/mcpNative MCP clients connect here.
Backend REST APIhttp://127.0.0.1:8181Standalone MCP's --api-url and the management/bridge routes below.
Proxy listener127.0.0.1:8080Captures browser traffic; this is not an MCP endpoint.

Desktop instances can assign the backend API port dynamically. Use the actual running instance's address for stdio/REST integrations, and the endpoint displayed in Settings for native MCP. A cloud chat service cannot reach your loopback address without a local client/connector.

The HTTP endpoint is stateful: let the client handle initialization and session headers. There is no separate legacy /sse endpoint. Custom clients should follow the MCP transport specification.

When to Use MCP ​

Use MCP when an external assistant should help you:

  • Summarize captured traffic.
  • Triage findings.
  • Draft evidence-based report text.
  • Review workflows and Replay sessions.
  • Prepare scoped actions that you explicitly approve.

Use Workspace AI when you want the embedded assistant window inside Ogma instead.

Standalone Requirements ​

Use stdio when your client needs to launch a local executable instead of connecting to the embedded HTTP endpoint.

  • Ogma backend running at its actual API address (CLI default: http://127.0.0.1:8181)
  • The ogma-mcp binary (built from source)

Build ​

bash
cargo build --locked --bin ogma-mcp --release

The default output is target/release/ogma-mcp (ogma-mcp.exe on Windows), unless your Cargo target directory is customized.

Run ​

bash
# Connect to Ogma running on the default port
./ogma-mcp

# Connect to a custom address
./ogma-mcp --api-url http://127.0.0.1:9090

# Use a larger body preview
./ogma-mcp --body-preview-bytes 2048

The server exits if it cannot reach the Ogma API. Configure the MCP client to launch this command; stdout carries MCP messages and stderr carries diagnostics. Stdio permissions come from its own flags, not the embedded MCP settings.

Tool Discovery ​

The current server always advertises its full tool catalogue. There is no tool-profile selector in Settings. Older --tool-profile, --mcp-tool-profile, and OGMA_MCP_TOOL_PROFILE values are accepted for compatibility but do not hide tools or grant permissions.

For a large catalogue, start with ogma_explain_capabilities and ogma_find_tools rather than guessing inputs. Search task keywords to shortlist tools, then query an exact tool name to inspect its contract. The browser and search dispatchers offer convenient entry points; dedicated tools remain available directly. See tool discovery and dispatch.

In-App MCP Settings ​

Packaged Ogma builds can manage MCP from Settings > MCP. Use the settings screen when you want Ogma to start or stop the embedded MCP process for the active instance.

Use the standalone ogma-mcp binary when your AI client expects to launch the MCP server directly.

Saving settings automatically restarts a running embedded MCP process. Reconnect clients afterward; old session IDs and confirmation tokens cannot be reused. Runtime diagnostics displays recent process output.

Ogma also exposes MCP management through its local REST API. These routes are on the backend API port, not the dedicated MCP port. They are used by the settings screen and the in-app AI bridge:

EndpointPurpose
GET /mcp/statusReturn { running, pid, endpoint, config, diagnostics }. endpoint is null when stopped; diagnostics contain recent { stream, message } records.
POST /mcp/startStart embedded MCP with the persisted settings and return status. No body. Returns a conflict if already running.
POST /mcp/stopStop the embedded MCP child process.
GET /settings/mcpReturn the persisted MCP configuration.
PUT /settings/mcpAccept a complete configuration object, save it, and restart MCP if running. Return the accepted configuration or an error. Only loopback bind hosts are allowed.
GET /mcp/toolsReturn { tools, config }, including each tool's inputSchema. This REST catalog is not paginated.
POST /mcp/tools/callCall one tool with { "name": "ogma_explain_capabilities", "arguments": {} }. Returns { "result": "..." }; parse that text as the tool's JSON envelope. This is not a native MCP result with image blocks.

The REST bridge uses persisted permissions but does not require the separate HTTP MCP child to be started. It shares one bridge session for the backend/configuration. Prefer native MCP for isolated client sessions and image output.

For bridge failures, parsing result yields { "error": "..." } containing the serialized error envelope. Check that value rather than treating an HTTP-success status as tool success.

Default persisted MCP configuration:

json
{
  "bind_host": "127.0.0.1",
  "port": 3000,
  "allow_write_findings": false,
  "allow_export_data": false,
  "allow_read_secrets": false,
  "allow_send_requests": false,
  "allow_run_workflows": false,
  "allow_intercept_control": false,
  "tool_profile": "full"
}

Allowed bind hosts are 127.0.0.1, localhost, and ::1; ports must be 1024 through 65535. This build does not configure authentication for network-exposed MCP, so public bind addresses are rejected. Legacy allow_public_bind and acknowledge_write_tool_risk fields do not override this restriction.

Claude Code ​

For the running desktop endpoint:

bash
claude mcp add --transport http ogma http://127.0.0.1:3000/mcp

Use the endpoint displayed by Ogma if different. See Claude Code's MCP configuration for configuration scopes and stdio options. Verify with: "What projects does Ogma have?"

Cursor ​

Merge this entry into your project's .cursor/mcp.json or user-level ~/.cursor/mcp.json:

json
{
  "mcpServers": {
    "ogma": {
      "url": "http://127.0.0.1:3000/mcp"
    }
  }
}

Enable the connection in Cursor's MCP settings. See Cursor's MCP documentation.

Stdio Client Configuration ​

Clients that launch an executable can use this server entry, adjusting their configuration file location as needed:

json
{
  "mcpServers": {
    "ogma": {
      "command": "/absolute/path/to/ogma-mcp",
      "args": ["--api-url", "http://127.0.0.1:8181"]
    }
  }
}

On Windows, use the executable's full path and escape backslashes in JSON. Some clients also require "type": "stdio". Add permission flags to args as needed.

Permissions ​

All six privileged capabilities are disabled by default. Read their current values from ogma://mcp/permissions. A listed tool may still reject execution until its capability is enabled. The full flag/environment-variable table is in the CLI reference.

Browser interaction, context management, project switching, and all authentication journey calls require --allow-send-requests. Browser observation can inspect an already-running browser without enabling its control tools. --allow-read-secrets (or OGMA_MCP_ALLOW_READ_SECRETS=true) separately permits unmasked environment-variable values.

The server has no per-minute or per-session activity quotas. Individual tools still enforce their input sizes, batch sizes, scope checks, and timeouts. The old send/workflow quota flags are no longer supported.

Read-Only Mode ​

By default, the MCP server is read-only. These operations are not available unless explicitly enabled:

  • Sending requests (Replay)
  • Driving the embedded browser, crawler, auth capture, and active probe helpers
  • Running workflows
  • Creating or modifying findings
  • Modifying scope or match-replace rules
  • Modifying or forwarding intercepted traffic
  • Deleting data
  • Accessing secret environment variable values
  • Exporting data

Body previews default to 512 bytes. --body-preview-bytes adjusts previews and must be at least 1; it does not cap every tool's output. Use ogma_get_http_entry_body for a full HTTP body or a targeted body search, and ogma_get_ws_message for a complete WebSocket message.

Finding Write Tools ​

To enable AI-assisted finding creation, restart ogma-mcp with write permissions:

bash
./ogma-mcp --allow-write-findings

Or set the environment variable:

bash
OGMA_MCP_ALLOW_WRITE_FINDINGS=true ./ogma-mcp

Write tools available ​

ToolDescription
ogma_preview_finding_from_evidencePreview a finding draft from an HTTP entry (read-only, always available)
ogma_create_findingCreate a finding with severity, status, tags, and evidence links
ogma_update_findingUpdate an existing finding
ogma_add_finding_tagAdd tags to a finding without replacing existing tags
ogma_link_finding_evidenceLink HTTP entry, Replay attempt, Automate result, or WS message to a finding
ogma_delete_findingDelete one finding
ogma_export_findings_reportGenerate an HTML, Markdown, or PDF report

The current implementation also uses finding-write permission for shared write tools such as environment-variable updates, history annotations, scope selection, and Match & Replace mutations. See the tool catalog for those actions.

Example: AI-assisted finding creation ​

With --allow-write-findings:

  1. "Analyze HTTP entry {id} for security issues. If you find a real issue, use ogma_create_finding to document it."
  2. The AI will call ogma_get_http_entry to inspect the request
  3. If evidence supports a finding, it will call ogma_create_finding with the evidence linked

Still not available with finding writes only ​

  • Replay sending
  • Workflow execution
  • Export creation
  • Intercept queue control
  • Project switching

Export Tools ​

To enable AI-assisted export job creation, restart ogma-mcp with export permissions:

bash
./ogma-mcp --allow-export-data

Or set the environment variable:

bash
OGMA_MCP_ALLOW_EXPORT_DATA=true ./ogma-mcp

Export tools available ​

ToolPermission requiredDescription
ogma_preview_export_planNone (read-only)Preview what would be included in an export
ogma_list_export_jobsNone (read-only)List recent export jobs
ogma_get_export_jobNone (read-only)Check export job status
ogma_get_export_download_infoNone (read-only)Get download URL for completed export
ogma_create_export_jobexport_dataCreate an export job

Supported export kinds and formats ​

KindDescriptionFormats
http_historyAll proxied HTTP requestsjson, csv, raw_http
searchFiltered HTTP requestsjson, csv, raw_http
findingsSecurity findingsjson, csv
automate_resultsAutomate session resultsjson, csv

Note: raw_http format is only valid for http_history and search kinds.

Security warning ​

Export files may contain full HTTP request and response bodies, which can include passwords, tokens, and personal data. Handle export files with appropriate care.

Still not available with export permissions only ​

  • Export file deletion
  • Export file renaming
  • Streaming export content through MCP
  • Replay sending
  • Workflow execution

Replay Request Sending ​

Warning: this enables sending real outbound HTTP traffic through Ogma Replay.

To enable:

bash
./ogma-mcp --allow-send-requests

Or via environment variables:

bash
OGMA_MCP_ALLOW_SEND_REQUESTS=true ./ogma-mcp

Prerequisites ​

  1. Ogma proxy must be running
  2. An active scope must be configured in Scopes for guarded Replay sends
  3. The target host must be in the active scope

Send tools ​

ToolPermissionDescription
ogma_preview_replay_sendsend_requestsPrepare a send, get confirmation token
ogma_send_replay_requestsend_requestsExecute send with confirmation token
ogma_create_replay_session_from_historysend_requestsCreate Replay session
ogma_create_replay_session_rawsend_requestsCreate Replay session from a raw request definition
ogma_browser_form_to_replaysend_requestsCreate a Replay session from a form on the live page
ogma_create_scope_presetsend_requestsStore a scope preset; activate separately with ogma_set_active_scope
ogma_repeat_requestsend_requestsRepeat a captured request with optional changes
ogma_replay_with_modificationssend_requestsReplay a captured request with field-level overrides
ogma_http_requestsend_requestsSend a direct HTTP request
ogma_fetch_urlsend_requestsFetch a URL and return status, headers, and preview
ogma_follow_redirectsend_requestsFollow a redirect chain and report each hop
ogma_bulk_send_requestssend_requestsSend a bounded batch of requests
ogma_fuzz_parametersend_requestsReplace a placeholder with wordlist values
ogma_multipart_uploadsend_requestsSend multipart form-data requests for upload testing
ogma_websocket_connectsend_requestsConnect to a WebSocket URL and exchange messages
ogma_login_replay_autosend_requestsSubmit a browser login form and capture an auth profile
ogma_auth_capture_profilesend_requestsCapture browser cookies, storage, auth tokens, and CSRF candidates
ogma_auth_apply_profilesend_requestsApply a captured auth profile to the browser
ogma_auth_refresh_csrfsend_requestsRefresh CSRF candidates from browser state
ogma_authz_matrix_testsend_requestsReplay one request as multiple auth profiles
ogma_run_active_probe_workflowsend_requestsRun bounded vulnerability-specific active probes
ogma_test_racesend_requestsSend one request concurrently and report the responses that deviate from the mode status
ogma_test_smugglingsend_requestsSend CL.TE and TE.CL request desync probes over raw TCP
ogma_test_hppsend_requestsSend HTTP parameter pollution variations
ogma_run_nucleisend_requestsRun one bundled or supplied template scanner template against a target URL
ogma_browser_navigate and browser interaction toolssend_requestsDrive the embedded browser and capture resulting traffic
ogma_crawl_sitesend_requestsCrawl a scoped target through the embedded browser
ogma_get_replay_sessionNoneView Replay session metadata
ogma_get_replay_attemptNoneView Replay attempt metadata
ogma_list_replay_sessionsNoneList Replay sessions

Two-step workflow ​

The confirmation-based Replay pair uses two calls:

  1. ogma_preview_replay_send - review the request, get a confirmation token
  2. ogma_send_replay_request - confirm and send with the token

Confirmation tokens expire in 5 minutes, are single-use, and belong to the MCP session that created them. Preview again after changing the request or restarting MCP. This two-step rule does not apply to every send tool: direct HTTP tools, repeat helpers, and browser actions can send immediately when enabled.

Example session ​

User: Resend HTTP entry abc123 and check the response
AI: (calls ogma_preview_replay_send with http_entry_id="abc123")
    - shows request preview, confirmation token, scope status --
AI: (calls ogma_send_replay_request with confirmation_token and request_hash)
    - shows response status, timing, response preview --

Still not available with request-sending permissions only ​

  • Workflow execution
  • Finding creation or update
  • Deletion

Keep the active scope narrow before enabling these tools. Scope checks apply on guarded send paths; do not treat scope as a universal firewall around arbitrary browser JavaScript or every direct-fetch helper.

Intercept Control ​

Warning: intercept control lets an MCP client forward, drop, or modify live traffic currently held in Ogma's intercept queue.

To enable:

bash
./ogma-mcp --allow-intercept-control

Or via environment variable:

bash
OGMA_MCP_ALLOW_INTERCEPT_CONTROL=true ./ogma-mcp

Intercept tools ​

ToolPermissionDescription
ogma_get_intercept_statusintercept_controlRead request, response, and WebSocket intercept state
ogma_set_intercept_enabledintercept_controlEnable or disable intercept modes
ogma_list_intercept_queueintercept_controlList currently held items
ogma_get_intercept_itemintercept_controlInspect one queued item
ogma_forward_intercept_itemintercept_controlForward a queued item, optionally modified
ogma_drop_intercept_itemintercept_controlDrop a queued item
ogma_intercept_and_modifyintercept_controlWait for a matching item, modify it, and forward it

Workflow Execution ​

Warning: workflow execution runs workflow logic. Some workflows send HTTP traffic or create findings.

To enable:

bash
./ogma-mcp --allow-run-workflows

Workflow execution tools ​

ToolPermissionDescription
ogma_get_workflow_safetyNone (read-only)Classify workflow side effects
ogma_preview_workflow_runrun_workflowsPreview and get confirmation token
ogma_run_workflowrun_workflowsExecute with confirmation token
ogma_cancel_workflow_runrun_workflowsCancel a running active workflow

Preview with workflow_id, plus input for a convert workflow or trigger_entry_id for a captured active-workflow input. Run with the returned confirmation_token and definition_hash; convert workflows also need input_hash and the same input. Tokens expire after five minutes and are single-use. Read the resulting run with ogma_get_workflow_run.

Automate execution is available through its session/run tools with send-requests permission, not workflow-run permission. Listing and inspecting existing runs does not require send permission.

Cross-permission requirements ​

Workflows that use sdk.requests.send also require --allow-send-requests. Workflows that use sdk.findings.create also require --allow-write-findings.

Detection is based on static text analysis - see the advisory note below.

Safety classification advisory note ​

Workflow safety classification inspects JavaScript source code text for patterns like sdk.requests.send. This detection is not exhaustive - obfuscated or dynamically constructed SDK method calls may not be detected. Always review workflow JavaScript source before running untrusted workflows.

Still not available with workflow permissions only ​

  • Passive workflow manual triggering
  • Deletion
  • Env var mutation

Example Prompts ​

Once connected:

  • "Show me the last 20 HTTP requests to example.com"
  • "Are there any high or critical findings in this project?"
  • "Which workflows are currently enabled?"
  • "Check if the HTTPQL query req.method.eq:\"POST\" is valid"
  • "Summarize the security state of the current project"
  • "Analyze HTTP entry {id} for security issues"

Troubleshooting ​

Connection refused: Start Ogma first (ogma --data-dir ./ogma-data).

MCP client shows no tools: Check the transport URL or executable path. Clients must follow all tools/list cursors; each page contains up to 40 tools. Check client-side filtering and whether your installed release includes the missing tool.

Invalid session or confirmation token: Reconnect after a restart and generate a fresh preview token.

Browser unavailable or action failed: Keep the desktop app running. Check ogma_browser_health, dialogs, and browser recovery. A headless backend alone does not provide the desktop browser bridge.

Screenshot has no readable text: Use a client supporting native MCP image content, or inspect the semantic snapshot.

Empty results: Ogma needs traffic captured first. Browse with your proxy configured to forward traffic through Ogma.

Proprietary software. All rights reserved.