fix mcp
This commit is contained in:
parent
f97da41595
commit
ef6605ff64
@ -22,7 +22,7 @@ def main():
|
|||||||
|
|
||||||
command = sys.argv[1]
|
command = sys.argv[1]
|
||||||
|
|
||||||
if command in {"summarize", "ask", "setup"}:
|
if command in {"summarize", "ask", "setup", "server"}:
|
||||||
run_script(command)
|
run_script(command)
|
||||||
else:
|
else:
|
||||||
print(f"❓ 未知のコマンド: {command}")
|
print(f"❓ 未知のコマンド: {command}")
|
||||||
|
13
mcp/scripts/server.py
Normal file
13
mcp/scripts/server.py
Normal file
@ -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()
|
@ -2,8 +2,7 @@
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='mcp',
|
name='aigpt-mcp',
|
||||||
version='0.1.0',
|
|
||||||
py_modules=['cli'],
|
py_modules=['cli'],
|
||||||
entry_points={
|
entry_points={
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
|
@ -78,6 +78,8 @@ pub fn mcp_setup() {
|
|||||||
.arg("install")
|
.arg("install")
|
||||||
.arg("openai")
|
.arg("openai")
|
||||||
.arg("requests")
|
.arg("requests")
|
||||||
|
.arg("fastmcp")
|
||||||
|
.arg("mcp")
|
||||||
.current_dir(&dest_dir)
|
.current_dir(&dest_dir)
|
||||||
.output()
|
.output()
|
||||||
.expect("pip install に失敗しました");
|
.expect("pip install に失敗しました");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user