# Mcp Server Tutorial

> 技術書「MCPサーバー実装入門」のサンプルコード

- **Type:** MCP server
- **Install:** `agentstack add mcp-akiranuma-mcp-server-tutorial`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [akiraNuma](https://agentstack.voostack.com/s/akiranuma)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [akiraNuma](https://github.com/akiraNuma)
- **Source:** https://github.com/akiraNuma/mcp-server-tutorial

## Install

```sh
agentstack add mcp-akiranuma-mcp-server-tutorial
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# MCP Server Application

## 概要

このディレクトリは、Express + TypeScript + MCP SDK を使ったMCPサーバーのサンプルプロジェクトです。

## 環境情報

### Node.js バージョン

- **推奨バージョン**: Node.js 22.22.0 ( `.node-version` で指定)

### バージョン管理ツールでのセットアップ

```bash
# mise を使用している場合
mise install

# nodenv を使用している場合
nodenv install 22.22.0
nodenv local 22.22.0

# nvm を使用している場合
nvm install 22.22.0
nvm use 22.22.0
```

## セットアップ手順

1. 依存関係のインストール

```bash
npm install
```

2. 環境変数の設定

```bash
cp .env.example .env
# .envファイルを編集して適切な値を設定してください
```

3. サーバー起動(開発モード)

```bash
npm run dev
```

## エンドポイント

- `http://localhost:3000/mcp`(デフォルト設定の場合)

## デバッグ用ツール

```bash
npx @modelcontextprotocol/inspector
```

## (応用編)Redmine連携機能

実践的なサンプルとして、Redmine APIと連携するツールを実装しています。チケットの取得・作成・更新が可能です。

### 必要なヘッダー

MCPクライアントから以下のヘッダーを送信してください。

| ヘッダー            | 説明                                                    |
| ------------------- | ------------------------------------------------------- |
| `x-redmine-url`     | RedmineのベースURL（例: `https://redmine.example.com`） |
| `x-redmine-api-key` | Redmine APIキー                                         |

### Redmine APIキーの取得方法

1. Redmine管理者に「REST APIを有効にする」設定を依頼（管理 → 設定 → API）
2. Redmineにログイン
3. 右上のアカウント名 → 「個人設定」
4. 右ペインの「APIアクセスキー」欄で「表示」をクリック

### クライアント設定例（VS Code）

```json
# mcp.json
{
  "servers": {
    "redmine-mcp": {
      "type": "http",
      "url": "http://localhost:3000/mcp",
      "headers": {
        "x-redmine-url": "https://your-redmine.example.com",
        "x-redmine-api-key": "your-api-key-here"
      }
    }
  }
}
```

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [akiraNuma](https://github.com/akiraNuma)
- **Source:** [akiraNuma/mcp-server-tutorial](https://github.com/akiraNuma/mcp-server-tutorial)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-akiranuma-mcp-server-tutorial
- Seller: https://agentstack.voostack.com/s/akiranuma
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
