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.10+
Installation
uv tool install fake-py-mcp
Usage
Run the server
STDIO
fake-py-mcp
HTTP
fake-py-mcp http
SSE
fake-py-mcp sse
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
Run MCP Inspector on port 8006:
CLIENT_PORT=8006 mcp-inspector fake-py-mcp
Or if you prefer no-auth option:
DANGEROUSLY_OMIT_AUTH=true CLIENT_PORT=8006 mcp-inspector fake-py-mcp
Open http://127.0.0.1:8006 and enjoy the MCP Inspector interface.
Option 2: mcpo
Installation
uv tool install mcpo
Usage
Run mcpo on port 8006:
mcpo --port 8006 -- fake-py-mcp
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 test_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.2.tar.gz.
File metadata
- Download URL: fake_py_mcp-0.2.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fe6daf16a596dc27b49f6e046461d5c5c2a6354e52fe3e52800ca70b4adc294
|
|
| MD5 |
05731ccf4042adb1c0808e0991e3f81f
|
|
| BLAKE2b-256 |
8ff9d8274f0732296f747381dca2d95be8b1895a382d0c98a9c64c964779bc81
|
File details
Details for the file fake_py_mcp-0.2-py3-none-any.whl.
File metadata
- Download URL: fake_py_mcp-0.2-py3-none-any.whl
- Upload date:
- Size: 7.0 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 |
92edcc1a9a1f805200d99c300b72b967270547273fb8e4e1c335635f8d5bfb48
|
|
| MD5 |
13146850f1539920333816d8f8b217ce
|
|
| BLAKE2b-256 |
21a56d9281e8131bb347cd829508467f5bb0fd856a2904d68431a05aa7e8079a
|