{
  "markdown": "mcp-name: io.github.Optisol-Business/db-metadata-extractor-mcp\n\n# Database Metadata Extractor MCP Server\n\nA Model Context Protocol (MCP) server that extracts and queries database schema metadata from PostgreSQL, Snowflake, SQL Server, BigQuery, and Oracle databases.\n\n## Features\n\n- ✅ **Multi-database support**: PostgreSQL, Snowflake, SQL Server (MSSQL), BigQuery, Oracle\n- ✅ **Complete schema extraction**: Tables, columns, primary keys, indexes, constraints\n- ✅ **Local JSON output**: Saves metadata directly to local folder (no cloud required)\n- ✅ **Query interface**: Search and filter metadata by table/column names\n- ✅ **Pagination support**: Browse large schemas efficiently\n- ✅ **VS Code integration**: Works with VS Code Agent Mode\n- ✅ **CLI customizable**: Transport options (stdio, HTTP)\n\n## Installation\n\n### From PyPI\n\n```bash\npip install db-metadata-extractor-mcp\n```\n\n### From Source\n\n```bash\ngit clone https://github.com/Optisol-Business/db-metadata-extractor-mcp.git\ncd db-metadata-extractor-mcp\npip install -e .\n```\n\n## Quick Start\n\n### 1. Start the MCP Server\n\n```bash\ndb-metadata-extractor-mcp\n```\n\nThe server starts in stdio mode by default and listens for MCP client connections.\n\n### 2. Configure in Claude Desktop\n\nAdd to `~/.config/Claude/claude_desktop_config.json` (macOS/Linux) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows):\n\n```json\n{\n  \"mcpServers\": {\n    \"db-metadata-extractor\": {\n      \"command\": \"db-metadata-extractor-mcp\",\n      \"args\": [],\n      \"env\": {}\n    }\n  }\n}\n```\n\nRestart Claude Desktop.\n\n### 3. Use in Claude\n\nTell Claude:\n> Extract metadata from my PostgreSQL database and save it to `/tmp/output`\n\nClaude will use the server's tools to extract and query your database schema.\n\n## Tools\n\n### `extract_metadata`\n\nExtracts complete schema metadata from a database.\n\n**Parameters:**\n- `db_type` (required): `postgresql`, `snowflake`, `sqlserver`, `bigquery`, `oracle`\n- `output_path` (required): Local directory for JSON output\n- `database_name`: Database/schema name\n- `host`: Database host (not needed for BigQuery/Snowflake)\n- `port`: Database port\n- `username`: Database user\n- `password`: Database password\n- `schema_name`: Specific schema (optional)\n- `tables`: Array of table names to extract (optional)\n- `account`: Snowflake account ID\n- `warehouse`: Snowflake warehouse\n- `role_name`: Snowflake role\n- `project_id`: BigQuery project ID\n- `service_account_key`: BigQuery service account JSON (base64 encoded)\n\n**Returns:**\n- File path where metadata was saved\n- Summary statistics (table count, column count, etc.)\n\n### `query_metadata`\n\nQuery previously extracted metadata.\n\n**Parameters:**\n- `filepath` (required): Path to metadata JSON file\n- `table_name`: Filter by table name (substring match)\n- `field_name`: Filter by column name (substring match)\n- `page`: Page number (default: 1)\n- `page_size`: Results per page (default: 20)\n\n**Returns:**\n- Paginated table results matching filters\n\n## Examples\n\n### PostgreSQL\n\n```bash\n# Via Claude\n\"Extract all tables from my dev PostgreSQL database at localhost:5432\"\n```\n\n**Parameters Claude will use:**\n```json\n{\n  \"db_type\": \"postgresql\",\n  \"host\": \"localhost\",\n  \"port\": 5432,\n  \"database_name\": \"dev_db\",\n  \"username\": \"postgres\",\n  \"password\": \"your_password\",\n  \"output_path\": \"/tmp/db_metadata\"\n}\n```\n\n### Snowflake\n\n```bash\n\"Extract schema from Snowflake account XYZ123\"\n```\n\n**Parameters:**\n```json\n{\n  \"db_type\": \"snowflake\",\n  \"account\": \"XYZ123\",\n  \"username\": \"your_user\",\n  \"password\": \"your_password\",\n  \"warehouse\": \"COMPUTE_WH\",\n  \"role_name\": \"ANALYST\",\n  \"database_name\": \"PRODUCTION\",\n  \"output_path\": \"C:/metadata\"\n}\n```\n\n### BigQuery\n\n```bash\n\"Extract metadata from BigQuery project my-project-123\"\n```\n\n**Parameters:**\n```json\n{\n  \"db_type\": \"bigquery\",\n  \"project_id\": \"my-project-123\",\n  \"service_account_key\": \"base64_encoded_json_key\",\n  \"output_path\": \"/tmp/bq_metadata\"\n}\n```\n\n## Advanced Usage\n\n### Custom Transport\n\nStart with HTTP transport:\n\n```bash\ndb-metadata-extractor-mcp --transport streamable-http --port 3000\n```\n\n### Environment Variables\n\n```bash\n# Set database credentials via env\nexport DB_HOST=localhost\nexport DB_USER=postgres\nexport DB_PASSWORD=secret\n\ndb-metadata-extractor-mcp\n```\n\n## Output Format\n\nThe extracted metadata is saved as a JSON file with structure:\n\n```json\n{\n  \"source\": {\n    \"db_type\": \"postgresql\",\n    \"extracted_at\": \"2026-04-09T14:30:00\",\n    \"host\": \"localhost\"\n  },\n  \"schemas\": [\n    {\n      \"schema_name\": \"public\",\n      \"tables\": [\n        {\n          \"table_name\": \"users\",\n          \"columns\": [\n            {\n              \"column_name\": \"id\",\n              \"data_type\": \"int\",\n              \"is_nullable\": false,\n              \"is_primary_key\": true\n            },\n            {\n              \"column_name\": \"email\",\n              \"data_type\": \"varchar\",\n              \"is_nullable\": false\n            }\n          ],\n          \"indexes\": [\n            {\n              \"index_name\": \"users_email_idx\",\n              \"columns\": [\"email\"]\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}\n```\n\n## Requirements\n\n- Python 3.8+\n- For PostgreSQL: `psycopg2-binary`\n- For Snowflake: `snowflake-connector-python`\n- For SQL Server: `pyodbc`, `pymssql`\n- For BigQuery: `google-cloud-bigquery`\n- For Oracle: `oracledb`\n\n## Troubleshooting\n\n### Connection Errors\n\n**Problem**: \"Unable to connect to database\"\n\n**Solution**: Verify credentials and network access:\n```bash\n# Test PostgreSQL connection\npsql -h localhost -U postgres -c \"SELECT 1\"\n\n# Test Snowflake\nsnowsql -a XYZ123 -u your_user\n```\n\n### Permission Errors\n\n**Problem**: \"Access denied\" or \"insufficient permissions\"\n\n**Solution**: Ensure database user has:\n- `SELECT` on tables\n- `USAGE` on schemas\n- `CONNECT` on databases\n\n### Large Schema Timeouts\n\n**Problem**: Extraction times out on large databases\n\n**Solution**: Extract specific schema/tables:\n```json\n{\n  \"schema_name\": \"public\",\n  \"tables\": [\"users\", \"orders\"]  // Specify subset\n}\n```\n\n## License\n\nMIT License - See LICENSE file\n\n## Contributing\n\nContributions welcome! Please:\n1. Fork the repository\n2. Create feature branch\n3. Submit pull request\n\n## Support\n\n- GitHub Issues: https://github.com/Optisol-Business/db-metadata-extractor-mcp/issues\n- Documentation: See MCP_REGISTRY_GUIDE.md\n\n## Links\n\n- **PyPI**: https://pypi.org/project/db-metadata-extractor-mcp/\n- **GitHub**: https://github.com/Optisol-Business/db-metadata-extractor-mcp\n- **MCP Spec**: https://modelcontextprotocol.io/\n",
  "bytes": 6505,
  "sha": "55e80afe12142fa2929badd4f6b571ea96accb8de3f8b59a3794cf530ca69924",
  "repo_slug": "optisol-business/db-metadata-extractor-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_optisol_business_db_metadata_e_1bd79f56/readme"
}