MCP server for fake.py.
Project description
This project exposes all Faker class methods from fake.py as MCP tools using FastMCP 2.0.
Features
80+ fake.py fake data methods (names, text, internet, files, primitives, dates, geo, books, banking, file content), dynamically registered (no manual boilerplate), categorised and documented.
Binary outputs (e.g., images, PDFs) are returned as base64-encoded strings.
server_info tool for introspection.
Prerequisites
Python 3.9+
Installation
pip install fake-py-mcp
Usage
Run the server
STDIO
fake-py-mcp
HTTP
fake-py-mcp http
SSE
fake-py-mcp http
Connect with any MCP client to access all fake.py tools
Developers need good tools. Unfortunately, FastMCP does not come with a GUI (like OpenAPI/Swagger), but there are good tools available.
Option 1: MCP Inspector
Installation
brew install mcp-inspector
Usage
mcp-inspector ~/.venv/bin/python ~/fakepy_mcp.py
Option 2: mcpo
Installation
uv tool install mcpo
Usage
mcpo --config ./mcp-config.json --port 8006
Open http://127.0.0.1:8006/docs and enjoy OpenAPI Swagger comfort.
Documentation
Documentation is available on Read the Docs.
Tests
Run the tests with unittest:
python -m unittest fakepy_mcp.py
Or pytest:
pytest
Writing documentation
Keep the following hierarchy.
=====
title
=====
header
======
sub-header
----------
sub-sub-header
~~~~~~~~~~~~~~
sub-sub-sub-header
^^^^^^^^^^^^^^^^^^
sub-sub-sub-sub-header
++++++++++++++++++++++
sub-sub-sub-sub-sub-header
**************************
License
MIT
Support
For security issues contact me at the e-mail given in the Author section.
For overall issues, go to GitHub.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fake_py_mcp-0.1.tar.gz.
File metadata
- Download URL: fake_py_mcp-0.1.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d88faf2dbbbad1d32f4219f6c9ee3639f9de5b8fb5bf610a26dc0589856289c5
|
|
| MD5 |
d0fbaa587ddd934d357076310f97e4c6
|
|
| BLAKE2b-256 |
e0006cdbc0dc4832b36f188d3331baf10ea180677eaa2a54341a578e45a75c1f
|
File details
Details for the file fake_py_mcp-0.1-py3-none-any.whl.
File metadata
- Download URL: fake_py_mcp-0.1-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
961da0db80f9ec749c09e750e33546f4393aa8d898771d9ed39c2714d79d8b1f
|
|
| MD5 |
8f8bb50561a8fcf38c743aa6bb7f46f3
|
|
| BLAKE2b-256 |
49b07a1b62a42af4847f59bf5b98a877cd2d508e4b43f346b7a87ca275b5ee4c
|