learning-mcp-server

learning-mcp-server

A minimal MCP server with three toy tools (add, echo, current_time) for learning deployment on SAP BTP Cloud Foundry.

Category
访问服务器

README

learning-mcp-server

A minimal MCP server (three toy tools: add, echo, current_time) meant purely for learning how MCP servers deploy and run on SAP BTP's Cloud Foundry trial environment. No auth, no SAP backend calls — just get something running end to end.

Step 1 — Get a trial account

  1. Go to https://www.sap.com/products/technology-platform/trial.html and sign up (SAP account required; free, no time-limited data beyond the 90-day trial window).
  2. After signup you land in the SAP BTP cockpit with a subaccount and a Cloud Foundry space already created for you.

Keep in mind while you're learning: the trial account is for personal, non-production exploration only, resets after 90 days (or 30 days of inactivity), and has no SLA. That's all fine for this purpose.

Step 2 — Enable Cloud Foundry environment

  1. In the cockpit, open your subaccount → Cloud Foundry Environment.
  2. If it's not already enabled, click Enable Cloud Foundry, choose the free/trial plan, keep defaults, and create it.
  3. Note the API Endpoint shown here (something like https://api.cf.us10-001.hana.ondemand.com) — you'll need it to log in.
  4. A default space (usually called dev) is created automatically.

Step 3 — Install the Cloud Foundry CLI

Install cf from https://github.com/cloudfoundry/cli#installers-and-compressed-binaries (or via your package manager, e.g. brew install cloudfoundry/tap/cf-cli on macOS).

Verify:

cf --version

Step 4 — Log in

Trial accounts authenticate via SSO passcode rather than username/password:

cf login -a <API-ENDPOINT-FROM-STEP-2> --sso

This prints a URL — open it in your browser, copy the one-time passcode shown there, and paste it back into the terminal prompt. Then select your org and the dev space when prompted (or run cf target -o <your-org> -s dev afterward).

Step 5 — Deploy the server

From this project folder:

cf push

cf push reads manifest.yml, uploads the code, builds it with the Python buildpack, and starts it. When it finishes, it prints a route — something like:

routes: learning-mcp-server-<random>.cfapps.us10-001.hana.ondemand.com

That's your server's public HTTPS URL. Your MCP endpoint is at <that-url>/mcp.

Important for learning purposes only: this deployment has no authentication — anyone with the URL could call it. That's acceptable for a throwaway trial-account experiment, but never deploy an unauthenticated server like this with real data or real SAP system access behind it.

Step 6 — Test it

The easiest way to poke at it directly is the official MCP Inspector:

npx @modelcontextprotocol/inspector

This opens a local web UI. Choose Streamable HTTP as the transport, paste in https://<your-route>/mcp, connect, and you should see the three tools (add, echo, current_time) listed — click one to try it.

Step 7 — Connect it to Claude Desktop (optional)

Claude Desktop's config expects a local command, but remote Streamable HTTP servers can be bridged in via mcp-remote:

{
  "mcpServers": {
    "learning-server": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://<your-route>/mcp"]
    }
  }
}

Restart Claude Desktop and ask it to add two numbers or echo some text.

Useful commands while learning

cf logs learning-mcp-server --recent   # see recent logs (crash cause etc.)
cf logs learning-mcp-server            # tail live logs
cf apps                                 # list deployed apps and their routes/state
cf restart learning-mcp-server          # restart after config changes
cf delete learning-mcp-server           # tear it down, free up memory quota

Where to go from here

Once this deploys and responds correctly:

  1. Add a tool that calls a real SAP API (e.g. a public S/4HANA sandbox OData service, no auth needed to start).
  2. Then introduce a BTP Destination instead of a hardcoded URL.
  3. Then add authentication (SAP Cloud Identity Services / XSUAA) in front of the server, following the security pattern from the earlier architecture discussion.

Each of those is a small, isolated next step — happy to scaffold any of them when you're ready.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选