Skip to content
Latest (currently 2026.8.0) has the newest features, bug fixes, and CVE patches of Solo Enterprise for agentregistry.

For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.

Add tools

Page as Markdown

Add custom tools to your MCP server project.

Tools are the functions that an MCP server exposes to agents or MCP clients. Each tool has a name, a description of what it does and what parameters it accepts, and a return value that the agent or client can use. When an agent or client connects to an MCP server, it discovers the available tools and can call them to perform actions or retrieve data.

The language you use to define tools depends on the framework you chose when creating your MCP server scaffold. For Python-based servers (FastMCP Python), each tool is a Python function with a decorator that registers it with the server. For Go-based servers (FastMCP Go), tools are written in Go. You extend the scaffold by adding source files to the tools directory of your MCP server project.

Before you begin

  1. Set up an OIDC provider so that users can authenticate with the registry.

  2. Install Solo Enterprise for agentregistry and the arctl CLI.

  3. Port-forward the Solo Enterprise for agentregistry server on port 12121 if you have not done so already. The registry is not exposed externally by default, so you need port-forwarding to reach it from your local machine.

    kubectl -n agentregistry-system port-forward svc/agentregistry-enterprise-server 12121:12121
  1. Install uv.

Add tools

  1. If you have not done so yet, create an MCP server.

    The following command creates a mymcp FastMCP server with an echo tool. When you run the command, a mymcp directory is created on your local machine that contains the scaffold for your MCP server.

    arctl init mcp mymcp --framework fastmcp --language python
  2. Create a word_count.py file in the mymcp/src/tools/ directory. The tool takes a string and returns the number of words and characters.

    cat > mymcp/src/tools/word_count.py << 'EOF'
    from core.server import mcp
    
    
    @mcp.tool()
    def word_count(text: str) -> dict:
     """Count the number of words and characters in a string.
    
     Args:
         text: The input string to analyze.
    
     Returns:
         A dict with the word count and character count of the input string.
     """
     return {
         "words": len(text.split()),
         "characters": len(text),
     }
    EOF
  3. Run the MCP server on your local machine and open the MCP Inspector.

    arctl run mymcp --inspector

    Example output:

    ...
    → fastmcp-python: docker run --rm -p 3000:3000 localhost:5001/mymcp:latest --transport http --host 0.0.0.0 --port 3000
    2026-05-14 18:39:46,327 - INFO - Loaded tool module: sum
    2026-05-14 18:39:46,329 - INFO - Loaded tool module: echo
    2026-05-14 18:39:46,329 - INFO - Loaded tool module: word_count
    2026-05-14 18:39:46,329 - INFO - 📦 Successfully loaded 3 tools
    2026-05-14 18:39:46,549 - INFO - HTTP Request: GET https://pypi.org/pypi/fastmcp/json "HTTP/1.1 200 OK"
    ...
    
    [05/14/26 18:39:46] INFO     Starting MCP server 'mymcp' with   transport.py:301
                              transport 'http' on                                
                              http://0.0.0.0:3000/mcp    
    
    Starting MCP inspector...
    ⚙️ Proxy server listening on localhost:6277
    🔑 Session token: c3642ae11a0db7def05e2949631ae2cd3171119016627e69f420706d25b2846d
       Use this token to authenticate requests or set DANGEROUSLY_OMIT_AUTH=true to disable auth
    
    🚀 MCP Inspector is up and running at:
       http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=c3642ae11a0db7def05e2949631ae2cd3171119016627e69f420706d25b2846d                  
    
  4. In the MCP Inspector, connect to your MCP server. Enter the following details.

    • Transport type: Select Streamable HTTP.
    • URL: The MCP server URL that you retrieved earlier, such as http://localhost:3000/mcp.
    • Click Connect.
  5. Go to the Tools tab and verify that you see the newly added word_count tool. Try out the tool by entering a string into the text field, such as How many words and characters are in this sentence?. Then, click Run Tool. Verify that the word and character counts are returned.

Next