Simplifying MCP server development with a FastAPI-style framework.
Project details
mcp-forge revolutionizes the way MCP servers are built in Python by providing a FastAPI-style framework that eliminates boilerplate code. With declarative tools, auto-schema generation, and robust type validation, it streamlines development and enhances productivity, enabling a one-command deployment for seamless operations.
mcp-forge is an innovative framework designed to facilitate the creation of Model Context Protocol (MCP) servers using Python. This FastAPI-style framework excels in providing a streamlined development experience by eliminating boilerplate code and optimizing productivity through declarative tools. With mcp-forge, developers can focus on writing clear business logic without the distractions of extensive configurations or manual schema definitions.
@app.tool() decorator for seamless tool creation without the need for schema files or additional registration calls.ForgeTestClient enables straightforward unit tests without needing a running server, providing immediate feedback during development.from mcp_forge import Forge
app = Forge(name="my-server", version="1.0.0")
@app.tool(description="Search the knowledge base")
async def search(query: str, limit: int = 10) -> list[dict]:
"""Returns ranked results for the given query."""
... # your logic here
if __name__ == "__main__":
app.run() # STDIO — Claude Desktop / Cursor / VS Code ready
mcp-forge operates on several core principles:
mcp-forge supports various clients and transports, including:
For full installation instructions and contributing guidelines, the documentation available provides comprehensive support.
Utilize mcp-forge to develop MCP servers efficiently while taking advantage of its powerful features and simple syntax. Explore more about the framework and contribute to the project within the Benni OS community.
Comments
0Start the conversation
Share the first comment.