Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jotsu_mcp-0.5.0.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jotsu_mcp-0.5.0-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

Details for the file jotsu_mcp-0.5.0.tar.gz.

File metadata

  • Download URL: jotsu_mcp-0.5.0.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

Hashes for jotsu_mcp-0.5.0.tar.gz
Algorithm Hash digest
SHA256 8ead0b9052ab9b2df8bab5176305a68ab816bcbfd9b500c339d367e33568fb46
MD5 2bde07074195a022735b29cc6b9b4a53
BLAKE2b-256 89c7b1eca53020f7ca159bbffaf3f7b72288232b8978f771ee9f7850dde5f874

See more details on using hashes here.

File details

Details for the file jotsu_mcp-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: jotsu_mcp-0.5.0-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

Hashes for jotsu_mcp-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5dc9383e955eecab98a76420635ce353a03f3d315c15caf71fdfd09236dc422
MD5 a31d8d6a0842cc02c5ab8182678792b4
BLAKE2b-256 e7142abc6da78c43939b6e148dfcdd5d2ef0e96cf7aaa392aa117a594ca43db0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page