Skip to main content
Glama
My Coding Buddy MCP Server

My Coding Buddy MCP Server

by ajkeast

My Coding Buddy MCP Server

A personal MCP (Model Context Protocol) server that serves as a coding companion, providing tools to streamline development workflows. It connects to various coding clients and offers database utilities for MySQL.

Overview

This MCP server provides:

  • Database introspection and query execution tools for MySQL

  • Integration with coding clients like VS Code, Cursor, and others

  • Extensible architecture for custom tool development

Related MCP server: MCP Dev Standards

Setup

Install dependencies:

uv sync

MCP Configuration

Configure the server in your MCP client's configuration file (e.g., .cursor/mcp.json for Cursor):

{
  "mcpServers": {
    "coding-buddy": {
      "command": "uv",
      "args": ["--directory", "/your_repo_directory_here", "run", "server.py"]
    }
  }
}

Features

  • List databases, tables, and views

  • Execute SQL queries with formatted results

  • Retrieve table schemas, indexes, and DDL

  • Search tables by pattern

  • Get row counts and column information

Usage

The server provides SQL tools that can be invoked through MCP-compatible clients. Tools include database listing, schema inspection, and query execution.

Testing

A comprehensive test script is provided to validate the SQL connection and test all SQL tool functions:

python test_sql_tools.py

The test script will:

  • Verify database connection using environment variables

  • Test all SQL tool functions including database listing, table operations, and query execution

  • Provide detailed output for each test case

Make sure your .env file contains the required database credentials:

  • SQL_HOST

  • SQL_USER

  • SQL_PASSWORD

  • SQL_DATABASE

Contributing

Contributions are welcome. Submit pull requests or open issues for feature requests and bug reports.

Learn More

For more information about the MCP protocol, visit the official MCP documentation.

Available Tools

10 tools
execute_queryA

Execute a SQL query and return the results as a formatted string.

Args: query (str): The SQL query to execute

Returns: str: A formatted string representation of the query results Each row is on a new line, with columns separated by tabs

Raises: Error: If the query execution fails

Inputs: query (required). Returns: result

get_table_createA

Get the CREATE TABLE statement for a specific table.

Args: table_name (str): Table name to inspect

Returns: str: The DDL statement used to create the table

Inputs: table_name (required). Returns: result

get_table_indexesB

Get index information for a specific table.

Args: table_name (str): Table name to inspect

Returns: str: Index metadata for the table

Inputs: table_name (required). Returns: result

get_table_row_countC

Get the approximate row count for a table.

Args: table_name (str): Table name to inspect

Returns: str: Row count information

Inputs: table_name (required). Returns: result

get_table_schemaA

Get the schema information for a specific table.

Args: table_name (str): Name of the table to get schema for

Returns: str: A formatted string containing the table schema information Each column's information is on a new line

Raises: Error: If the table doesn't exist or schema retrieval fails

Inputs: table_name (required). Returns: result

list_columnsA

List columns for a given table.

Args: table_name (str): Table name to inspect

Returns: str: Column names and types for the table

Inputs: table_name (required). Returns: result

list_databasesA

List all databases in the MySQL server.

Returns: str: A formatted string containing all database names, one per line

Inputs: no named parameters. Returns: result

list_tablesA

List all tables in the current database.

Returns: str: A formatted string containing all table names, one per line

Inputs: no named parameters. Returns: result

list_viewsA

List all views in the current database.

Returns: str: A formatted string containing all view names, one per line

Inputs: no named parameters. Returns: result

search_tablesA

Search for tables and views matching a pattern.

Args: pattern (str): Search text or wildcard expression

Returns: str: Matching table and view names, one per line

Inputs: pattern (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 10 tools

    Disambiguation4/5

    Most tools have distinct purposes, but get_table_schema and list_columns both return column info, causing some overlap. Other tools like execute_query and get_table_create are clearly different.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (e.g., list_tables, get_table_schema, execute_query), with no mixing of styles.

    Tool Count5/5

    10 tools is well-scoped for a database MCP server, covering essential operations without being bloated or insufficient.

    Completeness4/5

    The set covers query execution, schema inspection, and listing of objects. Data modification is possible via execute_query, but dedicated tools for common DML are missing. Slight gap in table-level information like row count already present.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      Not graded
      maintenance
      A Model Context Protocol server that allows LLMs to interact with Python environments, enabling code execution, file operations, package management, and development workflows.
      9
      -
    • A
      license
      A
      quality
      D
      maintenance
      A Model Context Protocol server that provides development standards and best practices context to AI coding assistants, ensuring generated code adheres to team/project conventions.
      3
      22 npm
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A semantic code context server that connects your local repository to AI assistants via the Model Context Protocol, enabling dynamic codebase exploration without copy-pasting.
      5
      3
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      An AI-powered development assistant that enables LLMs to securely interact with local development tools including Git, filesystem, Docker, PostgreSQL, and GitHub via the Model Context Protocol.
      -