Skip to main content
Glama
codewithyasho

agentic_actions_mcp

Agentic Actions

  • A Python implementation of agentic actions for the MCP protocol.

HOW TO USE THIS MCP PACKAGE?

EXAMPLE:


from langchain_mcp_adapters.client import MultiServerMCPClient
from langchain.agents import create_agent
import asyncio
import os


async def main():

    client = MultiServerMCPClient(

        {


            "agentic_actions_mcp": {
                "transport": "stdio",
                "command": "uvx",
                "args": ["agentic_terminal"]
            }


        }
    )

    tools = await client.get_tools()

    print("\nAvailable tools:")
    for tool in tools:
        print(tool.name)

    agent = create_agent(
        model="ollama:llama3.2:latest",
        tools=tools,
        system_prompt='''
        You are a helpful assistant.
        You have access to the tools that helps you to perform various File IO operations.
        you can manage files, read and write data, and perform other file-related tasks.
        ''',
    )

    response = await agent.ainvoke(
        {"messages": [
            {
                "role": "user",
                "content": "hii, what can you do for me?"
            }
        ]}
    )

    print("\n\nResponse:")
    print(response["messages"][-1].content)

if __name__ == "__main__":
    asyncio.run(main())

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/codewithyasho/MCP_DEPLOYMENT'

If you have feedback or need assistance with the MCP directory API, please join our Discord server