diff --git a/mcp/cli.py b/mcp/cli.py index 9949254..cca5620 100644 --- a/mcp/cli.py +++ b/mcp/cli.py @@ -22,7 +22,7 @@ def main(): command = sys.argv[1] - if command in {"summarize", "ask", "setup"}: + if command in {"summarize", "ask", "setup", "server"}: run_script(command) else: print(f"❓ 未知のコマンド: {command}") diff --git a/mcp/scripts/server.py b/mcp/scripts/server.py new file mode 100644 index 0000000..f029b6b --- /dev/null +++ b/mcp/scripts/server.py @@ -0,0 +1,13 @@ +# server.py +from fastmcp import FastMCP + +mcp = FastMCP( + name="aigpt-agent", + host="127.0.0.1", + port=5000, + timeout=30 +) + +if __name__ == "__main__": + print("Starting MCP server...") + mcp.run() diff --git a/mcp/setup.py b/mcp/setup.py index 490e01f..93f099f 100644 --- a/mcp/setup.py +++ b/mcp/setup.py @@ -2,8 +2,7 @@ from setuptools import setup setup( - name='mcp', - version='0.1.0', + name='aigpt-mcp', py_modules=['cli'], entry_points={ 'console_scripts': [ diff --git a/src/commands/mcp.rs b/src/commands/mcp.rs index 7fabf1a..ad486c3 100644 --- a/src/commands/mcp.rs +++ b/src/commands/mcp.rs @@ -78,6 +78,8 @@ pub fn mcp_setup() { .arg("install") .arg("openai") .arg("requests") + .arg("fastmcp") + .arg("mcp") .current_dir(&dest_dir) .output() .expect("pip install に失敗しました");