Skip to content

Latest commit

 

History

History
164 lines (116 loc) · 2.32 KB

File metadata and controls

164 lines (116 loc) · 2.32 KB

MCP (Model Context Protocol)

GarraIA supports the Model Context Protocol for connecting to external tools and services.

Setup

Stdio Transport

Configure MCP servers in config.yml:

mcp:
  filesystem:
    command: npx
    args: ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
  
  github:
    command: npx
    args: ["-y", "@modelcontextprotocol/server-github"]
    env:
      GITHUB_TOKEN: "your-github-token"

HTTP Transport

For remote MCP servers (requires mcp-http feature):

mcp:
  remote-server:
    transport: http
    url: "http://localhost:3000/mcp"

CLI Commands

List MCP Servers

garraia mcp list

Inspect Server

garraia mcp inspect <server-name>

List Resources

garraia mcp resources <server-name>

List Prompts

garraia mcp prompts <server-name>

Available MCP Servers

Filesystem

Access local filesystem:

mcp:
  filesystem:
    command: npx
    args: ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/directory"]

GitHub

mcp:
  github:
    command: npx
    args: ["-y", "@modelcontextprotocol/server-github"]
    env:
      GITHUB_TOKEN: "ghp_..."

Database

mcp:
  postgres:
    command: npx
    args: ["-y", "@modelcontextprotocol/server-postgres", "postgresql://user:pass@localhost/db"]

AWS KB Retrieval

mcp:
  aws:
    command: npx
    args: ["-y", "@modelcontextprotocol/server-aws-kb-retrieval-server"]

Claude Desktop Compatibility

GarraIA is compatible with Claude Desktop MCP configuration.

Create ~/.garraia/mcp.json:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
    }
  }
}

Tool Namespacing

MCP tools are namespaced with the server name:

server_name.tool_name

Example: filesystem.read_file

Health Monitoring

MCP servers are monitored for health:

garraia health

Check MCP status in health output.

Troubleshooting

Server won't start

Check logs:

garraia logs | grep mcp

Tool not found

Verify server is running:

garraia mcp list

Connection timeout

Increase timeout in config:

timeouts:
  mcp:
    default_secs: 60  # Increase from default