惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
宝玉的分享
宝玉的分享
酷 壳 – CoolShell
酷 壳 – CoolShell
N
Netflix TechBlog - Medium
F
Fortinet All Blogs
T
Tailwind CSS Blog
Google DeepMind News
Google DeepMind News
Jina AI
Jina AI
J
Java Code Geeks
Recent Announcements
Recent Announcements
The Cloudflare Blog
D
DataBreaches.Net
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
Vercel News
Vercel News
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Azure Blog
Microsoft Azure Blog
雷峰网
雷峰网
H
Help Net Security
博客园 - Franky
S
SegmentFault 最新的问题
T
The Blog of Author Tim Ferriss
博客园_首页
C
Check Point Blog
腾讯CDC
美团技术团队
Martin Fowler
Martin Fowler
The GitHub Blog
The GitHub Blog
M
MIT News - Artificial intelligence
Apple Machine Learning Research
Apple Machine Learning Research
P
Proofpoint News Feed
U
Unit 42
人人都是产品经理
人人都是产品经理
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Engineering at Meta
Engineering at Meta
M
Microsoft Research Blog - Microsoft Research
阮一峰的网络日志
阮一峰的网络日志
G
Google Developers Blog
Stack Overflow Blog
Stack Overflow Blog
B
Blog
Last Week in AI
Last Week in AI
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
云风的 BLOG
云风的 BLOG
H
Hackread – Cybersecurity News, Data Breaches, AI and More
李成银的技术随笔
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

Hacker News - Newest: "AI"

The 5% who operate AI are pulling ahead. Find out where you stand. | PeraByte Labs ORBIT AI Chess Coach — Know Why Every Move Matters AgenticVBench GitHub - ninjahawk/singleton-attractor: Why one dominant intelligence is the inevitable long-run outcome in any competitive recursive-improvement environment. Ask HN: How can you have fun doing corporate dev work in the age of AI tools? AI Mistakes Are Infuriating Gamers as Developers Seek Savings Polish Nobel literature laureate Tokarczuk sparks controversy after admitting using AI The AI Slot Machine is Draining My Creativity Knowledge: You can just build your own AI feed to keep up, without the noise To Understand AI, Think Like A Dragonfly Polsia Raises $30M as Its AI Autonomously Runs 7,600 Businesses AI companies use malware proxies to mount DDoS attacks on web sites AI cost crisis hits tech giants as employee 'tokenmaxxing' backfires &mdash; agentic AI eats up to 1000x more tokens than standard AI, sparks corporate pullback at Microsoft, Meta, and Amazon Frello — A small revolt against bloated software CostHawk - Track AI Adoption, Cost, and Rollout Across Your Team AI is changing the internet forever I let an AI agent loose on my network – it owned my supply chain in 12 minutes GitHub - ogulcancelik/herdr: agent multiplexer that lives in your terminal. fifa2026 GitHub - openclaw/openclaw: Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞 AI doesn't divide developers — it just reveals them greenvilleAI.coffee · Gloomy Doomy Ask HN: Where AI Researchers Congregate? Show HN: Directionally bad – a newsletter about risks of AI centralization The AI Great Leap Forward (a warning) AMD's Lemonade SDK For AI Promotes macOS To GA Status, ROCm 7.13 Integrated Embedded acoustic AI with <16ms latency running on 8MB RAM Does anyone in your organisation own "correctness" in your AI products? Return on Intelligence, Part 3: Moats | rebecca powell GitHub - monkidy/ai-ops-sop-pack: Documentation-only SOP pack for bounded AI-agent engineering operations: PR audit, crash recovery, handoff discipline, templates, and stop conditions. AI Was Used to Recreate the Voices of Dead Pilots. The NTSB Responded by Locking Down Its Database. - Fire ... AI Visibility Engineering Glossary — AIMENSION™ Terminology AI-Declaration.md 10 AI Prompt Examples and Techniques for Better AI Outputs in 2026 Is U.S. AI Adoption Plateauing? A Comprehensive Analysis Is AI Becoming Too Smart for Its Own Good? [audio] ThinkLLM — Think through your LLM choices Show HN: Waiting for AI Grand Prix racing SIM? Me too So I made one How the Library of Congress is using both AI and volunteers to unlock public broadcasting history Verification Tree Architecture: A Probabilistic Attention Orchestration Framework for Bug Report Management in the AI Era Let Me AI That For You The dominant paradigm in AI development is scale. Bigger models, more parameters, more compute. PHI // DRIFT is a different bet. It's a cognitive middleware architecture built on a single thesis: that distinct, continuous, contextually coherent behavior in an AI companion emerges not from model weights alone — but from what is assembled into the prompt, what is retrieved from memory, and what structured state is updated between turns. Five architectural contributions: DMU — Decision Memory Unit. Replaces cosine similarity retrieval with exp(-t/τ) × reinforcement × contextual × extra. Memories are scored by what mattered to the system's ongoing state — not just what was semantically adjacent. Ablation confirmed 14.8% more context injected per prompt than cosine-only RAG. On CPU-only hardware that's a 45.4% latency difference. PEDI / DII — Persistence-Embodiment-Drift Index. A five-component falsifiable proxy metric for behavioral continuity across context resets. Not a claim about consciousness. A measurement Is AI Profitable Yet? Chemical & Engineering News What it takes to run an AI coworker on iMessage 94% will keep spending on AI even when it fails Purr - Apps on Google Play Ask HN: What to learn and do, that makes me least affected by AI in STEM? Second Brain — Your AI Tools Finally Remember You atom.plumocracy.com Cheap AI could derail OpenAI and Anthropic's IPOs The Future of AI-Facilitated Medicine I used $30,983 of AI tokens last month in Claude code on $200/mo plan AI is being used to resurrect the voices of dead pilots Don't just 'quote' the AI Did Google’s AI agents really build an operating system for $916? AI and Doctrinal Collapse Two Loops: How China's Open AI Strategy Reinforces Its Industrial Dominance [pdf] Battle over WiseTech AI job cuts intensifies amid China staff accusations Provenance Exclusive: Departing Meta staffer posts biting anti-AI video internally amid mass layoffs GitHub - ppserapiao/mneme: the open, user-sovereign memory layer for AI. local-first · client-side encrypted · open protocol. your memory. your keys. every model. Zuck defends monitoring employees to win AI race in purported leaked audio GitHub - Hades-HY-LI/ai-native-founder-playbook-skills: Provider-neutral AI agent skills for AI-native startup founders across Idea, MVP, Launch, and Scale. AI is minting new billionaires, and workers want their share GitHub - anomalyco/models.dev: An open-source database of AI models. Pivoting to reach a wider audience and hitting a 5-figure MRR Datapoint AI China: What I Learned from the AI Labs, Robotics Startups and Academia Home Why Tech Companies Are Quietly Cancelling AI Data Centers [video] On AI Maybe AI Bots Are (Mostly) Harmless ASK HN: AI was always a probability problem? Ask HN: How to get involved and meet people in AI in SF? AI users re-create dead pilots’ voices from crash investigation docs Linux Sound Subsystem Also Seeing Many Fixes Driven By AI/LLMs GitHub - GitMonsters/13-Impossible-ARC-Tasks-SOLVED: 13 ARC-AGI-2 tasks with 0% AI solve rate — solved by TranscendPlexity. NVARC, GPT-4, Claude, Gemini: 0/13. We got 13/13. Verified, deterministic Python solvers. Gen Z is not booing AI. It is booing its own job market AI #169: New Knowledge AI as a Design Medium Frontier labs don’t use most AI compute (yet) It's 2026...where are all the AI NPCs? Ask HN: Do people lie about why they hate AI writing on social media? CoreMem - Your context, any AI agent Sundar Pichai discusses AI search VICTORY: POLITICO agrees to shut down both AI tools at center of landmark arbitration AI's Plummeting Prices Are a Software Story, Not a Hardware One The Invisible Cliff: AI Development and Architectural Debt Show HN: AI-Mirror - Self-optimising ranking engine for modern web applications. Starbucks is ditching an AI inventory tool that kept miscounting milk and syrups Why lawyers keep citing fake cases invented by AI Microsoft reports are exposing AI's real cost problem: Using the tech is more expensive than paying human employees | Fortune How do AI chips work? [video] Navigating the New Frontier: AI's Role in Revolutionizing Mathematics and the Quest for Ethical Science Show HN: My dad is a forensic accountant. I automated ~62% of his job Trump's unsigned AI executive order Mdview.io – a Markdown viewer for AI era documentation Anti-"doomer" feedback derails Trump's AI executive order
GitHub - narekmalk/safedb-mcp: Secure MCP server for safe, read-only DB access by AI agents, with SQL guardrails, table allowlists, PII masking, and audit logs
Narek88 · 2026-05-24 · via Hacker News - Newest: "AI"

npm version

SafeDB MCP is a secure Model Context Protocol server that lets AI agents inspect and query Postgres, MySQL, MariaDB, and SQLite with strict read-only guardrails. It is designed for teams that want useful database access without handing an agent unrestricted production credentials.

Direct database credentials are dangerous for agents because a single bad prompt, tool call, or generated SQL statement can mutate data, exfiltrate sensitive columns, or run expensive queries. SafeDB MCP puts a policy layer between the agent and your database: only configured schemas and tables are visible, SQL is parsed and validated before execution, row counts are capped, results are masked, and every query attempt is audited.

This project is an MVP. It prefers false positives and blocked queries over unsafe access, and it does not claim perfect SQL security.

Features

  • MCP tools: list_schemas, list_tables, describe_table, run_readonly_query, explain_query, get_safedb_policy
  • Postgres support through pg
  • MySQL and MariaDB support through mysql2
  • SQLite file support through sql.js
  • YAML or JSON config with environment expansion
  • AST-backed read-only SQL guardrails for SELECT, WITH ... SELECT, UNION, and EXPLAIN SELECT
  • Table detection through joins, CTEs, nested subqueries, aliases, and unions
  • Configurable table allowlists, denylists, row limits, and statement timeout
  • PII masking: redact, email, partial, and deterministic hash
  • JSONL audit log with no raw result data
  • CLI binary: safedb-mcp
  • TypeScript, Vitest, ESLint, Prettier

Quickstart

npx @safedb/safedb-mcp init --output safedb.yaml
DATABASE_URL=postgres://readonly:password@localhost:5432/app npx @safedb/safedb-mcp validate-config --config safedb.yaml
DATABASE_URL=postgres://readonly:password@localhost:5432/app npx @safedb/safedb-mcp test-connection --config safedb.yaml
DATABASE_URL=postgres://readonly:password@localhost:5432/app npx @safedb/safedb-mcp --config safedb.yaml

Use a dedicated database role with read-only permissions. SafeDB MCP is a defense-in-depth layer, not a replacement for least-privilege database credentials.

Docker

A Docker image packages SafeDB MCP with Node.js and its production dependencies so it can run the same way on any host with Docker.

Build the image locally:

docker build -t safedb-mcp .

Run the MCP server with a mounted config file:

docker run --rm -i \
  -e DATABASE_URL=postgres://readonly:password@host.docker.internal:5432/app \
  -v "$PWD/safedb.yaml:/config/safedb.yaml:ro" \
  safedb-mcp

Pass CLI commands after the image name:

docker run --rm \
  -e DATABASE_URL=postgres://readonly:password@host.docker.internal:5432/app \
  -v "$PWD/safedb.yaml:/config/safedb.yaml:ro" \
  safedb-mcp --config /config/safedb.yaml validate-config

Example Config

database:
  type: postgres
  url: ${DATABASE_URL}

safety:
  default_limit: 100
  max_limit: 1000
  statement_timeout_ms: 5000
  allow_explain: true

access:
  schemas:
    public:
      allow_tables:
        - users
        - orders
        - products
      deny_tables:
        - secrets
      column_masks:
        users.email: email
        users.phone: partial
        users.password_hash: redact
        users.ssn: redact

audit:
  path: safedb-audit.jsonl

For MySQL or MariaDB, set database.type and use the database name as the access schema:

database:
  type: mysql
  url: ${DATABASE_URL}

access:
  schemas:
    app:
      allow_tables:
        - users
        - orders
      deny_tables:
        - secrets

For SQLite, set database.type to sqlite, point database.path at the .db file, and use main as the access schema:

database:
  type: sqlite
  path: ./app.db

access:
  schemas:
    main:
      allow_tables:
        - users
        - orders
      deny_tables:
        - secrets

MCP Client Config

Claude Desktop:

{
  "mcpServers": {
    "safedb": {
      "command": "safedb-mcp",
      "args": ["--config", "/absolute/path/to/safedb.yaml"],
      "env": {
        "DATABASE_URL": "postgres://readonly:password@localhost:5432/app"
      }
    }
  }
}

Cursor or Hermes-style MCP config:

{
  "servers": {
    "safedb": {
      "command": "safedb-mcp",
      "args": ["--config", "/absolute/path/to/safedb.yaml"],
      "env": {
        "DATABASE_URL": "postgres://readonly:password@localhost:5432/app"
      }
    }
  }
}

Security Guarantees

SafeDB MCP aims to guarantee that:

  • Only configured schemas and tables are inspectable or queryable through the MCP tools.
  • SQL is parsed before execution, and mutating statement types or multiple statements are blocked.
  • Table access policy is checked against real tables found through joins, CTEs, nested subqueries, aliases, and unions.
  • Query execution happens inside a read-only transaction with a local statement timeout where the driver supports it.
  • Returned rows are capped by an outer LIMIT.
  • Configured PII fields are masked before tool responses are returned.
  • Audit logs record attempts, decisions, detected tables, row counts, and duration without logging raw result rows.
  • Passwords and secrets are not intentionally logged.

Non-Goals

  • Formal proof of query safety.
  • Support for every valid dialect-specific read-only SQL construct.
  • Write operations, migrations, stored procedure execution, or COPY.

Development

npm install
npm run build
npm test
npm run lint

Roadmap

  • Column-level projection enforcement so masked fields cannot be bypassed with aliases.
  • Per-tool and per-table rate limits.
  • Optional OpenTelemetry traces.
  • Signed audit logs.
  • Published Docker image and Helm chart.

License

MIT