Openai Responses
FreeNot checkedLightweight MCP server using OpenAI Responses API with built-in web search, enabling AI assistants to answer questions with citations and search results.
About
Lightweight MCP server using OpenAI Responses API with built-in web search, enabling AI assistants to answer questions with citations and search results.
README
OpenAI Responses API を推論コアに採用した軽量な MCP サーバです。web_search を常時許可し、実際に検索を行うかはモデルが自律判断します。Claude Code 等の MCP クライアントから stdio で利用します。
重要: 仕様・挙動は実装が正です。まず docs/spec.md を読んでください。
Repository Structure
src/: TypeScript ソースscripts/: 検証/補助スクリプト。例:mcp-smoke*,clean.jsconfig/config.yaml.example: 設定サンプルpolicy.md.example: 外部 System Policy のサンプル
docs/: 正準仕様/リファレンス/検証手順spec.md: 正準仕様reference/: 設定・導入・連携リファレンスverification.md: E2E 検証手順
README.md: プロジェクト概要/クイックスタートLICENSE: ライセンスpackage.json,package-lock.json: npm 設定/依存固定tsconfig.json: TypeScript 設定.gitignore: Git 除外設定
特長
- Responses API 準拠(公式JS SDK
openai) - 検索はモデルに委譲(
web_searchを常時許可) - 構造化出力は
answer本文、used_search、citations[]、modelを返すcitations[]は 情報源(URL またはoai-weather等の情報源ID)を返す
- System Policy の参照先:
src/policy/system-policy.ts - MCP stdio 実装(
initialize/tools/list/tools/call)
要件
- OS: macOS / Linux
- Node.js: 必須は v24 系。CI / Release ともに v24 系で運用。
- npm(Node 同梱)
- OpenAI API キー(環境変数で渡す)
必須設定だけで起動できる最小構成
- 必須設定: 環境変数
OPENAI_API_KEYのみ。 - 起動例:
export OPENAI_API_KEY="sk-..." && npx openai-responses-mcp@latest --stdio
使う場合の既定パスは ~/.config/openai-responses-mcp/config.yaml です。
MCPとして使う
MCPクライアントから利用する場合に参考にしてください。
1) Claude Code への登録例
~/.claude.jsonへ以下の項目を追加
{
"mcpServers": {
"openai-responses": {
"command": "npx",
"args": ["openai-responses-mcp@latest", "--stdio"],
"env": { "OPENAI_API_KEY": "sk-..." }
}
}
}
- Claude Code CLI では以下を実行
claude mcp add -s user -t stdio openai-responses -e OPENAI_API_KEY=sk-xxxx -- npx openai-responses-mcp@latest --stdio
2) OpenAI Codex への登録例
~/.codex/config.tomlへ以下の項目を追加
[mcp_servers.openai-responses]
command = "npx"
args = ["-y", "openai-responses-mcp@latest", "--stdio"]
env = { OPENAI_API_KEY = "sk-xxxx" }
3) CLAUDE.md や AGENTS.md への指示例
### 問題解決方針
開発中に問題や実装上の困難に遭遇した場合:
1. **必ず openai-responses MCP に相談すること**
- 相談は最優先かつ必須とする
- 独自判断での実装は絶対に行わない
2. **質問は必ず英語で行うこと**
- openai-responses MCP への質問はすべて英語で記載する
3. **代替手法や最新ベストプラクティスの調査**
- openai-responses MCP を活用して解決手段や最新のベストプラクティスを収集する
4. **複数の解決アプローチを検討すること**
- 一つの方法に即決せず、複数の選択肢を比較検討した上で方針を決定する
5. **解決策を文書化すること**
- 問題解決後は、再発時に迅速に対応できるよう手順や解決方法を記録しておく
4) npx で即実行
export OPENAI_API_KEY="sk-..."
npx openai-responses-mcp@latest --stdio
最小起動は --stdio のみ。必要に応じて --debug <path> / --config <path> / --show-config を付与する。
5) 設定
既定パス: ~/.config/openai-responses-mcp/config.yaml
最小例:
model_profiles:
answer:
model: gpt-5.6-sol
reasoning_effort: medium
verbosity: medium
request:
timeout_ms: 300000
max_retries: 3
既定値も gpt-5.6-sol / medium です。用途別に分ける場合は、詳細分析に gpt-5.6-sol、標準回答に gpt-5.6-terra、高速回答に gpt-5.6-luna を使用する完全例が config/config.yaml.example にあります。
サンプル: config/config.yaml.example
外部 policy を使う場合は次のように設定します。
policy:
system:
source: file
path: ~/.config/openai-responses-mcp/policy.md
merge: append # replace | prepend | append
サンプル: config/policy.md.example
6) ログとデバッグ
- デバッグON:
--debug/DEBUG=1|true/ YAMLserver.debug: true。stderr に出力する。送受信 JSON が出力されるため回答本文が含まれる。優先度は CLI > ENV > YAML。 - デバッグON: ファイルへも出力する。
--debug ./_debug.logまたはDEBUG=./_debug.log - デバッグOFF: デバッグログは出さない。エラー時のみ標準エラーに出力する。
YAMLでの制御:
server.debug: true|false。YAMLだけでも全モジュールに反映する。server.debug_file: <path|null>。server.debug: trueのときにのみ有効で、stderr をファイルへTEEミラーする。
開発者向け(クローンして開発)
1) 取得とビルド
git clone https://github.com/uchimanajet7/openai-responses-mcp.git
cd openai-responses-mcp
npm ci
npm run build
既存の開発環境で依存関係とビルド生成物を作り直す場合:
npm run build:fresh
2) スモークテスト(MCPフレーミング)
npm run mcp:smoke | tee ./mcp-smoke.out
grep -c '^Content-Length:' ./mcp-smoke.out # 3 以上でOK
3) ローカル起動(stdio)
export OPENAI_API_KEY="sk-..."
node build/index.js --stdio --debug ./_debug.log
4) デモ(OpenAIへの問い合わせサンプル)
npm run mcp:quick -- "今日の東京の気温" # answer_quick
npm run mcp:answer -- "今日の東京の気温" # answer
npm run mcp:smoke:ldjson # NDJSON互換の疎通確認
5) ドキュメント(参照先)
- 正準仕様:
docs/spec.md - リファレンス:
docs/reference/config-reference.md/docs/reference/client-setup-claude.md - 検証手順:
docs/verification.md
メンテナ向け(配布)
npm パッケージ確認と公開
npm pack --dry-run # 同梱物を確認。build/ と README.md と LICENSE と package.json と config/*.example
git tag vX.Y.Z && git push --tags # GitHub Actions で公開。release.yml が実行される
トラブルシュート(要点)
Missing API key:OPENAI_API_KEY未設定。ENV を見直しCannot find module build/index.js: ビルド未実行 →npm run build- フレーミング不一致:
npm run mcp:smokeで確認し再ビルド - 429/5xx 多発:
request.max_retries/timeout_msを調整(YAML)
ライセンス
MIT
Installing Openai Responses
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/uchimanajet7/openai-responses-mcpFAQ
Is Openai Responses MCP free?
Yes, Openai Responses MCP is free — one-click install via Unyly at no cost.
Does Openai Responses need an API key?
No, Openai Responses runs without API keys or environment variables.
Is Openai Responses hosted or self-hosted?
A hosted option is available: Unyly runs the server in the cloud, no local setup required.
How do I install Openai Responses in Claude Desktop, Claude Code or Cursor?
Open Openai Responses on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
by modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
by xuzexin-hzMCP-Agent
A simple, composable framework to build agents using Model Context Protocol by [LastMile AI](https://www.lastmileai.dev)
by lastmile-aiSpring AI MCP Client
Provides auto-configuration for MCP client functionality in Spring Boot applications.
mcp.natoma.ai
A Hosted MCP Platform to discover, install, manage and deploy MCP servers by [Natoma Labs](https://www.natoma.ai)
MCPHub
Website to list high quality MCP servers and reviews by real users. Also provide online chatbot for popular LLM models with MCP server support.
MCP Servers Rating and User Reviews
Website to rate MCP servers, write authentic user reviews, and [search engine for agent & mcp](http://www.deepnlp.org/search/agent)
mkinf
An Open Source registry of hosted MCP Servers to accelerate AI agent workflows.
Compare Openai Responses with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All ai MCPs
