Versatile library for the Model Context Protocol (MCP), primarily designed for handling authentication.
Project description
Jotsu MCP
General-purpose library for implementing the Model Context Protocol (MCP) and creating workflows that use MCP tools, resources and prompts.
Quickstart
Install the package, including the CLI.
pip install jotsu-mcp[cli]
Create an empty workflow.
jotsu-mcp workflow init
The initialization command creates a workflow 'workflow.json' in the current directory.
Run it:
jotsu-mcp workflow run ./workflow.json
The output is only the start and end messages since the workflow doesn't have any nodes.
Add the following server entry:
{
"id": "hello",
"name": "Hello World",
"url": "https://hello.mcp.jotsu.com/mcp/"
}
NOTE: don't forget the path /mcp/ on the URL.
This server is a publicly available MCP server (with no authentication) that has a couple of resources and a tool. (The code is available here).
Next add nodes for the server resources.
[
{"id": "get_greeting", "type": "resource", "name": "resource://greeting", "server_id": "hello", "edges": ["get_config"]},
{"id": "get_config", "type": "resource", "name": "data://config", "server_id": "hello", "edges": ["greet"]},
{"id": "greet", "type": "tool", "name": "greet", "server_id": "hello"}
]
Finally, add some initial data that the 'greet' tool needs.
{"name": "World"}
Full Workflow
{
"id": "quickstart",
"name": "quickstart",
"description": "Simple workflow to interact with the 'hello' MCP server",
"event": {
"name": "Manual",
"type": "manual",
"metadata": null
},
"nodes": [
{"id": "get_greeting", "type": "resource", "name": "resource://greeting", "server_id": "hello", "edges": ["get_config"]},
{"id": "get_config", "type": "resource", "name": "data://config", "server_id": "hello", "edges": ["greet"]},
{"id": "greet", "type": "tool", "name": "greet", "server_id": "hello"}
],
"servers": [
{
"id": "hello",
"name": "Hello World",
"url": "https://hello.mcp.jotsu.com/mcp/"
}
],
"data": {"name": "World"},
"metadata": null
}
Running it again generates:
Project details
Release history Release notifications | RSS feed
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 jotsu_mcp-0.5.1.tar.gz.
File metadata
- Download URL: jotsu_mcp-0.5.1.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57be66e5f1e9f5dbcdd171105f5ee05ee083ef4730c4bf152451d19cc288cc88
|
|
| MD5 |
e199ba0bafcbea92ace8737d16029d76
|
|
| BLAKE2b-256 |
3faee933283c25ef575cce067990d9f7b5dc980736685bcc01714d7e01a96b2a
|
File details
Details for the file jotsu_mcp-0.5.1-py3-none-any.whl.
File metadata
- Download URL: jotsu_mcp-0.5.1-py3-none-any.whl
- Upload date:
- Size: 31.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba78026972870869278dd78a902eeabb6bca71352365532b2f26d33f66605b0f
|
|
| MD5 |
07898ae685d5cec712902261c438356a
|
|
| BLAKE2b-256 |
c1cb6c4cfe546815fde2daf8b3fce65f793040b0059e0b6d6608cf283ed867cc
|