DOCSGUIDESMCP INTEGRATION

MCP Integration

Piri is MCP-native — plug directly into AI agents.

MCP Integration is framed as an execution surface instead of a generic article. Use it when you need direct context, concise operational detail, and a fast path into guides.

article

Guides

Learn how to build with Piri.

deployed_code

Core Concepts

Piri uses R-tree data structures for spatial indexing. R-trees organize geometric data in a tree structure that enables efficient querying.

schema

Architecture

Piri is built in Go with a clean layered architecture:

guides_mcp_integration.json
{
  "tool_name": "guides_mcp_integration",
  "scope": "Guides",
  "description": "Piri is MCP-native — plug directly into AI agents.",
  "parameters": {
    "workspace": "default",
    "surface": "guides",
    "focus": "MCP Integration",
    "mode": "reference"
  }
}
docs_guides.ts
import { PiriClient } from '@piri/sdk'

const client = new PiriClient({
  apiKey: process.env.PIRI_API_KEY!,
  baseUrl: process.env.PIRI_BASE_URL!,
})

async function runDocsFlow() {
  const result = await client.request('/v1/workflows', {
    method: 'POST',
    body: {
      page: 'MCP Integration',
      section: 'Guides',
      intent: 'load'
    }
  })

  return result
}

runDocsFlow().then(console.log)