Skip to main content
Glama
Alisaqulain

Local MCP Toolkit

by Alisaqulain

Local MCP Toolkit

A local-first developer toolkit that exposes filesystem, notes, SQLite, and utility operations through a real Model Context Protocol (MCP) server — plus a modern dashboard for discovery, testing, and management.

No cloud AI APIs. No API keys. After npm install, everything runs on loopback.

What is MCP?

The Model Context Protocol is an open protocol for connecting AI assistants and tools to external systems. An MCP server registers tools (with schemas); an MCP client discovers and invokes them over a transport (stdio or Streamable HTTP).

This project uses the official TypeScript SDK (@modelcontextprotocol/sdk), not a REST mock that pretends to be MCP.

Related MCP server: AKIMCP

Architecture (short)

One deployable Node process in production: Fastify serves /api/*, /mcp, and the Vite-built UI from apps/web/dist on a single origin.

Piece

Role

Fastify (apps/server)

Single HTTP server — API, MCP Streamable HTTP, static SPA

MCP server

Registers tools; Streamable HTTP at /mcp + optional stdio

MCP client

In-process SDK client → /mcp for tools/list & tools/call

React dashboard (apps/web)

Vite app; relative /api/* fetches (same origin in production)

SQLite

Notes, execution history, settings (node:sqlite)

Development still runs Vite (:5173) with a proxy to Fastify (:3847). See docs/ARCHITECTURE.md, docs/MCP_IMPLEMENTATION.md, and docs/DEPLOYMENT.md.

Prerequisites

  • Node.js 22.5+ (tested with Node 24; needs built-in node:sqlite)

  • npm 10+

  • Windows, macOS, or Linux

Install

npm install

Copy environment defaults:

# PowerShell
Copy-Item .env.example .env

# bash
cp .env.example .env

Run (development)

One command (server + web):

npm run dev

Or separately:

npm run dev:server   # http://127.0.0.1:3847
npm run dev:web      # http://127.0.0.1:5173

Open http://127.0.0.1:5173. The web app proxies /api and /mcp to the backend.

On first load, the UI fetches a session token from GET /api/session and sends it as X-Session-Token.

Production (single server)

npm run build
npm start

Or: npm run start:prod

This starts one Fastify process on http://127.0.0.1:3847 that serves:

  • Dashboard UI (apps/web/dist)

  • REST API (/api/*)

  • MCP Streamable HTTP (/mcp)

No separate frontend host for local/VPS production.

Vercel (Services)

Push this repo, then import as a multi-service project. vercel.json defines web (Vite at /) and server (Fastify at /api/* + /mcp). Storage is ephemeral on Vercel — see docs/DEPLOYMENT.md.

Stdio MCP server (Cursor / Claude Desktop)

npm run mcp:stdio -w @local-mcp/server

Example Cursor MCP config:

{
  "mcpServers": {
    "local-mcp-toolkit": {
      "command": "npx",
      "args": ["tsx", "apps/server/src/mcp/stdio-entry.ts"],
      "cwd": "E:/mcp project",
      "env": {
        "WORKSPACE_PATH": "./data/workspace",
        "DATABASE_PATH": "./data/db/toolkit.sqlite"
      }
    }
  }
}

Environment variables

Variable

Default

Notes

HOST

127.0.0.1

Loopback only recommended

PORT

3847

API + MCP HTTP

WORKSPACE_PATH

./data/workspace

Sandboxed files root

DATABASE_PATH

./data/db/toolkit.sqlite

App SQLite DB

LOG_LEVEL

info

Pino level

ALLOWED_ORIGINS

Vite origins

CORS allowlist

SESSION_TOKEN

auto-generated

Optional fixed token

LOCAL_AI_ENABLED

false

Optional Ollama status only

See .env.example for the full list.

Tests

npm run test:unit
npm run test:integration
npm test
npm run test:e2e

Scripts

Script

Purpose

npm run dev

Start API + web

npm run build

Build shared, server, web

npm run typecheck

TypeScript check

npm run lint

ESLint

npm run format

Prettier

npm run db:migrate

Apply SQLite migrations

npm run audit

Dependency audit

Security model

  • Loopback bind by default

  • Origin allowlist + Host loopback checks (DNS rebinding mitigation)

  • Session token for /api/*

  • Workspace path canonicalization, traversal rejection, symlink escape checks

  • Read-only SQL validator (SELECT only)

  • No shell execution, no eval

  • MCP DNS rebinding protection on Streamable HTTP transport

Details: docs/SECURITY.md.

Adding a tool

See docs/ADDING_TOOLS.md.

Troubleshooting

Issue

Fix

SQLite errors on old Node

Upgrade to Node 22.5+ / 24 (built-in node:sqlite)

CORS / 403 Origin

Add your UI origin to ALLOWED_ORIGINS

401 Unauthorized

Clear site data or call /api/session again

Empty tools list

Ensure server is on :3847 and MCP client can reach /mcp

File path errors

Use workspace-relative paths only

License

MIT

Local-MCP-Toolkit

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables an AI assistant to invoke local file operations, multi-engine web search, weather, system commands, developer utilities, and code execution over MCP, and includes a web dashboard for managing endpoints, testing tools, and viewing live logs.
    36 npm
    1
    MIT
  • F
    license
    Not graded
    quality
    A
    maintenance
    Exposes a governed suite of 38 tools over a single OAuth-gated MCP endpoint, letting web AI chat clients such as Claude, ChatGPT, and Grok operate on a local machine — reading and editing files, running whitelisted shell commands, searching, querying SQLite, driving browsers and DevTools, managing background jobs, ports, and clipboard. Local IDEs and Postman can also connect directly over localhost for offline, low-latency access.
    -
  • F
    license
    Not graded
    quality
    A
    maintenance
    Exposes 38 OAuth-gated tools over one MCP endpoint so web-based AI clients like Claude, ChatGPT, and Grok can read and edit local files, run whitelisted shell commands, search content, use Git, SQLite, browser automation, DevTools, clipboard, notifications, ports, and background jobs on your own machine. A strict command whitelist and folder restrictions keep the local operating surface governable and safe by default.
    -
  • A
    license
    Not graded
    quality
    A
    maintenance
    Exposes a governed suite of 38 OAuth-gated tools over one MCP endpoint, letting web-based AI chat clients read and edit files, run whitelisted shell commands, search, and use Git, SQLite, browser automation, DevTools, background tasks, ports, clipboard, notifications, and localhost services on the user's own machine. It also allows local IDEs and automation tools to connect directly over localhost for offline, low-latency access.
    MIT