
jameslong/vancouver
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
Elixir 用のシンプルな MCP サーバーライブラリ.
概要
バンクーバーは、モデルコンテキストプロトコル(MCP)機能を簡単にPhoenix/Banditサーバーに追加できます。 バンクーバーは、初期化、要求検証、およびMCP ツールとプロンプトの作成を簡素化するためのヘルパー機能を提供しています。 たとえば、Claude デスクトップでは、設定設定 > を変更できます。 開発者 -> 以下のように設定を編集します。 "mcpServers": "MyApp": "command": "npx", "args": "mcp-remote", "[T0] サーバーを実行し、Claude を再起動して、MCP ツールを使用して起動します。 - ツール - プロンプト - 応答を同期(ストリーミングなし) ただし、必要に応じて変更できるライブラリは簡単です。 プロトコル自体の詳細は、MCP ユーザーガイドを参照してください。 いいえ。 このライブラリは初期開発中です。 変化を遮断する.
概要(AI 翻訳)
バンクーバーは、モデルコンテキストプロトコル(MCP)機能を簡単にPhoenix/Banditサーバーに追加できます。 バンクーバーは、初期化、要求検証、およびMCP ツールとプロンプトの作成を簡素化するためのヘルパー機能を提供しています。
はじめる
##1. 依存関係を追加
[mix.exs]で:
##2. ツール/プロンプトを作成する
以下のようなツールを実行できます。
このようにプロンプト:
##3. 設定を追加
[config.ex]で:
##4. MCP ルートを追加する
[router.ex]で:
##5.(オプション) MCPクライアントに追加
たとえば、Claude Desktop では、次のように設定[Settings -> Developer -> Edit configを変更できます。
お問い合わせ “mcpServers”: " 「MyApp」: “command”: “npx”, “args”: " 「mcp-remote」は、 [http://localhost:4000/mcp"] . . お問い合わせ お問い合わせ お問い合わせ
サーバーを実行し、Claude を再起動して、MCP ツールを使用して起動します。
よくある質問
バンクーバーは、モデルコンテキストプロトコルの仕様のすべての部分をサポートしていますか?
お問い合わせ 現在サポートしているバンクーバー:
- ツール
- プロンプト
- 応答を同期(ストリーミングなし)
ただし、必要に応じて変更できるライブラリは簡単です。
プロトコル自体の詳細は、MCP ユーザーガイドを参照してください。
バンクーバーは安定していますか?
いいえ.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Vancouver
Vancouver makes it easy to add Model Context Protocol (MCP) functionality to your Phoenix/Bandit server. Vancouver handles initialization, request validation, and offers helper functions to simplify the creation of MCP tools and prompts.
Getting started
1. Add dependency
In mix.exs:
defp deps do
[
{:vancouver, "~> 0.3"}
]
end
2. Create your tools/prompts
You can implement tools like this:
defmodule MyApp.Tools.CalculateSum do
use Vancouver.Tool
def name, do: "calculate_sum"
def description, do: "Add two numbers together"
def input_schema do
%{
"type" => "object",
"properties" => %{
"a" => %{"type" => "number"},
"b" => %{"type" => "number"}
},
"required" => ["a", "b"]
}
end
def run(conn, %{"a" => a, "b" => b}) do
send_text(conn, "#{a + b}")
end
end
And prompts like this:
defmodule MyApp.Prompts.CodeReview do
use Vancouver.Prompt
def name, do: "code_review"
def description, do: "Asks the LLM to analyze code quality and suggest improvements"
def arguments do
[
%{
"name" => "code",
"description" => "The code to review",
"required" => true
}
]
end
def run(conn, %{"code" => code}) do
send_text(conn, "Please review this code: #{code}")
end
end
3. Add config
In config.ex:
config :vancouver,
name: "My MCP Server",
version: "1.0.0"
4. Add your MCP route
In router.ex:
forward "/mcp", Vancouver.Router,
tools: [MyApp.Tools.CalculateSum],
prompts: [MyApp.Prompts.CodeReview]
5. (Optional) Add to your MCP client
E.g. For Claude Desktop, you can modify your config Settings -> Developer -> Edit config as follows:
{
"mcpServers": {
"MyApp": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:4000/mcp"
]
}
}
}
Run your server, and restart Claude to starting using your MCP tools. 🚀
FAQ
Does Vancouver support all parts of the Model Context Protocol specification?
Not yet. Vancouver currently supports:
- tools
- prompts
- sync responses (no streaming)
However, the library is simple enough that you should be able to modify it for your needs.
インストール
npx mcp-remote http://localhost:4000/mcp