A minimalistic MCP client for testing MCP Server
Project description
MCP Client for Testing
A minimalistic MCP (Model Context Protocol) client for testing tool calls in MCP servers.
Usage
Install uv and test a tool call in an MCP server like this:
uvx mcp-client-for-testing \
--config '
[
{
"name": "name of mcp server",
"command": "uv",
"args": [
"--directory",
"path/to/root/dir/",
"run",
"server.py"
],
"env": {}
}
]
' \
--tool_call '{"name": "tool-name", "arguments": {}}'
To use it as in your code, install the package with:
uv pip install mcp-client-for-testing
and use it like this:
import asyncio
import json
from mcp_client_for_testing.client import execute_tool
async def main():
config = [
{
"name": "name of mcp server",
"command": "uv",
"args": [
"--directory",
"path/to/root/dir/",
"run",
"server.py"
],
"env": {}
}
]
tool_call = {"name": "tool-name", "arguments": {}}
await execute_tool(config, tool_call)
if __name__ == "__main__":
asyncio.run(main())
Development
Installation from source
- Clone the repo
git clone git@github.com:piebro/mcp-client-for-testing.git. - Go into the root dir
cd mcp-client-for-testing. - Install in development mode:
uv pip install -e .
Building with uv
If you want to build distribution packages:
uv build
Releasing a New Version
To release a new version of the package to PyPI:
- Create and push a new Git tag following semantic versioning:
git tag v0.2.0 git push origin v0.2.0
The GitHub Actions workflow will automatically build and publish the package to PyPI when a new tag is pushed. The version number will be derived directly from the Git tag.
License
This project is licensed under the MIT License. See the LICENSE file for details.
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 mcp_client_for_testing-0.1.3.tar.gz.
File metadata
- Download URL: mcp_client_for_testing-0.1.3.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57a8c41644917fd0d52ed2014502a1ed8b608f8727a56f037d436875fe719363
|
|
| MD5 |
df676bee10e25d1ab17f00b803c24c2f
|
|
| BLAKE2b-256 |
e6c328ff05eb3f5f8d4696d3c06a02e308f95877c00b78e41393ceacb414dd35
|
Provenance
The following attestation bundles were made for mcp_client_for_testing-0.1.3.tar.gz:
Publisher:
publish.yml on piebro/mcp-client-for-testing
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_client_for_testing-0.1.3.tar.gz -
Subject digest:
57a8c41644917fd0d52ed2014502a1ed8b608f8727a56f037d436875fe719363 - Sigstore transparency entry: 195611894
- Sigstore integration time:
-
Permalink:
piebro/mcp-client-for-testing@1302cc4569c1280df5a0a694ad42e0ef279720ed -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/piebro
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1302cc4569c1280df5a0a694ad42e0ef279720ed -
Trigger Event:
push
-
Statement type:
File details
Details for the file mcp_client_for_testing-0.1.3-py3-none-any.whl.
File metadata
- Download URL: mcp_client_for_testing-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
989ff89b68c0d0e0060f50ff0571040e7a8a768dd860a6fa1f8b05c619ecb07e
|
|
| MD5 |
48614dfbd2ffecae57e1da9ef4cf90ac
|
|
| BLAKE2b-256 |
b48be1c9fa043e296cd299a8d545dbeb044566781ce923fdb59aaf8451b80cc6
|
Provenance
The following attestation bundles were made for mcp_client_for_testing-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on piebro/mcp-client-for-testing
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_client_for_testing-0.1.3-py3-none-any.whl -
Subject digest:
989ff89b68c0d0e0060f50ff0571040e7a8a768dd860a6fa1f8b05c619ecb07e - Sigstore transparency entry: 195611898
- Sigstore integration time:
-
Permalink:
piebro/mcp-client-for-testing@1302cc4569c1280df5a0a694ad42e0ef279720ed -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/piebro
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1302cc4569c1280df5a0a694ad42e0ef279720ed -
Trigger Event:
push
-
Statement type: