{"id":48095759,"url":"https://github.com/josharsh/mcp-server-boilerplate","last_synced_at":"2026-04-04T15:35:47.961Z","repository":{"id":288913980,"uuid":"969061008","full_name":"josharsh/mcp-server-boilerplate","owner":"josharsh","description":"Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP","archived":false,"fork":false,"pushed_at":"2025-04-20T11:42:30.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-20T12:41:26.480Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/josharsh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-04-19T09:47:08.000Z","updated_at":"2025-04-20T11:42:34.000Z","dependencies_parsed_at":"2025-04-20T12:55:21.862Z","dependency_job_id":null,"html_url":"https://github.com/josharsh/mcp-server-boilerplate","commit_stats":null,"previous_names":["josharsh/mcp-server-boilerplate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/josharsh/mcp-server-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josharsh%2Fmcp-server-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josharsh%2Fmcp-server-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josharsh%2Fmcp-server-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josharsh%2Fmcp-server-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josharsh","download_url":"https://codeload.github.com/josharsh/mcp-server-boilerplate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josharsh%2Fmcp-server-boilerplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31403959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: 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":[],"created_at":"2026-04-04T15:35:47.830Z","updated_at":"2026-04-04T15:35:47.909Z","avatar_url":"https://github.com/josharsh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MCP Base\n\nA solid, foundational starting point for MCP projects. MCP Base is a production-ready, extensible template for building Model Context Protocol (MCP) servers in **Python**. Rapidly create, extend, and deploy MCP servers that expose tools, prompts, and resources to LLMs and agentic clients.\n\n---\n\n## 🚀 What is This?\n\nThis is a **Python starter base**—not a specific server implementation. It provides a modular, well-documented foundation for building your own MCP servers in Python, supporting multiple transport layers (STDIO, SSE, HTTP, etc.), and demonstrating best practices for security, extensibility, and maintainability.\n\n---\n\n## 🏗️ Architecture Overview\n\n```\n.\n├── src/\n│   ├── base/                # Base classes for tools, prompts, resources\n│   ├── tools/               # Example tools (filesystem, API, prompt, etc.)\n│   ├── resources/           # Example resources (static/dynamic)\n│   ├── prompts/             # Example prompts (text generation, summarization)\n│   ├── transports/          # Transport layer implementations \u0026 docs\n│   │   ├── stdio/\n│   │   │   └── README.md\n│   │   ├── sse/\n│   │   │   └── README.md\n│   │   └── ...\n│   ├── config.py            # Configuration and environment management\n│   ├── server.py            # Server instantiation and registration\n│   └── main.py              # Entrypoint: selects transport, starts server\n├── tests/                   # Example tests for tools/resources\n├── Dockerfile               # Containerized deployment\n├── requirements.txt / pyproject.toml\n├── README.md                # This file\n├── CONTRIBUTING.md\n└── ...\n```\n\n---\n\n## ✨ Features\n\n- **Multi-Transport Support:** STDIO, SSE, HTTP, and more (see `/src/transports/`)\n- **Modular Tools/Prompts/Resources:** Add new features by creating a class and registering it\n- **Type-Safe Input Validation:** Uses Pydantic for schemas\n- **Security Best Practices:** Directory sandboxing, input validation, error handling\n- **Extensible \u0026 Maintainable:** Clean separation of concerns, base classes, and registries\n- **Production-Ready:** Logging, environment management, Docker support\n- **Comprehensive Documentation:** For users and contributors\n\n---\n\n## 🛠️ Getting Started\n\n### 1. Install Dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n### 2. Configure Environment\n\nCopy `.env.example` to `.env` and fill in required values.\n\n### 3. Run the Server\n\n**STDIO Transport:**\n```bash\npython main.py --transport=stdio\n```\n\n**SSE/HTTP Transport:**\nSee `/src/transports/sse/README.md` and `/src/transports/http/README.md` for details.\n\n---\n\n## 🧩 Adding Tools, Prompts, and Resources\n\n### Tools\n\n- Create a new class in `/src/tools/` inheriting from `BaseTool`\n- Implement the required methods and input schema\n- Register the tool in the tool registry\n\n### Prompts\n\n- Create a new class in `/src/prompts/` inheriting from `BasePrompt`\n- Implement the required methods and input schema\n- Register the prompt in the prompt registry\n\n### Resources\n\n- Add static or dynamic resources in `/src/resources/`\n- Register them in the resource registry\n\n---\n\n## 🔌 Supported Transports\n\n- **STDIO:** For CLI and agentic integration (see `/src/transports/stdio/README.md`)\n- **SSE:** For server-sent events and web clients (see `/src/transports/sse/README.md`)\n- **HTTP:** For RESTful or web-based integration (see `/src/transports/http/README.md`)\n\nEach transport is modular and can be extended or replaced.\n\n---\n\n## 🛡️ Security \u0026 Best Practices\n\n- All file and directory operations are sandboxed to allowed paths\n- Input validation is enforced for all tool/resource inputs\n- Error handling is consistent and user-friendly\n- Sensitive configuration is managed via environment variables\n\n---\n\n## 🧪 Testing\n\n- Example tests are provided in `/tests/`\n- Use Pytest as the test runner\n- See CONTRIBUTING.md for test guidelines\n\n---\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines, code style, and PR process.\n\n---\n\n## 📚 Further Reading\n\n- [Model Context Protocol Documentation](https://modelcontextprotocol.io/introduction)\n- [Official MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk)\n- [Reference MCP Servers Gallery](https://github.com/modelcontextprotocol/servers)\n- [Transport Layer Docs](/src/transports/)\n\n---\n\n## 📝 License\n\nMIT License. See [LICENSE](LICENSE) for details.\n\n---\n\n## 💬 Community \u0026 Support\n\n- [Discord](https://discord.gg/jHEGxQu2a5)\n- [Reddit](https://www.reddit.com/r/modelcontextprotocol)\n- [GitHub Discussions](https://github.com/orgs/modelcontextprotocol/discussions)\n\n---\n\nMCP Base is the recommended starting point for all new Python MCP server projects. Fork, extend, and contribute improvements!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosharsh%2Fmcp-server-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosharsh%2Fmcp-server-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosharsh%2Fmcp-server-boilerplate/lists"}