# DataMCP

DataMCP turns your PostgreSQL into an MCP endpoint that Cursor, Claude Desktop, VS Code, and Windsurf can actually use — without handing out raw connection strings to every developer on the team.

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add mironovisa/datamcp

# Browse available tools
npx -y @smithery/cli@latest tool list mironovisa/datamcp

# Get full schema for a tool
npx -y @smithery/cli@latest tool get mironovisa/datamcp setup

# Call a tool
npx -y @smithery/cli@latest tool call mironovisa/datamcp setup '{}'
```

## Direct MCP Connection

Endpoint: `https://datamcp--mironovisa.run.tools`

## Tools (11)

- `setup` — Get started with DataMCP. Returns instructions for connecting your first PostgreSQL database.
- `list_connections` — List all database and API connections for the authenticated user
- `get_schema` — Get the current database schema for a specific connection
- `search_tables` — Search for tables by name across all connections
- `list_api_endpoints` — List all API endpoints for a specific OpenAPI connection
- `search_endpoints` — Search for API endpoints across all OpenAPI connections
- `get_repository_structure` — Get the file tree structure of a Git repository
- `get_file_content` — Get the content of a specific file from a Git repository
- `search_repository_files` — Search for files in a Git repository by path or extension
- `get_commit_history` — Get the commit history of a Git repository
- `get_readme` — Get the README content of a Git repository

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get mironovisa/datamcp <tool-name>
```

## Prompts (4)

- `analyze_schema` — Review the database schema and surface design issues, missing indexes, denormalization opportunities, and naming incons…
- `describe_schema` — Generate concise, human-readable descriptions for every table and column that lacks one, using code/migration context.
- `investigate_issue` (issue) — Run a structured investigation on a data or behavior issue using SELECTs against this database.
- `find_slow_candidates` — Identify tables and query patterns most likely to become performance hotspots, based on the schema alone.
