Simple CLI REPL for Model Context Protocol (MCP)
Since many months I’ve been working with the Model Context Protocol (MCP) and I found myself frustrated with the available tools to easily access and test them. It is not not even for building your own servers, but just to connect to already made and look around what’s possible. I couldn’t find anything that quite suited my needs - something leightweight, simple to use and CLI-based. And I’m not a big fan of the standard MCP Inspector.
So, I decided to build my own: https://github.com/kkokosa/repl-mcp - a simple, interactive CLI tool for testing MCP servers.
The idea was to have a lightweight, REPL-style (Read-Eval-Print Loop) environment where I could quickly poke at tools, prompts, and resources without any overhead.
Key Features:
- Interactive REPL - command history and tab autocompletion
- Inspect Everything - list and inspect available tools, prompts, and resources
- Call Tools - execute tools both with JSON or interactive parameter input
- Transport Support - works with both Stdio and HTTP transports
- Syntax Highlighting - clean, readable terminal output
Examples
Simple local server via stdio - filesystem
You can try it out with the server-filesystem MCP server. In this case we choose --command (or -c) option to run the server on our own (remember to npm install it beforehand):
repl-mcp -c "npx -y @modelcontextprotocol/server-filesystem /tmp"
Remote server with API token - GitHub
If we want to access remote MCP server, we can use --url/-u option, but bear in mind authorization - they (hopefuly!) require some kind of them.
Some of them may accept API token, like in case of official GitHub MCP Server, which we provide as Bearer token (and use HTTP transport):
repl-mcp -u https://api.githubcopilot.com/mcp/ -t http -H Authorization:"Bearer github_pat_..."
Remote servier with OAuth - Atlassian
Many MCP servers rely on OAuth 2.x flow to authorize the user, which is more tricky. In such case we need to support the full OAuth flow, which requires exposing a public endpoint to the Internet (point 8 in the link), to log in to the given service and let the callback return to us. That could be responsibility of my repl-mcp but there’s already a handy mcp-remote proxy MCP server.
Let’s see in action while trying to use Atlassian Remote MCP Server. It is hosted at https://mcp.atlassian.com/v1/mcp and requires OAuth 2.1 authorization flow. “Supported clients” like ChatGPT, Claude or Google Gemini handle authorization flow out of the box. But as we can read in the docs, their MCP server: “also supports any local MCP-compatible client that can run on localhost and connect to the server via the mcp-remote proxy”.
This is exactly what we will do! Here are the steps:
- run
mcp-remoteproxy:npx mcp-remote https://mcp.atlassian.com/v1/mcp - see what port it is using, like
Using existing client port: 3736 - run ngrok or similar tool to expose the port:
ngrok.exe http --domain some-words-here.ngrok-free.app http://localhost:3736 - also, we need to configure Atlassian to accept/trust our callback domain - in Administration panel, we need to add our [[ngrok]]-based domain to Apps -> AI settings -> Rovo MCP server like
https://some-words-here.ngrok-free.app/** - go to the link printed in the
mcp-remote, something like:... Please authorize this client by visiting: https://mcp.atlassian.com/v1/authorize?response_type=code&client_id=Y... ... - After logging in/authorizing, the callback will be send (via ngrok) to the mcp-proxy and received token will be stored. Close
mcp-remote. We won’t need to repeat it every time. - Run the proxy under
repl-mcpand enjoy your Atlassian access!repl-mcp -c "npx mcp-remote https://mcp.atlassian.com/v1/mcp"