Guides

Ambient discovery

Make ASMP service discovery available in every agent session on your machine.

Discovery only works if every session can query the registry on turn one — not just repos with a hand-wired .mcp.json.

The problem

146 of 148 repos may have director-daemon in per-repo MCP config. That still fails when:

  • You open a repo with no .mcp.json
  • Global Cursor/Claude config lacks the registry MCP server
  • A new agent session guesses ports instead of querying capabilities

Bootstrap path

~/.asmp/host.yaml          → registry location + policy

http://127.0.0.1:7700      → registration API

asmp-registry MCP          → service_find, service_list, service_health

Every agent session        → "what handles email.ingest?"

1. Host profile

Ensure ~/.asmp/host.yaml exists and points at the registry:

registry:
  path: ~/.asmp/services
  api: http://127.0.0.1:7700

2. Registry running

Verify after boot:

curl -s http://127.0.0.1:7700/health | python3 -m json.tool

On macOS, director-daemon typically runs via LaunchAgent com.aicholdings.director-daemon.

3. Global Cursor MCP

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "asmp-registry": {
      "command": "python3",
      "args": [
        "/path/to/aic-director-daemon/mcp_server/server.py"
      ]
    }
  }
}

Reload Cursor after editing.

4. Global Claude Code MCP

Add to ~/.claude/settings.json under mcpServers:

"asmp-registry": {
  "command": "python3",
  "args": [
    "/path/to/aic-director-daemon/mcp_server/server.py"
  ]
}

5. Litmus test

From any repo — especially one without per-repo MCP:

service_find(capability="email.ingest")

Or via HTTP:

curl -s "http://127.0.0.1:7700/capabilities?provides=email.ingest"

Pass: Returns service name, capabilities, endpoint, repo path.
Fail: Connection refused to :7700 or empty results when manifests exist.

HTTP-only fallback

If MCP is unavailable, agents can query the registry API directly:

NeedRequest
List servicesGET /services
Find by capabilityGET /capabilities?provides=email.ingest
Registry healthGET /health
Host profileGET /host

Session-start habit

During takeoff or pre-flight, query the registry before guessing infrastructure:

  1. asmp scan or service_scan() — pick up newly shipped manifests
  2. Check /health for total vs healthy counts
  3. If building something that needs an existing service, service_find first
  4. If lookup misses but you found real software, asmp todo / service_todo — gaps self-heal
  5. If registering something new, service_register or write ~/.asmp/services/{name}.asmp.yaml

Next