App::MCP::CLI

mcpcli is a command-line client for servers that implement the Model Context
Protocol (MCP). It can list the tools a server offers, call a tool from the
shell, and run a chat session in which a local Ollama model decides which tool
to call.

FEATURES

    * stdio servers (launched as child processes) and HTTP/SSE servers
    * JSON configuration file with named servers
    * list, call, chat (alias interactive), servers and version commands
    * results on STDOUT, messages on STDERR, non-zero exit status on failure
    * request timeouts (--timeout) instead of hanging on a silent server

INSTALLATION

To install this module, run the following commands:

    perl Makefile.PL
    make
    make test
    make install

QUICK START

    mcpcli servers --config examples/server_config.json
    cd examples
    mcpcli list --server perl-math-server
    mcpcli call add_numbers --server perl-math-server a=10 b=5
    mcpcli chat --server perl-math-server        # needs Ollama

The examples/ directory has two small servers and a README that explains them.
The stdio example needs the MCP distribution from CPAN (MCP::Server); the SSE
example needs HTTP::Daemon.

LIMITATIONS

    * Tools only: MCP resources and prompts are not supported yet.
    * HTTP transport is the older HTTP+SSE transport (protocol 2024-11-05).
      The newer Streamable HTTP transport is not supported yet.
    * No authentication headers for remote servers yet.
    * The chat command supports Ollama only (set OLLAMA_HOST for a non-default
      address).

SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the perldoc
command.

    perldoc App::MCP::CLI
    perldoc mcpcli

You can also look for information at:

    BUG Report
        https://github.com/manwar/App-MCP-CLI/issues

    Search MetaCPAN
        http://metacpan.org/dist/App-MCP-CLI/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Mohammad Sajid Anwar

This program is free software; you can redistribute it and / or modify it under
the terms of the the Artistic License (2.0). You may obtain a copy of the full
license at:

http://www.perlfoundation.org/artistic_license_2_0
