faraztools-mcp
OfficialA personal, locally-run MCP (stdio) server that exposes small utility tools any MCP-capable AI client can call — though the schema currently advertises only two of them.
markdown_to_pdf— convert Markdown (inline text or an.mdviainput_path) into a styled PDF atoutput_path, using athemepreset (default,compact,academic) or a JSON theme file, plus an optionaltitleblock. Supports headings, emphasis, links, lists, blockquotes, fenced code, tables, rules and local images; returns the written path.echo— echo given text back to the caller; a deliberately minimal example tool.Not registered (README-only) — the README also advertises SQLite querying/schema, DuckDB query/describe/write for CSV/Parquet/JSON, text diff, regex search/replace, JSON format/validate/JMESPath query, and CSV→Markdown/JSON/profile tools, none of which appear in the current schema.
Runs read-only SQL against DuckDB, querying CSV, Parquet and JSON files or an existing .duckdb database, describing columns/types/row counts and samples, and writing query results out to .csv, .tsv, .parquet or .json/.ndjson files (never overwriting an existing file unless overwrite=True).
Runs read-only SQL queries against SQLite database files, returning rows as tables, and inspects a database's structure by describing its tables, columns and indexes.
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., "@faraztools-mcp convert notes.md to a PDF with the academic theme"
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.
faraztools-mcp
A personal MCP server — the small utilities I reach for on a regular basis, exposed as tools any MCP-capable AI client can call.
It runs locally over stdio: the host application launches it as a subprocess and speaks MCP over the process's stdin/stdout. No port, no daemon, no network surface.
Table of contents
Related MCP server: toolbox-mcp
What this is
A home for the one-off scripts and helpers that keep getting rewritten. Instead of copying a snippet around, each utility becomes a tool with a name, a description, and a typed input schema — all of which the SDK derives from a plain, type-hinted Python function.
Written against v2 of the official MCP Python SDK. Two notes for anyone reading the code:
The high-level server class is
MCPServer— v1'sFastMCP, renamed. The import isfrom mcp.server import MCPServer.Transport options (
host,port, …) belong onmcp.run(), never on the constructor.
Tools
Documents
Tool | Description |
| Convert Markdown into a styled PDF: headings, emphasis, links, lists, blockquotes, syntax-highlighted code, tables, rules and local images. Takes |
PDF rendering is done by Typst via the typst wheel — no system
binaries, no headless browser, no LaTeX.
Data & text
Everything here is standard library except json_query, which uses
JMESPath (pure Python, MIT, no transitive dependencies).
Tool | Description |
| Run a read-only SQL query against a SQLite file; rows come back as a table. |
| Describe the tables, columns and indexes of a SQLite database. |
| Unified diff between two blocks of text. |
| Find regular-expression matches with their capture groups and offsets. |
| Regular-expression substitution, reporting how many replacements were made. |
| Pretty-print JSON, or compact it with |
| Check JSON syntax, and optionally validate against a JSON Schema. |
| Extract part of a JSON document with a JMESPath expression. |
| Render CSV data as a Markdown table. |
| Convert CSV into a JSON array of objects. |
| Profile CSV columns: inferred type, blanks, distinct values, numeric range. |
Data files (DuckDB)
DuckDB reads CSV, Parquet and JSON directly, so these tools query and
convert data files with plain SQL. The duckdb wheel bundles its own engine — no system
libraries — and extension auto-install is switched off, so nothing is fetched from the network.
Tool | Description |
| Run a read-only SQL query, reading CSV/Parquet/JSON files or a |
| Columns, types, row count and a sample of a data file or database table. |
| Run a query and write the result to |
Database files are always opened read-only and only a single read-only statement is accepted, so
the only thing these tools can write is an explicit output_path — and never over an existing
file unless overwrite=True is passed.
echo is a deliberately minimal example tool — see Adding a tool.
Requirements
uv — dependency and environment management
Python 3.12+
Quick start
git clone <this-repo> faraztools-mcp
cd faraztools-mcp
uv syncThat's it — uv sync creates .venv and installs everything from uv.lock.
Run
uv run faraztools-mcp
# or, equivalently
uv run python -m faraztools_mcpUnder stdio the server prints nothing and waits on stdin for a host to connect. A silent terminal means it is working, not hung.
Development
uv run pytest # tests (in-memory, no subprocess)
uv run ruff format . # format
uv run ruff check . --fix # lint
uv run pyright # type check
uv run mcp dev src/faraztools_mcp/server.py --with-editable . # MCP Inspector (needs npx)--with-editable . is required for mcp dev: the Inspector runs the server in its own isolated
environment and needs this package importable there.
Conventions and the full tool-adding recipe live in AGENTS.md.
Connect an AI client
The launch command
Every client below launches the same command. Clone this repo somewhere permanent and replace
/path/to/faraztools-mcp with that location:
uv run --directory /path/to/faraztools-mcp faraztools-mcpSo the pieces to translate into each client's config format are always:
Field | Value |
command |
|
args |
|
Tip:
uv runre-syncs the environment on each launch (it's a no-op once in sync), so you never manage a virtualenv by hand. Use an absolute path — hosts don't launch the server from this repo.
Command Code
CLI:
cmd mcp add faraztools -- uv run --directory /path/to/faraztools-mcp faraztools-mcpOr drop this in .mcp.json at your project root (cmd mcp add-json accepts the same object):
{
"mcpServers": {
"faraztools": {
"transport": "stdio",
"command": "uv",
"args": ["run", "--directory", "/path/to/faraztools-mcp", "faraztools-mcp"]
}
}
}Verify with /mcp in a session. Tools appear as mcp__faraztools__<tool>.
Claude Code
CLI (one line, -- separates the server command):
claude mcp add faraztools -- uv run --directory /path/to/faraztools-mcp faraztools-mcpOr commit .mcp.json at your project root to share it:
{
"mcpServers": {
"faraztools": {
"type": "stdio",
"command": "uv",
"args": ["run", "--directory", "/path/to/faraztools-mcp", "faraztools-mcp"]
}
}
}Add --scope user to make it available across all projects. Check it with claude mcp list, or
/mcp inside a session.
Claude Desktop
Edit claude_desktop_config.json:
OS | Path |
macOS |
|
Windows |
|
Linux |
|
{
"mcpServers": {
"faraztools": {
"command": "uv",
"args": ["run", "--directory", "/path/to/faraztools-mcp", "faraztools-mcp"]
}
}
}Restart Claude Desktop afterwards. The uv binary must be resolvable — if not, use its full path
(which uv).
Cursor
Project config at .cursor/mcp.json, or global at ~/.cursor/mcp.json:
{
"mcpServers": {
"faraztools": {
"type": "stdio",
"command": "uv",
"args": ["run", "--directory", "/path/to/faraztools-mcp", "faraztools-mcp"]
}
}
}Enable it under Settings → MCP, then check the MCP Logs output channel if it doesn't connect.
VS Code (GitHub Copilot)
Workspace config at .vscode/mcp.json — note VS Code uses a servers key, not mcpServers:
{
"servers": {
"faraztools": {
"type": "stdio",
"command": "uv",
"args": ["run", "--directory", "/path/to/faraztools-mcp", "faraztools-mcp"]
}
}
}Approve the trust prompt on first start. For a machine-wide setup, run MCP: Open User Configuration instead.
Codex
Add to ~/.codex/config.toml (or .codex/config.toml for a single trusted project):
[mcp_servers.faraztools]
command = "uv"
args = ["run", "--directory", "/path/to/faraztools-mcp", "faraztools-mcp"]Or via the CLI:
codex mcp add faraztools -- uv run --directory /path/to/faraztools-mcp faraztools-mcpcodex mcp list shows configured servers; /mcp lists them in the TUI.
OpenCode
Add to opencode.json (project) or ~/.config/opencode/opencode.json (global). OpenCode's
command is a single array holding the command and its arguments:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"faraztools": {
"type": "local",
"command": ["uv", "run", "--directory", "/path/to/faraztools-mcp", "faraztools-mcp"],
"enabled": true
}
}
}Windsurf
Edit mcp_config.json (open it from the Cascade panel's ... → Open MCP config file):
OS | Path |
macOS / Linux |
|
Windows |
|
{
"mcpServers": {
"faraztools": {
"command": "uv",
"args": ["run", "--directory", "/path/to/faraztools-mcp", "faraztools-mcp"]
}
}
}Zed
Add to your Zed settings.json — Zed's key is context_servers:
{
"context_servers": {
"faraztools": {
"command": "uv",
"args": ["run", "--directory", "/path/to/faraztools-mcp", "faraztools-mcp"]
}
}
}Or use Settings → AI → MCP Servers → Add Server → Add Local Server.
Any other MCP client
If a client supports stdio MCP servers, it needs only the command and args from
the launch command. Most use an mcpServers object with command + args;
a few differ (VS Code uses servers, Zed uses context_servers, OpenCode uses mcp with an array
command). Point the client at the launch command and it works.
Adding a tool
Create
src/faraztools_mcp/tools/<name>.pyexposing aregister(mcp)function:from mcp.server import MCPServer def register(mcp: MCPServer) -> None: @mcp.tool() def my_tool(arg: str) -> str: """One sentence describing what the model should use this for.""" return argRegister the module in
src/faraztools_mcp/tools/__init__.py(import it, add it to_MODULES).Add
tests/test_<name>.pyusing the in-memory client pattern.
The docstring is the description the model sees and the type hints are the input schema — write both deliberately. Full details in AGENTS.md.
Layout
src/faraztools_mcp/
├── __init__.py # re-exports `mcp`
├── server.py # builds MCPServer, registers tools, `main()`
├── __main__.py # `python -m faraztools_mcp`
├── md_to_pdf/ # Markdown -> PDF (Typst): theme, converter, renderer, template
└── tools/
├── __init__.py # `_MODULES` registry + `register_all(mcp)`
├── _support.py # shared helpers (bounded output, Markdown tables, SQL quoting)
├── duckdb.py # duckdb_query, duckdb_describe, duckdb_write_file
├── echo.py # example tool module
├── json_tools.py # json_format, json_validate, json_query
├── md_to_pdf.py # the markdown_to_pdf tool
├── sqlite.py # query_sqlite, sqlite_schema
├── tabular.py # csv_to_markdown, csv_to_json, csv_profile
└── text.py # text_diff, regex_search, regex_replace
tests/
├── conftest.py # anyio_backend fixture
├── test_duckdb.py
├── test_echo.py
├── test_json_tools.py
├── test_md_to_pdf.py
├── test_sqlite.py
├── test_tabular.py
└── test_text.pyLicense
MIT © Faraz Mazhar
Available Tools
2 toolsechoA
Echo the given text back to the caller.
Inputs: text (required). Returns: result
markdown_to_pdfA
Convert Markdown into a styled PDF file and return the path written.
Pass the document either as markdown text or as input_path pointing at a
.md file (exactly one of the two). output_path is where the PDF is written.
theme is a preset name ("default", "compact", "academic") or a path to a
JSON file overriding theme keys such as margin_cm, accent, font_size_pt or
heading_numbering. title adds a centred title block above the content.
Supports headings, emphasis, links, lists, blockquotes, fenced code, tables, rules and local images (resolved relative to the input file). Remote image URLs are not fetched.
Inputs: output_path (required), theme, title, markdown, +1 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have completely different purposes: one echoes text, the other converts Markdown to PDF. There is no overlap or ambiguity between them.
Both names are lowercase and readable, and 'markdown_to_pdf' uses snake_case while 'echo' is a simple verb. Though the pattern is not perfectly uniform, the names are clear and conventional.
With only two tools, the server is on the thin side. The 'faraztools' name suggests a broader toolkit, but for such a minimal set, the count is borderline acceptable.
The tools are unrelated and the domain is unclear—there is no cohesive surface to assess. Beyond echo and Markdown-to-PDF conversion, many common utilities are missing relative to the generic server name.
Related MCP Connectors
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.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Everyday tools for AI agents, paid per call with x402: images, markdown, speech-to-text, embeddings.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables local tool calling over Model Context Protocol via stdio, providing deterministic tools such as calc.add, text.word_count, and text.summarize_naive after JSON-RPC handshake and discovery.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI hosts to call deterministic tools such as echo, add, reverse, read/write files, and a C++-implemented two_sum via the MCP stdio interface.Apache 2.0
- AlicenseAqualityDmaintenanceEnables an AI agent to run local tools on the user's own machine via stdio, including command execution, workspace file read/write, and system status checks.52MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to discover and execute operational tools such as database mutations and system diagnostics over stdio, with deterministic structured outputs and Langfuse observability.ISC