Raja SQL MCP
The Raja SQL MCP server provides an MCP-compatible interface to interact with SQLite databases, enabling AI agents and LLM-powered applications to perform full database operations — no external database server required.
Execute SQL (
execute_sql): Run any SQL statement includingCREATE TABLE,INSERT,UPDATE,DELETE,DROP TABLE, andALTER TABLE.List Tables (
list_tables): Retrieve all tables in the database.Describe Table Schema (
describe_table): Inspect the schema/structure of a specific table.Execute SELECT Queries (
execute_select): RunSELECTqueries and retrieve resulting rows.Insert Data (
insert_data): Add new records into a table using a column-value data object.Update Data (
update_data): Modify existing records in a table based on a specified condition.Delete Data (
delete_data): Remove records from a table matching a given condition.
Provides tools to interact with SQLite databases, including executing SQL queries, inspecting schemas, and performing CRUD operations.
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., "@Raja SQL MCPshow the schema of the users table"
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.
Raja SQL MCP
An MCP (Model Context Protocol) server for interacting with SQLite databases. This server provides tools to inspect database schemas, execute SQL queries, and perform CRUD operations, making it easy to integrate databases with AI agents and LLM-powered applications.
Features
✅ Execute SQL queries
✅ List all tables in the database
✅ Inspect table schemas
✅ Execute SELECT queries
✅ Insert data dynamically
✅ Update existing records
✅ Delete records safely
✅ SQLite-based (no external database server required)
Related MCP server: sqlite-mcp
Installation
pip install raja-sql-mcpRunning the Server
sql-mcpOr during development:
uv run python -m src.sql_mcp.mainMCP Inspector Configuration
Transport
STDIOCommand
uvArguments
run python -m src.sql_mcp.mainWorking Directory
/path/to/SQL_MCPAvailable Tools
list_tables()
Returns all tables in the database.
Example:
list_tables()describe_table(table_name)
Returns the schema of the specified table.
Example:
describe_table("users")execute_sql(query)
Executes SQL queries such as:
CREATE TABLE
INSERT
UPDATE
DELETE
DROP TABLE
ALTER TABLE
Example:
execute_sql("""
CREATE TABLE users(
id INTEGER PRIMARY KEY,
name TEXT,
age INTEGER
)
""")execute_select(query)
Executes SELECT queries and returns rows.
Example:
execute_select(
"SELECT * FROM users"
)insert_data(table_name, data)
Insert records dynamically.
Example:
insert_data(
"users",
{
"name": "Raja",
"age": 21
}
)update_data(table_name, data, condition)
Update existing records.
Example:
update_data(
"users",
{
"age": 22
},
"id = 1"
)delete_data(table_name, condition)
Delete records matching a condition.
Example:
delete_data(
"users",
"id = 1"
)Example Workflow
Create a table:
execute_sql("""
CREATE TABLE users(
id INTEGER PRIMARY KEY,
name TEXT,
age INTEGER
)
""")Insert data:
insert_data(
"users",
{
"name": "Raja",
"age": 20
}
)Query data:
execute_select(
"SELECT * FROM users"
)Update data:
update_data(
"users",
{
"age": 21
},
"id = 1"
)Delete data:
delete_data(
"users",
"id = 1"
)Project Structure
SQL_MCP/
│
├── src/
│ └── sql_mcp/
│ ├── __init__.py
│ ├── database.py
│ ├── tools.py
│ └── main.py
│
├── README.md
├── LICENSE
├── pyproject.toml
└── uv.lockUse Cases
AI Database Agents
Cursor-like Coding Assistants
LLM-powered CRUD Applications
Database Automation
Schema Inspection Tools
SQL Learning and Experimentation
License
MIT License © 2026 Anna Vamsi Krishna Raja
Available Tools
7 toolsdelete_dataC
Delete Data from your table
| Name | Required | Description | Default |
|---|---|---|---|
| condition | Yes | ||
| table_name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description indicates a destructive operation (delete) but fails to disclose that deletion is irreversible, requires certain permissions, or may have side effects. With no annotations, the agent lacks important behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very short and to the point, demonstrating conciseness. However, it sacrifices necessary information that an agent needs, like parameter details, making it less effective despite its brevity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the two required parameters, no annotations, and no output schema, the description is incomplete. It does not explain how to construct the condition, what happens if condition is empty, or how the tool differs from similar siblings.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, meaning the description does not mention or explain the parameters (condition, table_name). The agent gets no guidance on how to use these parameters, such as that condition is a SQL WHERE clause.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Delete') and resource ('Data from your table'), making the main purpose evident. However, it does not mention that deletion is conditional on the 'condition' parameter, nor does it distinguish from sibling tools like update_data or execute_sql which could also modify data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives such as update_data or execute_sql. It does not specify prerequisites, scenarios, or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
describe_tableC
This function allows you to get schema of given table name
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description must disclose behavior. It only says 'get schema', not whether it's read-only, requires permissions, or is safe. Minimal transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, concise and to the point. However, it is not front-loaded with critical info beyond the basic purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Even for a simple tool, it lacks description of output (return value). Since no output schema exists, the description should hint at what the agent can expect.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%. Description adds no meaning beyond the parameter name 'table_name'. Does not clarify expected format, constraints, or examples.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool gets schema for a given table. It is specific but could be more precise about what 'schema' includes (e.g., columns, types). It does not differentiate from siblings like list_tables.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool instead of siblings like execute_select or list_tables. Lacks context for the agent to decide.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_selectC
Execute SELECT Queries and returns rows
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits. It implies a read operation but doesn't explicitly state no side effects, no mention of permissions, limits, or return format. Insufficient for an unannotated tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very short (two sentences) but lacks necessary detail. It is under-specified rather than concise; valuable information is missing.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one param, no output schema), the description still fails to provide complete context such as example usage, pagination behavior, or error handling.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the description adds no meaning to the single 'query' parameter beyond its string type. No constraints, SQL dialect, or security warnings are mentioned.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool executes SELECT queries and returns rows, which distinguishes it from sibling tools like execute_sql that might handle other SQL types. However, 'returns rows' is somewhat redundant.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives such as execute_sql, describe_table, or data manipulation tools. There is no context about read-only nature or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_sqlC
This function helps to execute an sql query
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It simply says 'execute an sql query' without disclosing potential destructive actions, permission requirements, or what happens on failure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, which is concise. However, it lacks substantive detail, making it minimally acceptable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's potential power and the lack of annotations or output schema, the description is very incomplete. It fails to specify allowed SQL statements, error behavior, or output format.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% (the 'query' parameter has no description). The tool description does not explain any meaning or constraints for the query parameter beyond its type.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description states the tool executes an SQL query, which is a clear verb+resource. However, it does not differentiate from sibling tools like execute_select or insert_data, which also handle SQL but in more specific ways.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus the more specific siblings (delete_data, describe_table, etc.). The description lacks context about appropriate use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
insert_dataD
Insert Data into the table
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| table_name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, and the description fails to disclose any behavioral traits such as idempotency, permissions requirements, or side effects (e.g., overwriting existing data). The agent has no insight into the tool's impact.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely brief, but lacks necessary detail. It is under-specified rather than concise; every word is present but insufficient for correct tool use.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, no annotations, and a 2-param low-coverage schema, the description is wholly incomplete. It omits success/failure indicators, error scenarios, and relationship to sibling tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage, and the description does not explain the parameters table_name or data. Notably, the 'data' parameter is an object with additionalProperties true, but the description offers no hint about expected structure (e.g., column-value pairs) or constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description only says 'Insert Data into the table', which merely restates the tool name. It does not specify which table or the nature of data insertion, making it vague and indistinguishable from siblings like update_data or delete_data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. There is no mention of prerequisites, context, or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_tablesA
Get all the tables in your Database
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist to indicate safety or side effects, and the description does not disclose any behavioral traits beyond stating a read operation. It lacks details on performance, returned data, or potential limitations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with no wasted words. It is appropriately brief for a simple tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description is somewhat complete for a simple list operation. However, it does not specify the format of the returned tables, which could be important for the agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has no parameters (0 parameters, 100% coverage). The description adds minimal value beyond the schema, but baseline for 0 parameters is 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it gets all tables in the database, using a specific verb+resource. It distinguishes from sibling tools which perform data manipulation or SQL execution.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. The description does not mention any prerequisites or context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_dataD
Update data in the Table
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| condition | Yes | ||
| table_name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must itself disclose behavioral traits. It only says 'Update data', omitting any details about permissions, side effects, error behavior, or whether it's an upsert. No transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely short (5 words), but this is under-specification rather than efficient conciseness. It lacks necessary details and is not front-loaded with key info. More substance is needed.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 3 parameters, no output schema, and no annotations, the description is insufficient to allow an agent to correctly invoke it. It misses critical details about required parameters and usage constraints.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the tool description must explain the three parameters (table_name, data, condition). The description does not explain what 'data' or 'condition' mean, nor their expected format. Fails to add value beyond property names.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool updates data in a table, which is a clear verb-resource pair. However, it doesn't differentiate from sibling tools like insert_data or execute_sql, and 'Table' is vague. Minimal but adequate for basic purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. No context about prerequisites, use cases, or when not to use it. Completely missing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
7 tool updates
v1.0.0- First observed
delete_data - First observed
describe_table - First observed
execute_select - First observed
execute_sql - First observed
insert_data - First observed
list_tables - First observed
update_data
TDQS
Tools are mostly distinct, but execute_select and execute_sql have overlapping functionality since both can run SELECT queries, potentially confusing an agent.
All tools follow a consistent verb_noun pattern (e.g., delete_data, describe_table, execute_sql), with no mixing of conventions.
7 tools is a well-scoped set for a SQL database server, covering essential operations without being excessive or insufficient.
Covers core CRUD and schema inspection, but lacks dedicated tools for table creation or alteration, though execute_sql can handle them.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
- SupabaseOAuthcom.supabase
MCP server for interacting with the Supabase platform
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA lightweight MCP server that provides read-only access to SQLite databases, allowing users to execute SELECT queries, list tables, and describe table schemas.1MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that enables AI agents to interact with SQLite databases by querying schemas, executing SQL, and inspecting table metadata. It supports safe database access through configurable read-only modes, query timeouts, and dry-run execution plans.MIT
- FlicenseNot gradedqualityDmaintenanceMCP server that provides SQLite database operations. Allows AI assistants to query, modify and manage SQLite databases through the Model Context Protocol.-
- AlicenseNot gradedqualityDmaintenanceAn MCP server for working with encrypted SQLite databases (SQLCipher), enabling database exploration, SQL queries, and CRUD operations through natural language.Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/Raja-genai/SQL_MCP_server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server