mirror of
https://github.com/dnlbauer/cordra-mcp.git
synced 2026-09-10 21:55:30 +00:00
feat: add basic MCP server with ping tool
This commit is contained in:
23
src/mcp_cordra/server.py
Normal file
23
src/mcp_cordra/server.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""MCP server for Cordra digital object repository."""
|
||||
|
||||
import asyncio
|
||||
|
||||
from mcp.server.fastmcp import FastMCP
|
||||
|
||||
# Initialize the MCP server
|
||||
mcp = FastMCP("mcp-cordra")
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
async def ping() -> str:
|
||||
"""Simple ping tool to test server connectivity."""
|
||||
return "pong"
|
||||
|
||||
|
||||
def main() -> None:
|
||||
"""Main entry point for the MCP server."""
|
||||
asyncio.run(mcp.run())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user