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

An MCP server can offer three things: tools, resources, and prompts. For your first server, a single tool the agent can call is plenty.
| Primitive | What it does | Example |
|---|---|---|
| Tools | Functions the agent calls and runs | Glossary lookup, internal API query |
| Resources | Data the agent can read | Glossary file, product docs |
| Prompts | Reusable 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

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.
- Install: In a new folder, run
uv add "mcp[cli]"(orpip install "mcp[cli]"). - Define a tool: Create
glossary.py, addfrom mcp.server import MCPServerandmcp = 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." - Run it locally: Add
mcp.run(transport="stdio")at the end of the file, then runuv run mcp dev glossary.pyto open the Inspector and confirm your tool shows up. - Register it with your agent: For Claude Code, run
claude mcp add glossary -- uv run glossary.py. For Codex, runcodex mcp add glossary -- uv run glossary.py, or add it under[mcp_servers.glossary]in~/.codex/config.toml. - Test it: Ask your agent, "What does X mean at our company?" and check that the tool gets called. In Claude Code,
claude mcp listshows the connection status.
Local (stdio) vs. remote (HTTP)

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 runs | Launched by the agent on your machine | Hosted on a server, reached by URL |
| Register with | claude mcp add name -- command | claude mcp add --transport http name url |
| Auth | Uses your local permissions | Needs tokens or OAuth |
| Best for | Personal experiments, local file search | Shared 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

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 (
--envin both Claude Code and Codex). - Decide who shares it: In Claude Code,
--scope projectsaves the server to the repo's.mcp.jsonso 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

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
Where talk becomes work.
Get started with 1,000 credits a month — no credit card required.