ミストラル コードストラル MCP サーバー
Mistral Codestral API 用の MCP サーバー実装。コード補完、バグ修正、テスト生成機能を提供します。
特徴
- MistralのCodestralモデルによるコード補完
- バグの検出と修正
- 自動テスト生成
- 複数のプログラミング言語のサポート
- レート制限とエラー処理
- コードファイルのリソースアクセス
- 中間補完(FIM)のサポート
- Zodスキーマを使用した包括的な入力検証
インストール
- このリポジトリをクローンする
- 依存関係をインストールします:
.env.example
を.env
にコピーし、Mistral API キーを追加します。- プロジェクトをビルドします。
使用法
サーバーを起動します。
構成
Mistral API キーを.env
ファイルに追加します。
利用可能なツール
コード補完
完了、バグ修正、またはテスト生成のためのプロセスコード:
パラメータ:
code
(文字列、必須): 処理するコードlanguage
(文字列、オプション): プログラミング言語task
(文字列、必須): 次のいずれか:"complete"
: コード補完"fix"
: バグ修正"test"
: テスト生成"fim"
: 中間補完
APIの詳細
サーバーは、主に 2 つの Mistral モデルをサポートしています。
codestral-latest
: コード関連タスクのデフォルトモデルcodestral-mamba-latest
: Mambaアーキテクチャの代替モデル
機能は次のとおりです:
- 自動レート制限(リクエスト間の最小100ミリ秒)
- API呼び出しの30秒のタイムアウト
- APIレスポンスの包括的なエラー処理
- Zodスキーマを使用したレスポンス検証
- レスポンスからコードブロックを自動抽出
- APIインタラクションのデバッグログ
発達
自動リロード付きの開発モードで実行します。
テストを実行します:
エラー処理
サーバーは包括的なエラー処理を実装します。
- APIエラーは適切にキャッチされフォーマットされます
- レート制限が実装されています
- Zodスキーマを使用した入力検証
- クライアントへの適切なエラー伝播
- 一般的な問題に関する具体的なエラー メッセージ:
- 認証失敗
- レート制限を超えました
- サーバーエラー
- 無効な入力検証
リソースアクセス
サーバーはfile://code
リソース URI を通じてコード ファイルへのアクセスを提供し、ワークスペース ファイルとの統合を可能にします。
ライセンス
マサチューセッツ工科大学
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
複数のプログラミング言語のコード補完、バグ修正、テスト生成を提供し、Mistral Codestral API と統合してコード開発プロセスを強化します。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityProvides tools for collecting and documenting code from directories.Last updated -48112TypeScriptMIT License
- AsecurityAlicenseAqualityEnables intelligent code analysis and debugging through the Perplexity AI's API, offering detailed error analysis, pattern detection, and comprehensive solutions, with integration support for the Claude desktop client.Last updated -110JavaScriptMIT License
- AsecurityAlicenseAqualityAnalyzes source code dependencies across multiple programming languages in the specified directory to identify file relationships, assisting in dependency management and project structure understanding.Last updated -1PythonMIT License
- -securityFlicense-qualityProvides code generation and completion capabilities using the DeepSeek API, with support for tool chaining and cost optimization.Last updated -3JavaScript