Manef Diagram

Connect to the Diagram MCP server

Connect an MCP client to Diagram using Streamable HTTP.

  1. Add a remote MCP server in a client that supports HTTP with custom headers.
  2. Paste the endpoint above and choose Streamable HTTP.
  3. Ask the deployment owner for a server token. In your client's private configuration, set Authorization: Bearer YOUR_SERVER_TOKEN.
  4. Refresh the tool list, then run graph_status to check the connection.

Anonymous requests are rejected. This endpoint uses a bearer token; it does not offer OAuth sign-in. Keep the token private and out of shared diagrams.

Set up Codex with the new token
  1. Request the current token privately from the deployment owner. Use the replacement token after a rotation.
  2. Set MCP_DIAGRAM_TOKEN in the environment of the computer running Codex. Its value must match the server's private MCP_SERVER_TOKEN.
  3. Add the configuration below once to ~/.codex/config.toml. It references the token without storing its value.
  4. Fully quit and relaunch Codex from that environment, or start the CLI in that shell. A running app does not inherit a token set in another terminal.
  5. Refresh MCP tools: expect the ten names below. Call graph_status with {}, then use graph_list_nodes to get IDs for traces and views.

Windows PowerShell: run this to enter the token without putting it in command history, then launch Codex from the same shell.

$env:MCP_DIAGRAM_TOKEN = [System.Net.NetworkCredential]::new('', (Read-Host 'Diagram token' -AsSecureString)).Password

401: check the replacement token and restart the client. 429: wait at least one minute before retrying. Initialization and notifications also count toward the process-local 20 requests/minute limit. Use bearer configuration; codex mcp login is for OAuth.

10 read-only graph tools
  • graph_status
  • graph_list_nodes
  • graph_list_edges
  • graph_trace
  • graph_layout
  • graph_search_inventory
  • graph_adjacency
  • graph_query
  • graph_build_view
  • graph_create_portable_view

Tools query the public map, trace connections, search public references, and build portable view links. Portable views validate the graph supplied by the caller. Tools do not save editor changes or access private inventory. The demo workspace's MCP playground is a local simulation.

Create a portable diagram with an AI agent

  1. Connect an MCP client using the private server token. Discover the tools, then call graph_status with an empty object.
  2. Call graph_create_portable_view with the graph below. Add nodes, ports and edges as needed; every edge must reference existing ports.
  3. Open the returned URL to inspect the diagram. The URL carries the graph and anyone with it can read that data; never put secrets in it.
{
  "graph": {
    "schemaVersion": 1,
    "nodes": [
      {
        "id": "api",
        "label": "API",
        "tags": [],
        "inputs": [],
        "outputs": []
      }
    ],
    "edges": []
  }
}

The MCP tool creates a portable view, not a saved editor record. Export a document to retain edits.

Troubleshooting

401 means the server token is missing or invalid. 404 means the server is disabled on that deployment. 503 means the deployment owner must configure the token. 429 means the request limit was reached; wait before retrying.

Use POST to this exact endpoint. An optional Origin header must match the deployment's public origin. A client that requires OAuth and cannot send a bearer header is not compatible with this endpoint.

Explore the sample ecosystem demo ↗

Manef Diagram · Architecture maps. The ecosystem workspace lives at MANEF. MANEF ecosystem ↗