local-context
Enables querying SQLite databases through a SQL query tool, with read-only access by default and optional write support when configured; also supports SQLite sources defined in the server or project configuration.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@local-context find all TODO comments in the src folder"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Local Context
Local MCP server for Claude Desktop and Claude Code. It runs on your machine and can:
list, search, and read files
run one terminal command
query SQLite
run named tasks on a schedule, without calling Claude
Python 3.11+ is the only requirement. The server does not call the Claude API. Tool results are capped (4,000 characters by default, 16,000 max) so a read cannot dump a whole file into the chat.
Claude Desktop
Install Python 3.11+. On Windows,
py -3 --versionshould work.Open Settings → Developer → Edit Config. That opens the config file this install actually reads.
Add a server. Use the full path to
run.cmdon Windows so the Microsoft Storepythonstub is not used:
{
"mcpServers": {
"local-context": {
"command": "C:\\path\\to\\local-context\\run.cmd",
"env": {
"PYTHONUNBUFFERED": "1",
"PYTHONIOENCODING": "utf-8",
"LOCAL_CONTEXT_ROOT": "C:\\path\\to\\folder\\claude\\may\\use"
}
}
}
}On macOS or Linux, set command to python3 and args to ["/path/to/local-context/run.py"].
Quit Claude completely and open it again.
Settings → Developer → Local MCP servers should list
local-context.
LOCAL_CONTEXT_ROOT is the folder Claude may read and use as the shell working directory.
Related MCP server: MCP Server Toolkit
Claude Code
From this directory:
claude --plugin-dir .From GitHub, add this repository as a marketplace, then install local-context@local-context-market.
Tools
Tool | Returns |
| Names in a directory |
| Matching lines |
| A text slice ( |
| One command, output capped |
| SQLite rows, read-only unless you opt in |
| A data source from config |
| Status only; command output stays on disk |
| Named local tasks |
| Roots, caps, and |
Plug in data
Copy config.example.json to config.json (gitignored). Source types: file, directory, json, csv, sqlite, command.
A project can also ship .local-context.json with file, directory, json, csv, or sqlite sources inside that project. It cannot add shell access, tasks, or command sources.
query_sql runs one statement. Writes need "allow_sql_writes": true and a sqlite source with "read_only": false.
Run due tasks without Claude:
py -3 run.py --runner --onceevery_seconds: 0 means manual only. Point Task Scheduler or cron at --once.
Limits
The process runs as you. It is not a sandbox.
Reads and the shell working directory stay under an allowed root, or a source you configured.
Symlinks are followed only when the real file is still inside that area.
.claude,.claude.json, and the Claude Desktop credential folders are blocked.Commands do not inherit Anthropic environment variables. Commands that name those credential files, the Anthropic API, encoded PowerShell, disk format, or shutdown are refused.
A command can still open some other file by absolute path.
Regex search does not allow
*,+,?, or{.
Develop
py -3 -m pip install pytest
py -3 -m pytestAvailable Tools
12 toolslist_dirARead-only
List names in an allowed directory. Does not read file contents.
Inputs: path, limit.
list_sourcesARead-only
List configured external data sources by name and type.
Inputs: no named parameters.
list_tasksBRead-only
List named local tasks.
Inputs: no named parameters.
query_sqlBRead-only
Run one SQLite statement. Ad-hoc files are read-only. Rows are capped.
Inputs: sql (required), limit, database.
read_fileCRead-only
Read a capped text slice. offset is a character offset.
Inputs: path (required), limit, offset.
read_sourceBRead-only
Read a capped slice of a configured source. pointer is a JSON pointer.
Inputs: name (required), path, limit, offset, +1 more.
refresh_sourceBDestructive
Run a command source locally and store its output. Returns a short status, not the output.
Inputs: name (required).
run_commandADestructive
Run one command inside an allowed root. Output is capped. Anthropic credentials are removed from the child environment.
Inputs: command (required), cwd, timeout_seconds.
run_taskCDestructive
Run one named task locally and return a capped status.
Inputs: name (required).
search_textARead-only
Search text under an allowed root. Returns capped matching lines.
Inputs: query (required), path, limit, regex.
server_statusARead-only
Show roots, caps, and that this server makes no Claude API calls.
Inputs: no named parameters.
task_statusBRead-only
Read a capped slice of the latest stored task output.
Inputs: name, offset.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Tools are mostly distinct by resource and action: files, sources, tasks, commands, SQL, and server status each have clear boundaries. There is mild overlap between read_file/read_source and run_command/run_task/refresh_source, but the descriptions generally help an agent choose correctly.
Names are consistently snake_case and mostly follow a verb_noun pattern such as list_dir, read_file, run_command, and refresh_source. The two *_status tools break the verb_noun pattern, but the overall convention remains predictable and readable.
Twelve tools sit comfortably within the expected 3-15 range for this kind of local-context server. Each tool maps to a clear capability area—file browsing, search, execution, SQL, sources, tasks, and status—with no obvious filler.
The core local-context workflows are covered: listing, searching, reading, command execution, SQL querying, source access, task execution, and status introspection. Explicit write/edit and create/delete operations for files, sources, or tasks are absent, but run_command provides partial workarounds and some configuration may be external.
Related MCP Connectors
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Use your own Windows, Mac or Linux computer from ChatGPT, Claude, Cursor or Gemini CLI: run commands, read, write and search files, run long processes. Your computer only makes an outgoing connection (no open ports or VPN). Read-only mode, allowed folders, blocked commands and an action log keep you in control. Free plan available.
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Safe folder access for ChatGPT and Claude: read, write and search files, risky tools opt-in.
Related MCP Servers
- AlicenseAqualityBmaintenanceProvides Claude Desktop with direct access to your local file system for development tasks, enabling file operations (read, write, edit), directory browsing, command execution, and codebase search within a configured projects directory.6MIT
- AlicenseAqualityDmaintenanceProvides filesystem, web search, SQLite, and system tools for AI assistants like Claude, enabling secure access to local resources and the web.6MIT
- FlicenseNot gradedqualityDmaintenanceEnables Claude to perform file operations, retrieve system information, run calculations, and generate timestamps on the local system.-
- FlicenseNot gradedqualityBmaintenanceEnables Claude Desktop or other MCP clients to execute shell commands, read/write files, and list directories on the local machine. Includes basic safety guardrails to block obviously destructive operations.-