npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@shah1900/mcp-db-api-tools

v1.0.2

Published

Local MCP servers for Cursor: Database Inspector (read-only MySQL) and API Runner (Bearer auth). Debug and verify your API with AI.

Readme

MCP Cheatsheet

Local MCP servers for Cursor: Database Inspector (read-only MySQL) and API Runner (Bearer auth). Let AI query your database and hit your API for debugging and verification.

npm version License: MIT


Table of Contents


Features

| Server | Purpose | |--------|---------| | Database Inspector | Read-only MySQL queries. List tables, describe schemas, run SELECT queries, check if records exist. | | API Runner | Execute GET/POST requests to your API with Bearer token auth. |

Use cases:

  • "Check if transaction ID 123 exists in the DB"
  • "Compare DB results with API response"
  • "Call the store-transactions API and verify the data"

Installation

npm install @shah1900/mcp-db-api-tools

SDK-style setup: On install, the package automatically creates:

  • .mcp-cheatsheet/.env (from template)
  • .cursor/mcp.json (Cursor MCP config)
  • Adds .mcp-cheatsheet/ to .gitignore

Manual setup (if you skipped install or need to re-run):

npx @shah1900/mcp-db-api-tools init

Complete Setup

  1. Install (runs setup automatically):

    npm install @shah1900/mcp-db-api-tools
  2. Edit .mcp-cheatsheet/.env with your DB and API credentials.

  3. Restart Cursor (MCP servers load at startup).


Where files go

| What | Location | |------|----------| | Package code | node_modules/@shah1900/mcp-db-api-tools/ (auto-installed) | | Your credentials | .mcp-cheatsheet/.env (created by setup) | | Cursor config | .cursor/mcp.json (created by setup) |


Database Inspector

Read-only MySQL access. Only SELECT queries are allowed.

Tools

| Tool | Description | |------|-------------| | db_list_tables | List all tables in the database | | db_describe_table | Describe schema of a table | | db_execute_query | Run a read-only SELECT query | | db_check_record_exists | Check if a record exists by ID |

Example prompts

  • "Check if a transaction with ID 123 exists in the DB"
  • "List all tables in the database"
  • "Describe the transactions table schema"

Environment variables

| Variable | Description | |---------|-------------| | DB_CONNECTION_STRING | Full URL: mysql://user:pass@host:3306/dbname | | DB_HOST | Database host | | DB_PORT | Port (default 3306) | | DB_USERNAME | Username | | DB_PASSWORD | Password | | DB_NAME | Database name |


API Runner

Execute GET/POST requests to your API with Bearer token auth.

Tools

| Tool | Description | |------|-------------| | api_list_endpoints | List available API endpoints | | api_get | Execute GET request | | api_post | Execute POST request |

Example prompts

  • "Call the store-transactions API with storeId=1"
  • "Compare DB results with API response for transaction 123"

Environment variables

| Variable | Description | |---------|-------------| | API_BASE_URL | Base URL (e.g. http://localhost:3000) | | API_AUTH_TOKEN | Bearer token for auth |

Endpoints config

Edit api-runner/endpoints.json to customize the list returned by api_list_endpoints.


Configuration

Use project-level config. Each project should have its own .cursor/mcp.json and .mcp-cheatsheet/.env. Do not use global Cursor config—it uses a fixed path and one set of credentials for all projects.


Debug Logging

Both servers log to stderr (tool name, args, result preview). View in Cursor: View → Output → select the MCP server channel.

To disable: set MCP_DEBUG=0 in .env.


Security

  • Never commit .mcp-cheatsheet or .env
  • Credentials live in .env only
  • Add .mcp-cheatsheet/ to .gitignore

License

MIT © Shah Shahbaz