stacklok / stacklok/toolhive

[Registry]: Define metadata for `cmd_args` that a user can provide when running an MCP server

Open
#836 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
2.2k
Forks
300
Avg merge
1d 15h
Merged PRs (30d)
184

Description

TL;DR: The registry should provide metadata about command arguments, so that users know what options are available, and which are required.

Ultimately, the goal of this issue is to allow a better UX for the user interface, so that we may be able to render dedicated fields per-argument.


Take for example the PostgreSQL MCP server

Today, the only way a user can learn how to supply a DB url is by looking into the documentation for the server.

The documentation suggests that it should be configured like this:

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres",
        "postgresql://localhost/mydb"
      ]
    }
  }
}

With the DB url supplied as a positional argument.

See the result of thv registry info postgres:

Name: postgres
Image: mcp/postgres:latest
Description: A Model Context Protocol server that provides read-only access to PostgreSQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.
Transport: stdio
Repository URL: https://github.com/modelcontextprotocol/servers
Popularity: 49668 stars, 9095 pulls
Last Updated: 2025-05-29T00:21:13Z
Tools:
  - query
Tags:
  database, postgres, postgresql, query, read-only, schema, sql
Permissions:
  Read:
    - /tmp/db
  Write:
    - /tmp/db
  Network:
    Allow Transport: tcp
    Allow Port: 443
Example Command:
  thv run postgres

No info is provided on the positional DB URL argument.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the registry representation behind thv registry info and the cmd_args metadata named in the issue. Determine how positional and required arguments should be represented, then verify that the PostgreSQL example exposes the database URL and whether it is required.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.