Skip to main content
Glama
cpenniman12

text2sql-mcp

by cpenniman12

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OPENAI_API_KEYNoOpenAI API key
TEXT2SQL_MODELNoLangChain model idanthropic:claude-sonnet-4-6
ANTHROPIC_API_KEYNoAnthropic API key
TEXT2SQL_EXAMPLESNoPath to a scenarios.md file
TEXT2SQL_DATABASE_URLYesSQLAlchemy URL for the database
TEXT2SQL_INSTRUCTIONSNoBusiness rules or hints

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
queryA

Ask the database a natural-language question.

The agent explores the schema, writes SQL, executes it, and self-corrects on errors before returning. Read-only — only SELECT-style statements.

Args: question: The natural-language question, e.g. "top 5 customers by revenue". max_rows: Cap on rows returned in data. Defaults to 100.

Returns: dict with: sql: the final verified SQL data: list of row dicts (capped at max_rows) error: error message if execution failed, else None row_count: number of rows in data tool_calls_made: how many SQL calls the agent made while exploring

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/cpenniman12/text2sql-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server