alrm-mcp
alrm-mcp
MCPサーバー for AL ID Range Manager.
AIコーディングエージェントが、ALRM VS Code extensionと同じ方法でALオブジェクトIDを予約できるようにします。エージェントが新しいALオブジェクトを作成しようとするとき、new_object を呼び出すと、Business Centralの共有ALRMデータベースが名前を検証し、次に空いているオブジェクトIDを返します。これにより、同じ拡張機能で作業している全員の間でIDが一意に保たれます。
ツール
new_object
新しいALオブジェクトを登録し、割り当てられたIDを返します。
パラメータ | 型 | 説明 |
| UUID | 拡張機能の |
| 下記参照 | ALオブジェクト型 |
| 文字列、30文字以下 | オブジェクト名、例: |
オブジェクトIDをテキストとして返します(例: 50061)。同じ名前で再度呼び出すと、新しいIDを割り当てるのではなく、同じIDが返されます。
Related MCP server: Dynamics 365 Business Central Admin MCP Server
要件
Node.js 20 以降
ALRM拡張機能がインストールされたBusiness Central環境
その環境にサインインする権限(認証を参照)
設定
{
"mcpServers": {
"alrm-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "alrm-mcp@latest"],
"env": {
"BC_TENANT": "{tenant}",
"BC_ENVIRONMENT": "{environment}",
"BC_COMPANY": "{company}"
}
}
}
}Claude Codeでは、1つのコマンドで追加できます:
claude mcp add alrm-mcp \
--env BC_TENANT=contoso.com \
--env BC_ENVIRONMENT=Production \
--env BC_COMPANY=00000000-0000-0000-0000-000000000000 \
-- npx -y alrm-mcp@latest環境変数
3つすべて必須です。サーバーは、不足している変数を示すメッセージとともに即座に終了します。
変数 | 説明 |
| Microsoft Entraテナント — ドメイン( |
| BC管理センターに表示されるBusiness Central環境名(例: |
| 会社のID(GUID。表示名ではありません)。 |
これらはMCPクライアントの env ブロックからのみ読み取られます。.env
ファイルのサポートはありません。サーバーは通常、シェルからではなく
クライアントによって起動されるためです。
2つのオプション変数を使用すると、デフォルトのパブリッククライアントの代わりに、独自のEntraアプリ登録をサーバーに指定できます。
変数 | デフォルト | 説明 |
| 組み込み | パブリッククライアントアプリ登録のアプリケーション(クライアント)ID。 |
|
| サインインに使用される権限テナント。これを設定すると、サインインを単一テナントに制限できます。 |
認証
最初のツール呼び出しで、OAuth 2.0デバイスコードフローを使用してサインインします。
ブラウザタブが https://microsoft.com/devicelogin で開きます。
デバイスコードがクリップボードにコピーされ、クリップボードやブラウザが利用できない場合に備えて、サーバーのstderrにも出力されます。
コードを貼り付け、サインインを完了すると、ツール呼び出しが続行されます。
その後、トークンキャッシュはオペレーティングシステムの資格情報ストア(macOSではKeychain、WindowsではDPAPI、LinuxではSecret Service/libsecret)に保存され、ホームディレクトリに .alrm-cache.json という小さなインデックスファイルが置かれます。以降のセッションでは、サーバーやエディタの再起動を含め、サイレントに再利用されるため、リフレッシュトークンが期限切れになるまで(約90日間の非アクティブ)ブラウザが再度表示されることはありません。
サインアウトするには、.alrm-cache.json を削除し、資格情報ストアから alrm-mcp エントリを削除します。macOSの場合:
rm ~/.alrm-cache.json
security delete-generic-password -s alrm-mcp -a alrm-mcplogout コマンドはまだありません。
プラットフォームに関する注意
Linuxでは、サーバーはトークンを平文で保存するフォールバックを拒否します。Secret Serviceが利用できないヘッドレスマシンでは、暗号化されていないトークンキャッシュを静かに書き込むのではなく、サインインが失敗します。
トラブルシューティング
サーバーが起動しない / クライアントが CONNECTION_CLOSED を報告する。 ほとんどの場合、環境変数の欠落またはスペルミスです。直接実行して実際のエラーを確認してください。MCPクライアントはエラーを飲み込みます:
BC_TENANT=contoso.com BC_ENVIRONMENT=Production BC_COMPANY=... npx -y alrm-mcp@latest正常なサーバーは MCP server running on stdio を出力して待機します。
Extension {id} not found! app.json の appId が、この会社のALRMデータベースに登録されていません。VS Code拡張機能またはBusiness Centralで直接、拡張機能を最初に登録してください。
予期せずブラウザが開いた。 それは上記のサインインです。毎回ではなく一度だけ発生するはずです。繰り返す場合は、トークンキャッシュが永続化されていません。stderr出力で、保存されたサインインの再利用に関するメッセージを確認してください。
開発
git clone https://github.com/hiimnit/alrm-mcp.git
cd alrm-mcp
npm install
npm run build次に、公開パッケージの代わりにローカルビルドをMCPクライアントに指定します:
{
"mcpServers": {
"alrm-mcp": {
"command": "node",
"args": ["/absolute/path/to/alrm-mcp/dist/index.js"],
"env": {
"BC_TENANT": "...",
"BC_ENVIRONMENT": "...",
"BC_COMPANY": "..."
}
}
}
}npm run typecheck は出力なしで型をチェックします。npm run build は最初に dist/ をクリーンアップし、npm pack と npm publish でも自動的に実行されます。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to perform Business Central AL development tasks including language server operations, container management, Git version control, and file system operations for professional BC development workflows.
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Dynamics 365 Business Central environments through natural language commands, including environment, app, session, and extension management.459MIT
- FlicenseNot gradedqualityCmaintenanceGenerates AL code for Business Central directly from your IDE, enhancing developer efficiency by providing tools, prompts, and resources for code generation.1
- AlicenseAqualityCmaintenanceProvides AI assistants with complete visibility into AL dependencies and symbols by exposing compiled .app files through the Model Context Protocol, enabling smart object discovery, deep code analysis, and reference tracking for Business Central development.644780MIT
Related MCP Connectors
Debug, build, and manage Power Automate cloud flows with AI agents
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
Odoo ERP for AI agents: hosted OAuth endpoint, gated writes, one endpoint for every instance.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/hiimnit/alrm-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server