Skip to main content
Glama
Raja-genai

Raja SQL MCP

by Raja-genai

Raja SQL MCP

PyPI Python License

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-mcp

Running the Server

sql-mcp

Or during development:

uv run python -m src.sql_mcp.main

MCP Inspector Configuration

Transport

STDIO

Command

uv

Arguments

run python -m src.sql_mcp.main

Working Directory

/path/to/SQL_MCP

Available 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.lock

Use 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 tools
delete_dataC

Delete Data from your table

ParametersJSON Schema
NameRequiredDescriptionDefault
conditionYes
table_nameYes

TDQS

C2.4/5.0
Behavior2/5

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.

Conciseness3/5

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.

Completeness2/5

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.

Parameters1/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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

ParametersJSON Schema
NameRequiredDescriptionDefault
table_nameYes

TDQS

C2.6/5.0
Behavior2/5

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.

Conciseness4/5

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.

Completeness2/5

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.

Parameters1/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes

TDQS

C2.4/5.0
Behavior2/5

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.

Conciseness2/5

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.

Completeness2/5

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.

Parameters1/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes

TDQS

C2.2/5.0
Behavior2/5

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.

Conciseness3/5

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.

Completeness2/5

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.

Parameters1/5

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.

Purpose3/5

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.

Usage Guidelines2/5

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

ParametersJSON Schema
NameRequiredDescriptionDefault
dataYes
table_nameYes

TDQS

D1.3/5.0
Behavior1/5

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.

Conciseness2/5

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.

Completeness1/5

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.

Parameters1/5

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.

Purpose2/5

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.

Usage Guidelines1/5

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

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.5/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines2/5

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

ParametersJSON Schema
NameRequiredDescriptionDefault
dataYes
conditionYes
table_nameYes

TDQS

D1.6/5.0
Behavior1/5

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.

Conciseness2/5

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.

Completeness1/5

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.

Parameters1/5

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.

Purpose3/5

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.

Usage Guidelines1/5

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.

  1. 7 tool updatesv1.0.0
    • First observeddelete_data
    • First observeddescribe_table
    • First observedexecute_select
    • First observedexecute_sql
    • First observedinsert_data
    • First observedlist_tables
    • First observedupdate_data

TDQS

C2.6/5.0
Disambiguation3/5

Tools are mostly distinct, but execute_select and execute_sql have overlapping functionality since both can run SELECT queries, potentially confusing an agent.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern (e.g., delete_data, describe_table, execute_sql), with no mixing of conventions.

Tool Count5/5

7 tools is a well-scoped set for a SQL database server, covering essential operations without being excessive or insufficient.

Completeness4/5

Covers core CRUD and schema inspection, but lacks dedicated tools for table creation or alteration, though execute_sql can handle them.

Maintenance

ActivityStale
ResponsivenessNo issues

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A lightweight MCP server that provides read-only access to SQLite databases, allowing users to execute SELECT queries, list tables, and describe table schemas.
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    An 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
  • F
    license
    Not graded
    quality
    D
    maintenance
    MCP server that provides SQLite database operations. Allows AI assistants to query, modify and manage SQLite databases through the Model Context Protocol.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    An 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

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