MCP ExplorerExplorer

Xprchatusingmcp

@squdgyon 10 months ago
1 MIT
FreeCommunity
AI Systems
XprChatUsingMcp is a CLI chat app utilizing local Ollama and multiple MCP servers.

Overview

What is Xprchatusingmcp

XprChatUsingMcp is a simple command-line interface (CLI) chat application that utilizes local Ollama and multiple MCP servers to facilitate chat interactions.

Use cases

Use cases for XprChatUsingMcp include checking cryptocurrency balances, retrieving company histories via web searches, and querying supported tokens on the XPR Network.

How to use

To use XprChatUsingMcp, ensure that you have the required prerequisites installed, including .Net 9.x, Ollama, and a Brave Search API key. Set the necessary environment variables, specify the path to the xpr-mcp server, and run the application using the command ‘dotnet run’.

Key features

Key features of XprChatUsingMcp include integration with local Ollama for processing chat queries, support for multiple MCP servers (XPR and Brave Search), and the ability to execute complex prompts based on user input.

Where to use

XprChatUsingMcp can be used in various fields such as cryptocurrency analysis, web search, and any application requiring interactive chat functionalities with data retrieval capabilities.

Content

XprChatUsingMcp

This is a simple CLI chat application which uses local Ollama and multiple MCP servers.

graph TD
    A[Agent] -->|Query| D[Ollama]
    D -->|Request| B[XPR MCP Server]
    D -->|Request| C[Brave Search MCP Server]
    B -->|Call| E[XPR APIs]
    B -->|Response| D
    C -->|Response| D
    D -->|Response| A
    E -->|Response| B

Getting started

Prerequisites

  • .Net 9.x
  • Ollama
  • llama3.2:3b Ollama model
  • A Brave Search API key
  • Docker (used for a local version of the Search MCP server)
  • The MCP server for XPR Network access (https://github.com/squdgy/xpr-mcp)

Running

  • Set environment variables
  • Set path to xpr-mcp server
  • On command line dotnet run

Troubleshooting

  • If the server seems to be frozen with no output, confirm that environment variables are set appropriately
  • You can test whether MCP servers are runnable by Ollama by using the MCP Inspector and testing the UI:
    npx @modelcontextprotocol/inspector node /path/to/xpr-mcp-server/dist/index.js
    or
    npx @modelcontextprotocol/inspector docker run -i --rm -e BRAVE_API_KEY mcp/brave-search
  • Uncomment logging on the ChatClientBuilder. The line looks like this:
    //.UseLogging(factory) // Logging, uncomment if you need to debug

sample prompts

  1. Check the XBTC balance for the account identified by “squdgy”. If the USD value is greater than 20 dollars, write me a poem about cryptocurrency. If the USD value is less than or equal to 20 dollars then insult the account.

  2. Use a web search to find the history of Metallicus, the company.

  3. Tell me what tokens are supported on XPR Network?

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers