import type { McpSettingsServer } from '../mcp-servers-settings-view'
import type { RegistryCandidate } from '../registry-browser'

export const mcpSettingsServers = [
  {
    id: 'srv-filesystem',
    name: 'filesystem',
    transport: 'stdio',
    enabled: true,
    command: 'npx',
    args: ['-y', '@modelcontextprotocol/server-filesystem', '/Users/clarity/Documents'],
    secretKeys: ['FS_ACCESS_TOKEN'],
    status: 'ready',
    supportedRuntimes: ['claude', 'codex'],
    createdAt: 1_785_400_000,
    updatedAt: 1_785_590_000,
  },
  {
    id: 'srv-github',
    name: 'github',
    transport: 'stdio',
    enabled: true,
    command: 'docker',
    args: ['run', '-i', '--rm', '-e', 'GITHUB_TOKEN', 'ghcr.io/github/github-mcp-server'],
    secretKeys: ['GITHUB_TOKEN', 'GITHUB_ORG'],
    status: 'ready',
    supportedRuntimes: ['claude'],
    createdAt: 1_785_410_000,
    updatedAt: 1_785_580_000,
  },
  {
    id: 'srv-deepwiki',
    name: 'deepwiki',
    transport: 'streamable-http',
    enabled: false,
    url: 'https://mcp.deepwiki.com/mcp',
    secretKeys: [],
    status: 'disabled',
    supportedRuntimes: ['claude', 'kimi'],
    createdAt: 1_785_420_000,
    updatedAt: 1_785_570_000,
  },
  {
    id: 'srv-postgres',
    name: 'postgres',
    transport: 'stdio',
    enabled: true,
    command: 'uvx',
    args: ['postgres-mcp', '--access-mode=unrestricted'],
    secretKeys: ['DATABASE_URL'],
    status: 'error',
    error: 'Process exited with code 1: connection refused',
    supportedRuntimes: ['codex'],
    createdAt: 1_785_430_000,
    updatedAt: 1_785_599_000,
  },
] satisfies McpSettingsServer[]

export const registryCandidates = [
  {
    name: 'io.github.modelcontextprotocol/server-filesystem',
    title: 'Filesystem',
    description: 'Secure file operations with configurable access controls for local directories.',
    version: '1.2.3',
    publishedAt: '2026-07-20T10:00:00Z',
    packageRegistry: 'npm',
    env: [
      { name: 'FS_ACCESS_TOKEN', description: 'Access token for protected directories', required: true },
    ],
    installHint: {
      transport: 'stdio',
      command: 'npx',
      args: ['-y', '@modelcontextprotocol/server-filesystem'],
    },
  },
  {
    name: 'com.deepwiki/mcp',
    title: 'DeepWiki',
    description: 'Ask questions about any public GitHub repository and get cited answers.',
    version: '0.8.0',
    publishedAt: '2026-06-14T08:30:00Z',
    packageRegistry: null,
    env: [],
    installHint: {
      transport: 'streamable-http',
      url: 'https://mcp.deepwiki.com/mcp',
    },
  },
  {
    name: 'io.github.crystaldba/postgres-mcp',
    title: 'Postgres MCP Pro',
    description: 'Database analysis, index tuning, and safe SQL execution for PostgreSQL.',
    version: '2.0.1',
    publishedAt: '2026-07-02T15:45:00Z',
    packageRegistry: 'pypi',
    env: [
      { name: 'DATABASE_URL', description: 'Connection string', required: true },
      { name: 'PGSSLMODE', description: null, required: false },
    ],
    installHint: {
      transport: 'stdio',
      command: 'uvx',
      args: ['postgres-mcp'],
    },
  },
  {
    name: 'ai.example/whitepaper-only',
    title: 'Whitepaper Bot',
    description: 'Documentation-only entry without an installable package.',
    version: null,
    publishedAt: null,
    packageRegistry: null,
    env: [],
    installHint: null,
  },
] satisfies RegistryCandidate[]
