MCP cover image
See in Github
2025-04-14

https://www.claudemcp.com/docs/quickstart

0

Github Watches

0

Github Forks

0

Github Stars

🧠 MCP Quickstart: Claude + SQLite + Docker

TL;DR: Build a secure local Claude brain using Docker, SQLite, and uvx.


🛡️ Step 1: Build & Run the Docker SQLite Server

docker-compose build
docker-compose up

Your server will be live at http://localhost:8080, ready to accept MCP-style queries.


🧠 Step 2: Install Astral (uv / uvx)

Astral is the MCP-compatible package manager.

curl -Ls https://astral.sh/uv/install.sh | sh

Verify it:

uvx mcp-server-sqlite --help

🔧 Step 3: Make uvx Available to Claude Desktop

Claude launched via Spotlight/Dock doesn’t see your shell config. So we have to tell macOS:

launchctl setenv PATH "$HOME/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

You can also verify this:

launchctl getenv PATH

🔗 Add Symlink for uv (required by uvx)

Claude expects uv at /usr/local/bin/uv, but Astral installs it in ~/.local/bin/uv. Fix that with:

sudo ln -s $HOME/.local/bin/uv /usr/local/bin/uv

Verify:

uvx mcp-server-sqlite --help

⚙️ Step 4: Configure Claude to Use Your SQLite DB

Create or edit:

~/Library/Application Support/Claude/claude_desktop_config.json

Insert:

{
  "mcpServers": {
    "sqlite": {
      "command": "uvx",
      "args": [
        "mcp-server-sqlite",
        "--db-path",
        "/Users/YOUR_USERNAME/Desktop/mcp_quickstart/data/test.db"
      ]
    }
  }
}

✅ Make sure to replace YOUR_USERNAME with your actual username.


🧪 Step 5: Test It Manually

Try this from the terminal:

echo '{"jsonrpc":"2.0","id":"debug","method":"query","params":{"sql":"SELECT * FROM products LIMIT 1"}}' \
  | uvx mcp-server-sqlite --db-path /Users/YOUR_USERNAME/Desktop/mcp_quickstart/data/test.db

You should get back:

{
  "jsonrpc": "2.0",
  "id": "debug",
  "result": {
    "columns": ["id", "name", "price"],
    "rows": [[1, "Widget", 19.99]]
  }
}

🧰 Troubleshooting

🧹 Check if the DB is accessible

docker exec -it $(docker ps --filter "name=mcp-server" -q) sqlite3 /data/test.db

Then run:

SELECT * FROM products LIMIT 1;

🔄 Rebuild the Docker container

docker-compose down -v && docker-compose build && docker-compose up

💬 Bonus: Simulate Claude Queries with a Test JSON

echo '{"jsonrpc":"2.0","id":"test123","method":"query","params":{"sql":"SELECT * FROM products"}}' > test-mcp.json

cat test-mcp.json | uvx mcp-server-sqlite --db-path /Users/YOUR_USERNAME/Desktop/mcp_quickstart/data/test.db

📚 Resources


✅ You now have:

  • 🐻 Dockerized SQLite server
  • 🧪 Secure query interface via FastAPI + Uvicorn
  • 📡 Claude MCP bridge using uvx + mcp-server-sqlite
  • 🧠 A local Claude brain that talks SQL

相关推荐

  • Aurity Ltd
  • Create and Publish Business Websites in seconds. AI will gather all the details about your website and generate link to your website.

  • John Rafferty
  • Text your favorite pet, after answering 10 questions about their everyday lives!

  • Convincible Ltd
  • You're in a stone cell – can you get out? A classic choose-your-adventure interactive fiction game, based on a meticulously-crafted playbook. With a medieval fantasy setting, infinite choices and outcomes, and dice!

  • Ian O'Connell
  • Provide players' names or enter Quickstart to start the game!

  • analogchat.com
  • Efficient Spotify assistant for personalized music data.

  • Matthieu Savioux
  • Evaluates language quality of texts, responds with a numerical score between 50-150.

  • seabiscuit.ai
  • Discover A More Robust Business: Craft tailored value proposition statements, develop a comprehensive business model canvas, conduct detailed PESTLE analysis, and gain strategic insights on enhancing business model elements like scalability, cost structure, and market competition strategies. (v1.18)

  • Carl Oscar Aaro
  • Structured recipes for food and desserts – ingredient lists and step-by-step recipe instructions from any input. Become surprised, try something new or breathe life into grandma's old recipe notebook.

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • langgenius
  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • Azure
  • 该存储库用于开发Azure MCP服务器,将Azure的功能带给您的代理商。

  • alibaba
  • caio-moliveira
  • 创建该项目是为了证明我们如何与不同的模型上下文协议(MCP)连接。

  • rulego
  • ⛓️Rulego是一种轻巧,高性能,嵌入式,下一代组件编排规则引擎框架。

  • Byaidu
  • PDF科学纸翻译带有保留格式的pdf -基于ai完整保留排版的pdf文档全文双语翻译

    Reviews

    1 (1)
    Avatar
    user_QyvSChbl
    2025-04-24

    As a dedicated user of mcp_quickstart, I have to say that this tool has exceeded my expectations. Created by chrisjmendez, it offers a seamless and efficient solution for quick project setup. The user-friendly interface and thorough documentation make it approachable even for beginners. If you’re looking for a reliable starting point for your projects, mcp_quickstart is definitely worth a try.