HOW IT WORKSCONNECT YOUR TOOLS
Back to Connect
Connect

Use Hark from scripts and headless agents via REST

Call Hark's REST API from your own scripts, CI jobs and headless agents to read project briefs and record what they did, with scoped keys.

MCP endpoint
https://harkstudio.io/mcp

Sign in to Hark to connect a client. Personal tokens and per-account details live inside the app.

Your own agents, scripts, and workflows (headless)

Use a personal access token as a Bearer header.

Pair first: POST https://harkstudio.io/api/v1/pair with { code } and no authentication. The 8-character code works once within 15 minutes; store the returned access_key privately. Keys default to read-only and expire in 90 days. Copy key is an explicit show-once alternative; never place a key in chat or logs.

curl smoke test
curl -X POST https://harkstudio.io/mcp \
  -H "Authorization: Bearer hark_pat_..." \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
TypeScript — @modelcontextprotocol/sdk
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const transport = new StreamableHTTPClientTransport(new URL("https://harkstudio.io/mcp"), {
  requestInit: { headers: { Authorization: `Bearer ${process.env.HARK_PAT}` } },
});

const client = new Client({ name: "my-agent", version: "1.0.0" });
await client.connect(transport);

console.log(await client.listTools());
console.log(await client.callTool({ name: "list_workspaces", arguments: {} }));
Python — mcp
import os, asyncio
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client

async def main():
    headers = {"Authorization": f"Bearer {os.environ['HARK_PAT']}"}
    async with streamablehttp_client("https://harkstudio.io/mcp", headers=headers) as (read, write, _):
        async with ClientSession(read, write) as session:
            await session.initialize()
            print(await session.list_tools())
            print(await session.call_tool("list_workspaces", {}))

asyncio.run(main())

n8n / Make / Zapier: use the MCP client node (or a plain HTTP request to https://harkstudio.io/mcp) with the token as a Bearer header.

Features: Personal access tokens

Recommended tool flow for agents

  • list_workspaces
  • search_ventures / get_venture_context
  • create_venture or fork_venture
  • update docs (update_venture_business, update_claude_md)
  • move_stage
  • add_journal_entry

Every write is attributed in the activity log — token calls show up as the token's name.

Verify it works

Ask your client: "List my Hark workspaces." Expected: your workspace names.

Then: "Create a project called Connection test in <workspace>." Expected: a new V-### appears in the app and the activity log shows the source ("via Claude Code", "via Codex", etc.). Delete the test venture afterward.

Troubleshooting

  • "Unauthorized request origin" — the client origin isn't allowlisted; retry from the latest app version, or email hello@harkstudio.io.
  • Consent screen loops / stale token — remove the connector in the client, sign out of Hark, sign back in, re-add the connector.
  • Tools list is empty — the connector isn't enabled for this chat (Claude and ChatGPT require enabling it per conversation).
  • Plan cap error — you've hit the monthly agent-call cap for this workspace; see billing.
  • Old endpoint — anything pointing at a lovable.app URL must be updated to harkstudio.io/mcp.

What Hark keeps clear

Evidence on every line

Every record shows Agreed / Observed / Proposed and a source you can open: where did this come from? Agreed means accepted, not independently verified. Observed is reserved for system evidence such as a merged pull request. An agent's claim is never shown as verified simply because it was accepted.

Learn more about Evidence on every line

Repo-native rules

Once linked and selected as the source, the repo's CLAUDE.md or AGENTS.md is authoritative. Hark mirrors it on pushes and retains history rather than authoring competing edits. Optional .hark/ export carries accepted handoff state and decisions into the repo. Repo activity suggests drafts with commit evidence. Agent briefs include mirrored instruction documents and linked repo metadata. Arbitrary repo-document browsing is not exposed by the current tools: Hark never serves source code. Automatic session hooks and compaction protection in the Hark mod are Claude Code-only; other tools follow their connection guide and explicit session tools.

Learn more about Repo-native rules

Scoped, expiring agent access

New agent keys default Propose: suggest changes, never approve them. An eight-character pairing code expires after 15 minutes and works once; no key is pasted into a setup chat. One-link agent approval asks you to sign in, choose permissions, projects and expiry, then approve. The agent still completes pairing. Keys normally expire after 90 days and can be revoked or rotated. The separate show-once Copy key path is for private storage, not chat.

Learn more about Scoped, expiring agent access
SIGN IN TO CONNECT