SQLite Database MCP Server
Provides tools for interacting with SQLite databases, including listing tables and executing arbitrary SQL queries.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SQLite Database MCP Servershow me all tables in the database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SQLite Database MCP Server
Objective
The Model Context Protocol (MCP) is revolutionizing how AI Agents connect to data. In the past, if you wanted an LLM to read your database, you had to write custom glue code, custom prompts, and a custom API.
With MCP, you write a standardized "Server". Once running, any MCP-compatible client (like Claude Desktop, an OpenAI agent, or cursor) can instantly connect to it, discover its tools, and query your database without you writing a single prompt!
Related MCP server: SQLite MCP Server
Instructions
Open
server.py.Notice we are using the official
mcp.server.fastmcpmodule, which makes building an MCP server as easy as building a FastAPI app.Implement
list_tables(). Use Python's built-insqlite3to connect toorders.db, query thesqlite_mastertable, and return a string containing all the table names.Implement
read_query(sql). Connect to the database, execute the raw SQL string passed by the LLM, fetch the results, and return them as a formatted string.Notice that
mcp.run()is called at the bottom. This starts the standard IO (stdio) server loop!Run tests using
pytest. The test suite will literally spin up an official MCP Client, connect to your server over stdio, and ask it to list its tools and run a query!
Setup
pip install -r requirements.txtRunning Tests
pytest test_server.pyThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/getinclub/template-build-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server