# Connect an MCP client

Connect over local Streamable HTTP and diagnose transport or inventory problems.

Canonical URL: https://opennodeflow.dev/wiki/mcp-connect/
JSON reference: https://opennodeflow.dev/wiki/mcp-connect/index.json
Source snapshot: 2026-10-23

ONF hosts a native Model Context Protocol endpoint alongside its ordinary HTTP application. For a client on the same machine, use:

~~~text
http://localhost:4310/mcp
~~~

Select **Streamable HTTP** when a client asks for transport. Configuration formats differ between clients, so enter the endpoint using that client's documented MCP settings. The current endpoint does not request a bearer token, API key or OAuth login. Keep it within the trusted local/LAN boundary described in [security](/wiki/security/).

## Confirm local readiness

Read the ordinary metadata endpoint before troubleshooting a protocol handshake:

~~~powershell
curl.exe http://localhost:4310/api/mcp/status
~~~

The response reports name, version, transport, endpoint, authentication mode, tool names/count and session mode. This does not execute a workflow or verify a provider credential. If the application is not running, follow [installation guidance](/wiki/installation/) and local operating instructions. The website preview is a separate static service.

## Protocol behavior

The transport accepts **POST /mcp**. A compatible client performs ordinary MCP initialization and capability negotiation, advertising `Accept: application/json, text/event-stream` and sending JSON. Opening the endpoint in a browser sends GET, which deliberately returns **405 Method Not Allowed** with `Allow: POST`. DELETE also returns 405. This is expected behavior.

MCP sessions are stateless: ONF creates a server and transport for each POST, uses JSON response mode and does not require a persistent MCP session ID. Accepted runs and durable application state remain independent of transport lifetime. Closing a client connection does not erase or cancel accepted work.

## Refresh the client inventory

After connecting, list tools and read `onf://guide`. If new tools are absent after an application update, refresh the connection or start a new client session. Saving a configuration does not prove a running conversation loaded it. Compare active tools with `/api/mcp/status` and the [source-derived reference](/wiki/mcp-tools/).

Connection refusal means the selected address/port is not listening or reachable. HTTP 403 points to Host/Origin or network policy. HTTP 405 means an unsupported method. An MCP result with `isError:true` means a tool failed after protocol handling; inspect its error, status and issues.

A cloud assistant cannot reach another machine's localhost. Reachability must exist from the client itself. A desktop configuration does not automatically grant a cloud session LAN access, and the unauthenticated administrative endpoint should not be exposed publicly to bridge that gap.

---

## Documentation provenance

- `docs/MCP.md`
- `server/mcp.ts`
- `package.json`

This page describes maintained source, not a live inventory or an authorization to perform actions.
