mirror of
https://github.com/wso2/open-mcp-auth-proxy.git
synced 2025-06-27 17:13:31 +00:00
Update Readme
* Update README.md --------- Co-authored-by: Omindu Rathnaweera <omindu.dishan@gmail.com>
This commit is contained in:
parent
9f5fc69fb6
commit
6c5eda0091
2 changed files with 130 additions and 56 deletions
24
resources/echo_server.py
Normal file
24
resources/echo_server.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
from mcp.server.fastmcp import FastMCP
|
||||
|
||||
mcp = FastMCP("Echo")
|
||||
|
||||
|
||||
@mcp.resource("echo://{message}")
|
||||
def echo_resource(message: str) -> str:
|
||||
"""Echo a message as a resource"""
|
||||
return f"Resource echo: {message}"
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def echo_tool(message: str) -> str:
|
||||
"""Echo a message as a tool"""
|
||||
return f"Tool echo: {message}"
|
||||
|
||||
|
||||
@mcp.prompt()
|
||||
def echo_prompt(message: str) -> str:
|
||||
"""Create an echo prompt"""
|
||||
return f"Please process this message: {message}"
|
||||
|
||||
if __name__ == "__main__":
|
||||
mcp.run(transport="sse")
|
Loading…
Add table
Add a link
Reference in a new issue