diskd mcp serve runs an embedded MCP stdio server. It reuses the same config,
auth, path normalization, and Drive client as the CLI commands.
diskd mcp serveWhen you run that command directly in a terminal, diskd prints a ready-to-copy
MCP server config for an LLM agent and exits. When an MCP client launches the
same command with stdio pipes, diskd starts the MCP protocol without printing
human instructions to stdout.
The server exposes tool names aligned with the Drive MCP server:
| Tool | Drive method |
|---|---|
tools__ls |
paths/tools/ls |
tools__read |
paths/tools/read |
tools__glob |
paths/tools/glob |
tools__grep |
paths/tools/grep |
tools__vsearch |
paths/tools/vsearch |
tools__bi_query |
paths/tools/bi-query |
Use stored local credentials:
{
"mcpServers": {
"diskd": {
"command": "diskd",
"args": ["mcp", "serve"],
"env": {
"APIS_BASE_URL": "https://apis.iosya.com"
}
}
}
}Authenticate before starting the LLM agent:
diskd login --token "$APIS_ACCESS_TOKEN"Or put a token directly in the agent config:
{
"mcpServers": {
"diskd": {
"command": "diskd",
"args": ["mcp", "serve"],
"env": {
"APIS_BASE_URL": "https://apis.iosya.com",
"APIS_ACCESS_TOKEN": "..."
}
}
}
}Use DISKD_HOME in the env block when the agent process runs with a different
home directory:
{
"mcpServers": {
"diskd": {
"command": "diskd",
"args": ["mcp", "serve"],
"env": {
"DISKD_HOME": "/home/user/.diskd"
}
}
}
}- The server accepts standard
Content-Lengthframed JSON-RPC messages. - It also accepts line-delimited JSON-RPC messages, which is useful for quick terminal checks.
- Notifications without
idare ignored. - Unknown JSON-RPC methods return
-32601.
printf '{"jsonrpc":"2.0","id":1,"method":"initialize"}\n' | diskd mcp serveList tools:
printf '{"jsonrpc":"2.0","id":1,"method":"tools/list"}\n' | diskd mcp serveCall a search tool:
printf '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"tools__grep","arguments":{"query":"hello","paths":["docs"]}}}\n' | diskd mcp serve