Skip to content

Conversation

@sigoden
Copy link
Owner

@sigoden sigoden commented Dec 11, 2024

Let MCP tools be used by LLM functions.

Get Started

  1. Create a mpc.json at <llm-functions-dir>.
{
  "mcpServers": {
    "sqlite": {
      "command": "uvx",
      "args": [
        "mcp-server-sqlite",
        "--db-path",
        "/tmp/foo.db"
      ]
    },
    "github": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-github"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
      }
    }
  }
}

MCP-Bridge will launch the server and register all the tools listed by the server. The tool identifier will be server_toolname to avoid clashes.

  1. Run the bridge server, build mcp tool binaries, update functions.json, all with:
argc mcp start

Run argc mcp stop to stop the bridge server, recover functions.json

argc mcp

$ argc mcp --help
USAGE: mcp <COMMAND>

COMMANDS:
  start               Start/Restart mcp bridge server
  stop                Stop mcp bridge server
  call                Call mcp tool
  logs                Show logs
  build-bin           Build tools to bin
  merge-functions     Merge mcp tools into functions.json
  unmerge-functions   Unmerge mcp tools from functions.json
  build-declarations  Build tools to bin
  wait-for-server     Wait for mcp bridge server to ready

@sigoden sigoden merged commit 20d1ec4 into main Dec 11, 2024
3 checks passed
@sigoden sigoden deleted the feat-mcp-bridge branch December 11, 2024 12:46
matias-ceau pushed a commit to matias-ceau/llm-functions that referenced this pull request Dec 31, 2024
matias-ceau pushed a commit to matias-ceau/llm-functions that referenced this pull request Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants