feat: Claude Code auto-detect (.mcp.json) + 20 MCP tools + health endpoint
Claude Code integration: - .mcp.json at repo root for auto-detection (uses seed admin token) - CLAUDE.md project instructions (commands, architecture, rules) - Pre-seeded admin token: aos_admin_seed_token_for_claude_code_2026 - Scopes: all read + all write + mcp:read + mcp:write - Works out of the box after bun run src/lib/seed.ts 5 new MCP read tools (20 total: 11 read + 9 write): - get_buchhaltung: SKR04 Konten, Journal, Saldenliste, EÜR summary - get_anlagen: Anlagenverzeichnis with AfA, book values, GWG - get_kassenbuch: Cash book entries, running balance - get_belege: Receipts with SHA-256 content hashes - get_finanzamt: VAT returns, Jahreserklärungen, Jahresarchive Fix: api-auth regex updated to allow underscores in tokens (aos_[a-z0-9_]+) Health endpoint: GET /api/health (DB connection + version + uptime)
This commit is contained in:
1 parent
1a3241971c
commit
ab9fd10b5e
7 files changed
+231
-1
No files matched your search
@@ -0,0 +1,25 @@
|
||||
import { NextResponse } from 'next/server'
|
||||
import { db } from '@/lib/db'
|
||||
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
// GET /api/health — system health check
|
||||
export async function GET() {
|
||||
try {
|
||||
const companyCount = await db.company.count()
|
||||
|
||||
return NextResponse.json({
|
||||
status: 'ok',
|
||||
timestamp: new Date().toISOString(),
|
||||
version: '1.0.0',
|
||||
database: { connected: true, companyCount },
|
||||
uptime: process.uptime ? `${Math.round(process.uptime())}s` : 'n/a',
|
||||
})
|
||||
} catch {
|
||||
return NextResponse.json({
|
||||
status: 'error',
|
||||
timestamp: new Date().toISOString(),
|
||||
database: { connected: false },
|
||||
}, { status: 503 })
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user