Want AI to Search Your Company Data? Build an MCP Server

By the daglo team · November 24, 2026

Want AI to Search Your Company Data? Build an MCP Server

Do you keep pasting your internal glossary or API docs into your AI agent, explaining the same things over and over? Ready-made MCP servers can't reach your company's own data, so your agent stays stuck with what's public.

An MCP server is a small program that exposes tools and data to AI agents through a standard protocol, the Model Context Protocol. Build it once and you can plug the same server into any agent that supports MCP, including Claude Code and Codex. In this guide, we'll build an MCP server with one tool, an internal glossary lookup, in five steps from install to test. New to MCP? Start with our MCP guide.

What an MCP server is made of

A workspace with code on several monitors

An MCP server can offer three things: tools, resources, and prompts. For your first server, a single tool the agent can call is plenty.

PrimitiveWhat it doesExample
ToolsFunctions the agent calls and runsGlossary lookup, internal API query
ResourcesData the agent can readGlossary file, product docs
PromptsReusable instruction templates"Explain this term to a new hire"

Always write a docstring for each tool. The agent reads it to decide when to call that tool.

Build an MCP server in 5 steps

A black terminal window with a command prompt and cursor

With the official Python SDK, adding a decorator to a function is all it takes to create a tool. The example below follows SDK 2.x. Package and class names can change between versions, so double-check the official docs at modelcontextprotocol.io before you start.

  1. Install: In a new folder, run uv add "mcp[cli]" (or pip install "mcp[cli]").
  2. Define a tool: Create glossary.py, add from mcp.server import MCPServer and mcp = MCPServer("glossary"), then put @mcp.tool() on a function that takes a term and returns its definition. Describe its purpose in the docstring, like "Look up the meaning of an internal term."
  3. Run it locally: Add mcp.run(transport="stdio") at the end of the file, then run uv run mcp dev glossary.py to open the Inspector and confirm your tool shows up.
  4. Register it with your agent: For Claude Code, run claude mcp add glossary -- uv run glossary.py. For Codex, run codex mcp add glossary -- uv run glossary.py, or add it under [mcp_servers.glossary] in ~/.codex/config.toml.
  5. Test it: Ask your agent, "What does X mean at our company?" and check that the tool gets called. In Claude Code, claude mcp list shows the connection status.

Local (stdio) vs. remote (HTTP)

Colorful code on a dark monitor

Run tools only you use locally over stdio, and tools your team shares remotely over Streamable HTTP. The choice changes where the server runs and how people authenticate.

Local (stdio)Remote (Streamable HTTP)
Where it runsLaunched by the agent on your machineHosted on a server, reached by URL
Register withclaude mcp add name -- commandclaude mcp add --transport http name url
AuthUses your local permissionsNeeds tokens or OAuth
Best forPersonal experiments, local file searchShared team tools, internal APIs

Anyone who knows a remote server's URL can try to reach it, so add authentication before you share it.

Permissions and auth: the non-negotiables

A combination lock on a keyboard

Your agent runs MCP tools with your permissions. Keeping each tool's scope narrow from day one is the most reliable security measure.

  • Start read-only: Make your first tool lookup-only, and keep write or delete tools separate.
  • Keep secrets out of code: Pass API keys as environment variables (--env in both Claude Code and Codex).
  • Decide who shares it: In Claude Code, --scope project saves the server to the repo's .mcp.json so the whole team gets the same setup. Keep servers that use personal keys in the default local scope.

Pick your next tool from meeting notes

Colleagues looking at a laptop together and sharing ideas

The best tools to build answer questions your team asks again and again, and most of those questions are already sitting in your meeting notes.

Record your requirements meetings with daglo and you get the transcript and summary right away. Then ask Board Chat, "List the docs and questions the team kept looking for in this meeting," to shortlist your first tool. Speaker ID remembers the voices of the people in your meetings and fills in their real names instead of "Speaker 1" from the next recording on, so you also know who asked for what. daglo is the first in Korea to offer this to every user. 👉 Learn more about Speaker ID

Ship one small tool, see whether your team actually uses it, then add resources and prompts one at a time.

#MCPServer #MCP #ModelContextProtocol #ClaudeCode #Codex #AIAgents #DeveloperProductivity #daglo

👉 Turn meetings into requirements, free

← Back to blog

Where talk becomes work.

Get started with 1,000 credits a month — no credit card required.