Created
August 17, 2025 06:42
-
-
Save janakiramm/a5f5edf23a94108ca49263c7b4736e1d to your computer and use it in GitHub Desktop.
Simple MCP Server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from fastmcp import FastMCP | |
| mcp = FastMCP("Employee Server") | |
| @mcp.tool() | |
| def get_employees() -> list: | |
| return [ | |
| {"id": 1, "name": "Alice", "role": "Engineer"}, | |
| {"id": 2, "name": "Bob", "role": "Designer"}, | |
| {"id": 3, "name": "Charlie", "role": "Manager"}, | |
| {"id": 4, "name": "Diana", "role": "Analyst"}, | |
| {"id": 5, "name": "Eve", "role": "Intern"}, | |
| ] | |
| if __name__ == "__main__": | |
| mcp.run(transport="streamable-http", host="127.0.0.1", port=8080, path="/mcp/") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment