Skip to main content
Glama
mcp-server-starter-sample

mcp-server-starter-sample

by DingXinPro
README.md
# mcp-server-starter-sample

Free sample: two local MCP tools you can run on your own machine.

1. **SQLite query** — a single parameterized `SELECT` against a tiny example database
2. **HTTPS fetch** — request a host you have already put on an allowlist

This is a November 2026 snapshot, built with the official TypeScript MCP SDK v2 (`@modelcontextprotocol/server` 2.4.0, specification 2026-07-28). It is not an official Anthropic, Cursor, or Windsurf product. It is not a full production server, and it does not include a general-purpose shell.

## Requirements

- Node.js 20 or later (Node 22+ recommended for the built-in `node:sqlite` module)

## Quick start

```bash
npm install
npx tsx src/index.ts
```

The process waits on stdin for an MCP client. To try the SQLite tool you can also inspect the sample database at `data/example.sqlite`.

### Cursor

Add this to `.cursor/mcp.json` or `~/.cursor/mcp.json` ([Cursor MCP docs](https://cursor.com/docs/mcp)):

```json
{
  "mcpServers": {
    "mcp-server-starter-sample": {
      "command": "npx",
      "args": ["tsx", "ABS/PATH/TO/mcp-server-starter-sample/src/index.ts"],
      "env": {
        "MCP_FETCH_ALLOWLIST": "example.com"
      }
    }
  }
}
```

Replace `ABS/PATH/TO` with the real folder. `fetch_url` will refuse to run until `MCP_FETCH_ALLOWLIST` has at least one host.

### Try a query

Once the client is connected, ask it to run:

```sql
SELECT id, title, body FROM notes WHERE id = ?
```

with params `[1]`. You should get the welcome row from the sample database.

## What this sample does not include

The full pack adds a TypeScript and Python starter with the guard layer (rate limit, optional audit log, structured errors), write-optional SQLite with the same SQL checks, a strict command allowlist (`ls`, read-only `git`, `npm test`), and a more complete fetch tool (redirect checks, HTML-to-Markdown). Those files are not in this repository.

If you want that command allowlist, the complete TypeScript / Python templates, or the optional AI IDE Rules Kit, look at the shop and X profile linked from the author's GitHub or X bio. The shop is [dingster13.gumroad.com](https://dingster13.gumroad.com). This MCP kit may not be listed there yet — the sample is published first on purpose, so you can run it before anything is for sale.

## License

MIT. See `LICENSE`.

TDQS

B3.4/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: running a SQLite SELECT versus fetching an allowlisted URL. There is no realistic overlap or misselection risk between them.

Naming Consistency3/5

Both names use snake_case, but the patterns differ: sqlite_query is resource_action while fetch_url is verb_noun. The names remain readable, but there is no consistent verb-first convention.

Tool Count3/5

Two tools is thin even for a starter sample server. The scope is understandable, but the surface feels more like a minimal demo than a well-rounded tool set.

Completeness3/5

The SQLite tool is read-only and the URL tool only fetches, so write and broader lifecycle operations are absent. For a starter sample this may be intentional, but agents needing mutation or schema inspection would hit gaps.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues