{"id":34966807,"url":"https://github.com/arjunprabhulal/mcp-simple-demo","last_synced_at":"2026-05-19T21:32:22.695Z","repository":{"id":286051298,"uuid":"960198714","full_name":"arjunprabhulal/mcp-simple-demo","owner":"arjunprabhulal","description":"A simple demonstration of the Model Context Protocol (MCP) with a Python server and client.","archived":false,"fork":false,"pushed_at":"2025-04-04T03:54:10.000Z","size":7,"stargazers_count":4,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-28T11:26:40.691Z","etag":null,"topics":["mcp","modelcontextprotocol"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arjunprabhulal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-04T02:54:42.000Z","updated_at":"2025-06-01T07:24:40.000Z","dependencies_parsed_at":"2025-04-04T04:20:19.944Z","dependency_job_id":null,"html_url":"https://github.com/arjunprabhulal/mcp-simple-demo","commit_stats":null,"previous_names":["arjunprabhulal/mcp-simple-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arjunprabhulal/mcp-simple-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjunprabhulal%2Fmcp-simple-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjunprabhulal%2Fmcp-simple-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjunprabhulal%2Fmcp-simple-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjunprabhulal%2Fmcp-simple-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arjunprabhulal","download_url":"https://codeload.github.com/arjunprabhulal/mcp-simple-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjunprabhulal%2Fmcp-simple-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33233740,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T15:49:41.270Z","status":"ssl_error","status_checked_at":"2026-05-19T15:49:22.917Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mcp","modelcontextprotocol"],"created_at":"2025-12-26T23:12:55.285Z","updated_at":"2026-05-19T21:32:22.690Z","avatar_url":"https://github.com/arjunprabhulal.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MCP Simple Demo\n\nA simple demonstration of the Model Context Protocol (MCP) with a Python server and client.\n\n## Overview\n\nThis project demonstrates a basic implementation of the Model Context Protocol (MCP), which allows AI models to access external tools and data sources. It includes:\n\n- An MCP-compliant server with simple tools\n- A client for interacting with the server\n- Examples of tool calls and responses\n\n## Repository\n\nThe official repository for this project is available at:\n[https://github.com/arjunprabhulal/mcp-simple-demo](https://github.com/arjunprabhulal/mcp-simple-demo)\n\n## Installation\n\n### Prerequisites\n\n- Python 3.8+\n- pip\n\n### Setup\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/arjunprabhulal/mcp-simple-demo.git\ncd mcp-simple-demo\n```\n\n2. Install the required packages:\n```bash\n# Using requirements.txt (recommended)\npip install -r requirements.txt\n\n# Or install packages manually\npip install mcp llama-index llama-index-tools-mcp requests\n```\n\n## Server Usage\n\nThe server provides MCP-compliant tools that can be accessed by AI models or client applications.\n\n### Starting the Server\n\n```bash\npython server.py\n```\n\nThis starts an MCP server on the default port (8000) with two tools:\n- `hello_world`: Returns a greeting message\n- `add`: Adds two numbers\n\n### Debugging\n\nTo enable debugging logs:\n\n```bash\nDEBUG_LEVEL=DEBUG python server.py\n```\n\nFor full debug mode:\n\n```bash\nDEBUG=true DEBUG_LEVEL=DEBUG python server.py\n```\n\n## Client Usage\n\nThe provided client can interact with the MCP server in both interactive and command-line modes.\n\n### Interactive Mode\n\n```bash\npython client.py\n```\n\nThis starts an interactive session where you can choose commands to execute.\n\n### Command Line Mode\n\nList available tools:\n```bash\npython client.py tools\n```\n\nCall the hello_world tool:\n```bash\npython client.py hello\npython client.py hello \"Your Name\"\n```\n\nCall the add tool:\n```bash\npython client.py add 5 3\n```\n\n## Available Tools\n\n### hello_world\n\nReturns a greeting message.\n\n**Parameters:**\n- `name` (optional): The name to greet (default: \"World\")\n\n**Returns:**\n- A JSON object with a message field: `{\"message\": \"Hello, Name!\"}`\n\n### add\n\nAdds two numbers.\n\n**Parameters:**\n- `a`: First number (integer)\n- `b`: Second number (integer)\n\n**Returns:**\n- The sum of a and b (integer)\n\n## Protocol Details\n\nThe Model Context Protocol (MCP) uses Server-Sent Events (SSE) for establishing connections. The flow works as follows:\n\n1. Client connects to the `/sse` endpoint\n2. Server returns a session ID\n3. Client uses the session ID to make tool calls via `/messages/?session_id=...`\n\n## Advanced Testing\n\nFor more detailed testing of the server, use the test client:\n\n```bash\npython test_client.py\n```\n\nThis performs more comprehensive tests of the MCP connection and available tools.\n\n## Contributions\n\nContributions to this project are welcome! Please feel free to submit issues or pull requests to the [GitHub repository](https://github.com/arjunprabhulal/mcp-simple-demo).\n\n## References\n\n- [Model Context Protocol Specification](https://github.com/anthropics/anthropic-tools)\n- [MCP Python SDK](https://github.com/anthropics/anthropic-tools-python)\n- [LlamaIndex MCP Integration](https://docs.llamaindex.ai/en/stable/examples/tools/anthropic_tools/)\n- [MCP Simple Demo Repository](https://github.com/arjunprabhulal/mcp-simple-demo) ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farjunprabhulal%2Fmcp-simple-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farjunprabhulal%2Fmcp-simple-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farjunprabhulal%2Fmcp-simple-demo/lists"}