Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/dir/.index
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
nav:
- Overview: overview.md
- Getting Started: getting-started.md
- Architecture: architecture.md
- Records: ads-records.md
- Trust Model: trust-model.md
- Getting Started: getting-started.md
- Features and Usage: scenarios.md
- Event Streaming: events.md
- Hosted AGNTCY Agent Directory: hosted-agent-directory.md
Expand Down
99 changes: 99 additions & 0 deletions docs/dir/directory-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,105 @@ The following example demonstrates how to store, publish, search, and retrieve a
dirctl pull baeareihdr6t7s6sr2q4zo456sza66eewqc7huzatyfgvoupaqyjw23ilvi
```

## Directory MCP Server

The Directory MCP Server provides a standardized interface for AI assistants and tools to interact with the AGNTCY Agent Directory and work with OASF agent records.

The Directory MCP Server exposes Directory functionality through MCP, allowing AI assistants to:

- Work with OASF schemas and validate agent records.
- Search and discover agent records from the Directory.
- Push and pull records to/from Directory servers.
- Navigate OASF skill and domain taxonomies.
- Generate agent records automatically from codebases.

The MCP server runs via the `dirctl` CLI tool and acts as a bridge between AI development environments and the Directory infrastructure, making it easier to work with agent metadata in your development workflow.

### Configuration

**Binary Configuration:**

Add the MCP server to your IDE's MCP configuration using the absolute path to the `dirctl` binary.

**Example Cursor configuration (`~/.cursor/mcp.json`):**

```json
{
"mcpServers": {
"dir-mcp-server": {
"command": "/absolute/path/to/dirctl",
"args": ["mcp", "serve"]
}
}
}
```

**Docker Configuration:**

Add the MCP server to your IDE's MCP configuration using Docker.

??? example "Example Cursor configuration (`~/.cursor/mcp.json`)"

```json
{
"mcpServers": {
"dir-mcp-server": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"ghcr.io/agntcy/dir-ctl:latest",
"mcp",
"serve"
]
}
}
}
```

**Environment Variables:**

Configure the MCP server behavior using environment variables:

- `DIRECTORY_CLIENT_SERVER_ADDRESS` - Directory server address (default: `0.0.0.0:8888`)
- `DIRECTORY_CLIENT_AUTH_MODE` - Authentication mode: `none`, `x509`, `jwt`, `token`
- `DIRECTORY_CLIENT_SPIFFE_TOKEN` - Path to SPIFFE token file (for token authentication)
- `DIRECTORY_CLIENT_TLS_SKIP_VERIFY` - Skip TLS verification (set to `true` if needed)

??? example "Example with environment variables"

```json
{
"mcpServers": {
"dir-mcp-server": {
"command": "/usr/local/bin/dirctl",
"args": ["mcp", "serve"],
"env": {
"DIRECTORY_CLIENT_SERVER_ADDRESS": "dir.example.com:8888",
"DIRECTORY_CLIENT_AUTH_MODE": "none",
"DIRECTORY_CLIENT_TLS_SKIP_VERIFY": "false"
}
}
}
}
```

### Directory MCP Server Tools

Using the Directory MCP Server, you can access the following tools:

- `agntcy_oasf_list_versions` - Lists all available OASF schema versions supported by the server.
- `agntcy_oasf_get_schema` - Retrieves the complete OASF schema JSON content for the specified version.
- `agntcy_oasf_get_schema_skills` - Retrieves skills from the OASF schema with hierarchical navigation support.
- `agntcy_oasf_get_schema_domains` - Retrieves domains from the OASF schema with hierarchical navigation support.
- `agntcy_oasf_validate_record` - Validates an OASF agent record against the OASF schema.
- `agntcy_dir_push_record` - Pushes an OASF agent record to a Directory server.
- `agntcy_dir_pull_record` - Pulls an OASF agent record from the local Directory node by its CID (Content Identifier).
- `agntcy_dir_search_local` - Searches for agent records on the local directory node using structured query filters.

For a full list of tools and usage examples, see the [Directory MCP Server documentation](https://github.com/agntcy/dir/blob/main/mcp/README.md).

## Output Formats

All `dirctl` commands support multiple output formats via the `--output` (or `-o`) flag, making it easy to switch between human-readable output and machine-processable formats.
Expand Down
4 changes: 4 additions & 0 deletions docs/dir/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,7 @@ This deploys Directory services using Docker Compose:
cd install/docker
docker compose up -d
```

## Directory MCP Server

The Directory services are also accessible through the Directory MCP Server. It provides a standardized interface for AI assistants and tools to interact with the Directory system and work with OASF agent records. See the [Directory CLI Reference](directory-cli.md#directory-mcp-server) for more information.
2 changes: 2 additions & 0 deletions docs/dir/scenarios.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ scenarios. All code snippets below are tested against the Directory `v0.3.0` rel
Although the following example is shown for a CLI-based usage scenario, the same
functionality can be performed using language-specific SDKs.

The Agent Directory Service is also accessible through the Directory MCP Server. It provides a standardized interface for AI assistants and tools to interact with the Directory system and work with OASF agent records. See the [Directory CLI Reference](directory-cli.md#directory-mcp-server) for more information.

## Prerequisites

The following prerequisites are required to follow the examples below:
Expand Down
Loading