Skip to main content

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 file 'workflow.json' in the current directory.

Run it:

jotsu-mcp workflow run ./workflow.json

The output consists of three messages: the workflow start, the single node’s message, and the workflow end. The final result appears in the result field of the workflow-end node, which in this example is an empty object.

Hello MCP

The workflow can call a tool from an MCP server. This allows you to use MCP with models that don't yet support it (really any model other than Claude).

Add the following server entry:

{
    "id": "hello",
    "name": "Hello World",
    "url": "https://hello.mcp.jotsu.com/mcp/"
}

NOTE: IDs may only contain lowercase letters, numbers, :, _, or -. 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 a node for a server tool.

[
    {"id":  "greet", "type":  "tool", "name": "greet", "server_id":  "hello"}
]

Add some initial data that the 'greet' tool needs:

{"name": "World"}

By default, the workflow starts with the first node, but you can also explicitly set the start node:

"start_node_id": "greet"

Finally, add a 'generic' node at the end. Generic nodes are application-specific - meaning the workflow only handles them by yielding the data - and are generally used for output and/or debugging.
The type can be any string not already used by the workflow. In this case, 'output'.

Full Workflow
{
    "id": "quickstart",
    "name": "quickstart",
    "description": "Simple workflow to interact with the 'hello' MCP server",
    "nodes": [
        {"id":  "greet", "type":  "tool", "name": "greet", "server_id":  "hello", "edges":  ["output"]},
        {"id":  "output", "type":  "output", "name": "The result"}
    ],
    "servers": [
        {
            "id": "hello",
            "name": "Hello World",
            "url": "https://hello.mcp.jotsu.com/mcp/"
        }
    ],
    "data": {"name":  "World"},
    "metadata": null
}

Running this workflow again generates a lot more data, but specifically there is a line similar to:

{
  "action": "default",
  "timestamp": 132462.392532502,
  "id": "01k3h80zcaz050eg7080r3fnv7",
  "run_id": "01k3h80t6psmg0s5swsg4yke95",
  "node": {
    "id": "output",
    "name": "The result",
    "type": "output"
  },
  "data": {
    "name": "World",
    "greet": "Hello, World!"
  }
}

The data from this node acts as the 'result' of the workflow. Since workflows can have many branches there is one 'result', instead there could be many such lines depending upon the actions the workflow took.

Development

uv venv
uv pip install '.[dev,cli,anthropic,openai,cloudflare,cryptography]'

Metadata

Release files for jotsu-mcp 0.24.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jotsu-mcp 0.24.0
File Size Uploaded Provenance
jotsu_mcp-0.24.0.tar.gz 43.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for jotsu-mcp 0.24.0
File Interpreter ABI Platform
jotsu_mcp-0.24.0-py3-none-any.whl Python 3 none any Details

Total release size: 99.9 kB

Release files / jotsu_mcp-0.24.0.tar.gz

Download URL jotsu_mcp-0.24.0.tar.gz
Size 43.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6a24a796c715f6c61508bd9b6b69027dd198aa48968b7ca008886bf37ec1c230
BLAKE2b-256 checksum
How to use checksums
0dcc3eedc5d346ec6fc620ed4f15c19037e835469eab5292bfe753b7b9c4acc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release files / jotsu_mcp-0.24.0-py3-none-any.whl

Download URL jotsu_mcp-0.24.0-py3-none-any.whl
Size 57.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f1b738f2c7f1a39d75d14da7549475e0cbba78de7b7657fa2a1662822603baa
BLAKE2b-256 checksum
How to use checksums
e33c6a760fc7e8d3e87125687a47e785a3735d3e026d4fcf8e0c06d6622f8eb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Security for jotsu-mcp 0.24.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.24.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page