# Framework integration notes — OMTIVO + JOAN MCP servers

Both servers are **stdio** MCP servers, zero-dependency, Node >= 18:

- `omtivo-mcp` — OMTIVO enterprise proof platform (TESTNET, `https://api.omtivo.com`)
- `joan-mcp` — JOAN agreements judge (offline; wraps the JOAN-side adapter)

Until the npm packages are published (owner account action), run them from a local checkout by pointing `args` at the `.mjs` file; after publication, the `npx -y <package>` form below works as written. Both forms are shown where they differ.

---

## Claude (Claude Desktop / Claude Code / any MCP client)

`claude_desktop_config.json` (or the client's MCP settings):

```json
{
  "mcpServers": {
    "omtivo": {
      "command": "npx",
      "args": ["-y", "omtivo-mcp"],
      "env": { "OMTIVO_API_BASE": "https://api.omtivo.com" }
    },
    "joan": {
      "command": "npx",
      "args": ["-y", "joan-mcp"]
    }
  }
}
```

Local-checkout form (today): replace `"args": ["-y", "omtivo-mcp"]` with `"args": ["/path/to/omtivo-mcp.mjs"]` and `"args": ["-y", "joan-mcp"]` with `"args": ["/path/to/joan-mcp.mjs"]` (JOAN also accepts `JOAN_INTEGRATION_DIR` / `JOAN_INBOX_STORE` env vars).

Claude Code CLI:

```bash
claude mcp add omtivo -- npx -y omtivo-mcp
claude mcp add joan -- npx -y joan-mcp
```

`OMTIVO_TENANT_CREDENTIAL` is only needed for `omtivo_create_attestation` against a tenant's own deployment; reads and hosted verification on the public testnet route need no credential, and creation there is refused by design (`403 MT_DEMO_CREATION_DISABLED`).

## ChatGPT

Two routes, with their real limits stated:

**A) Custom MCP connector (developer mode).** ChatGPT connectors speak MCP over a **remote HTTP endpoint**; both house servers are stdio today. Options: run the server behind an MCP remote bridge (e.g. `mcp-remote` / a supergateway-style stdio→HTTP wrapper) on the agent operator's own machine and register that URL, or wait for the house HTTP binding (not built; tracked in DISTRIBUTION-CHECKLIST.md). Do not register `api.omtivo.com` as an MCP endpoint — it is a REST API, not an MCP transport.

**B) GPT Actions (OpenAPI) — OMTIVO only.** OMTIVO's enterprise API is a live HTTPS REST API with a 15-route OpenAPI specification (`mt.enterprise.v1`), so a Custom GPT can call its read/verify routes directly:

- Schema: the enterprise OpenAPI document from the OMTIVO tree (public hosting of the spec is an owner step — see checklist).
- Server URL: `https://api.omtivo.com`
- Useful actions on the public testnet route: `GET /health`, `GET /v1/overview`, `GET /v1/evidence/records`, `GET /v1/evidence/records/{record_id}`, `GET /v1/evidence/records/{record_id}/export`, `GET /v1/audit/records/{record_id}`, `POST /v1/verify-jobs`, `GET /v1/verify-jobs/{job_id}`.
- Authentication: none required for the public demo route's reads/verification (the bridge injects the demo tenant server-side). Creation routes answer `403 MT_DEMO_CREATION_DISABLED` by design — configure the GPT to surface that honestly, never to retry around it.

**JOAN via GPT Actions: not available.** JOAN exposes no HTTP API — its judge is a local stdio MCP server. Claiming an Actions integration for JOAN today would be false; the door opens when an HTTP binding exists.

## LangChain (Python, `langchain-mcp-adapters`)

```python
import asyncio
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
from langchain_anthropic import ChatAnthropic

async def main():
    client = MultiServerMCPClient({
        "omtivo": {
            "command": "npx",
            "args": ["-y", "omtivo-mcp"],
            "transport": "stdio",
            "env": {"OMTIVO_API_BASE": "https://api.omtivo.com"},
        },
        "joan": {
            "command": "npx",
            "args": ["-y", "joan-mcp"],
            "transport": "stdio",
        },
    })
    tools = await client.get_tools()
    agent = create_react_agent(ChatAnthropic(model="claude-sonnet-4-5"), tools)
    # e.g. "List the OMTIVO testnet records, export the first package,
    #       then have JOAN judge the exported package offline."
    result = await agent.ainvoke({"messages": [("user", "List the OMTIVO testnet records.")]})
    print(result)

asyncio.run(main())
```

## CrewAI (`crewai-tools` MCP adapter)

```python
import os
from crewai import Agent, Task, Crew
from crewai_tools import MCPServerAdapter
from mcp import StdioServerParameters

server_params = [
    StdioServerParameters(
        command="npx",
        args=["-y", "omtivo-mcp"],
        env={**os.environ, "OMTIVO_API_BASE": "https://api.omtivo.com"},
    ),
    StdioServerParameters(
        command="npx",
        args=["-y", "joan-mcp"],
        env={**os.environ},
    ),
]

with MCPServerAdapter(server_params) as tools:
    auditor = Agent(
        role="Proof auditor",
        goal="Bind agreements in JOAN and prove them in OMTIVO",
        backstory="You never call anything 'verified' without naming the property that was proven.",
        tools=tools,
    )
    task = Task(
        description="Verify the latest OMTIVO testnet record and judge its exported package with JOAN.",
        expected_output="Per-property verdicts from OMTIVO hosted verification and JOAN's offline judgment.",
        agent=auditor,
    )
    print(Crew(agents=[auditor], tasks=[task]).kickoff())
```

## Google ADK (Agent Development Kit)

```python
from google.adk.agents import LlmAgent
from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset
from google.adk.tools.mcp_tool.mcp_session_manager import StdioConnectionParams
from mcp import StdioServerParameters

omtivo_tools = MCPToolset(
    connection_params=StdioConnectionParams(
        server_params=StdioServerParameters(
            command="npx",
            args=["-y", "omtivo-mcp"],
            env={"OMTIVO_API_BASE": "https://api.omtivo.com"},
        )
    )
)

joan_tools = MCPToolset(
    connection_params=StdioConnectionParams(
        server_params=StdioServerParameters(
            command="npx",
            args=["-y", "joan-mcp"],
        )
    )
)

root_agent = LlmAgent(
    model="gemini-2.5-flash",
    name="proof_agent",
    instruction=(
        "You bind agreements in JOAN and prove them in OMTIVO. "
        "Never issue a blanket 'verified': name each property a verdict proves. "
        "OMTIVO hosted verification is not independent; for independence, export "
        "the package and let JOAN judge it offline."
    ),
    tools=[omtivo_tools, joan_tools],
)
```

---

**One rule every integration inherits:** verdicts name properties. If a framework demo or listing ever reduces OMTIVO or JOAN to the word "verified", it is misrepresenting both products — OMTIVO's hosted verification is labelled *"OMTIVO-hosted verification — not independent"*, and JOAN's answer to an artifact it cannot judge is **NOT_VERIFIABLE**, never a pass.
