Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions codemcp/agno.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import asyncio
import sys
from typing import Union
from urllib.parse import quote

Expand All @@ -7,6 +8,7 @@
from agno.cli.console import console
from agno.cli.settings import agno_cli_settings
from agno.models.anthropic import Claude
from agno.models.google import Gemini
from agno.playground import Playground
from agno.tools.mcp import MCPTools
from agno.utils.log import logger
Expand Down Expand Up @@ -62,18 +64,29 @@ async def serve_playground_app_async(


async def main():
async with MCPTools(f"{sys.executable()} -m codemcp.hot_reload_entry") as codemcp:
async with MCPTools(f"{sys.executable} -m codemcp.hot_reload_entry") as codemcp:
# TODO: cli-ify the model
agent = Agent(
model=Claude(id="claude-3-7-sonnet-20250219"),
#model=Claude(id="claude-3-7-sonnet-20250219"),
model=Gemini(id="gemini-2.5-pro-exp-03-25"),
tools=[codemcp],
instructions="",
markdown=True,
show_tool_calls=True,
)
#agent.print_response("What tools do you have?", stream=True, show_full_reasoning=True, stream_intermediate_steps=True)
#return
playground = Playground(agents=[agent]).get_app()
await serve_playground_app_async(playground)


if __name__ == "__main__":
from agno.debug import enable_debug_mode
enable_debug_mode()
import logging
logging.basicConfig(level=logging.DEBUG)
logging.getLogger("httpx").setLevel(logging.DEBUG) # For HTTP logging
logging.getLogger("anthropic").setLevel(logging.DEBUG)
logging.getLogger("google_genai").setLevel(logging.DEBUG)

asyncio.run(main())
2 changes: 1 addition & 1 deletion codemcp/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async def codemcp(
subtool: str,
*,
path: str | None = None,
content: object = None, # Allow any type, will be serialized to string if needed
content: str | dict | None = None, # Allow any type, will be serialized to string if needed
old_string: str | None = None,
new_string: str | None = None,
offset: int | None = None,
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dependencies = [
"fastapi>=0.115.12",
"uvicorn>=0.28.0",
"starlette>=0.35.1",
"google-genai>=1.10.0",
]

[dependency-groups]
Expand Down
Loading
Loading