MCP ExplorerExplorer

Simple Mcp Sample

@edom18on 10 months ago
2 MIT
FreeCommunity
AI Systems
This repository demonstrates how to set up and implement basic MCP server that integrates with Claude Desktop.

Overview

What is Simple Mcp Sample

simple-mcp-sample is a repository that demonstrates how to set up and implement a basic MCP server that integrates with Claude Desktop, showcasing various MCP features through example implementations.

Use cases

Use cases include demonstrating AI capabilities in text manipulation, providing interactive educational experiences, and serving as a foundational example for developers building similar MCP servers.

How to use

To use simple-mcp-sample, run the provided shell scripts: ‘single-client-launch-demo.sh’ for a single client demo and ‘multi-client-launch-demo.sh’ for a multi-client demo. Follow the console prompts to interact with the server.

Key features

Key features include integration with Claude Desktop, support for text-processing tools like ‘reverse-text’ and ‘uppercase’, and the ability to handle multiple clients simultaneously.

Where to use

simple-mcp-sample can be used in fields such as software development, AI integration, and educational tools where basic server-client architecture is required for processing text-based queries.

Content

Simple MCP Feature Sample

This project includes several example implementations of MCP features.

The server script demonstrates how to set up a basic MCP server that integrates with Claude Desktop.

These server scripts also work with the simple MCP clients I developed.

How to Verify Functionality

There are two shell scripts for launching demos: one for a single client and one for multiple clients.

Launch the single client demo

Run single-client-launch-demo.sh.

$ ./single-client-launch-demo.sh

and then the console shows like below.

Connecting to the MCP server...
Command is python
Connected to the server 'simple_server'!
Waiting for server to initialize...
Server initialized!

Connected to the server with tools:  ['reverse-text', 'uppercase']

MCP client started!

Type your queries or 'quit' to exit.

Query:

Please type something that you want to ask AI or quit to exit.

When you send a request containing reverse text or upper text, the AI will use the simple MCP server’s text-processing features.

Launch the multi client demo

Run multi-client-launch-demo.sh.

$ ./multi-client-launch-demo.sh

and then the console shows like below.

Connecting to the MCP server...
Command is python
Connected to the server 'simple_server'!
Waiting for server to initialize...
Server initialized!

Connected to the server with tools:  ['reverse-text', 'uppercase']
Connecting to the MCP server...
Command is python
Connected to the server 'profile_data_server'!
Waiting for server to initialize...
Server initialized!

Connected to the server with tools:  ['profile-data']

MultiMCP client started!

Type your queries or 'quit' to exit.

Query:

Please type something that you want to ask AI or quit to exit.

If you include Who am I? in your query, the AI will use the data MCP server feature to answer your question.

Installation for Claude Desktop

Add the following settings to your Claude Desktop configuration file:

"mcpServers": {
    "simple-mcp-sample": {
        "command": "python",
        "args": [
            "/path/to/simple-mcp-sample/server/simple_server.py"
        ]
    }
}
"mcpServers": {
    "simple-mcp-sample": {
        "command": "python",
        "args": [
            "/path/to/simple-mcp-sample/server/data_server.py"
        ]
    }
}

[!NOTE]
If you receive a command not found error when launching the server, specify the full path to your Python executable.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers